diff --git a/decrepit/evp/CMakeLists.txt b/decrepit/evp/CMakeLists.txt index ee3bf33b..e631a9a9 100644 --- a/decrepit/evp/CMakeLists.txt +++ b/decrepit/evp/CMakeLists.txt @@ -5,5 +5,6 @@ add_library( OBJECT + dss1.c evp_do_all.c ) diff --git a/decrepit/evp/dss1.c b/decrepit/evp/dss1.c new file mode 100644 index 00000000..9c370acb --- /dev/null +++ b/decrepit/evp/dss1.c @@ -0,0 +1,20 @@ +/* Copyright (c) 2016, Google Inc. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ + +#include + + +const EVP_MD *EVP_dss1(void) { + return EVP_sha1(); +} diff --git a/include/openssl/digest.h b/include/openssl/digest.h index db3ead71..07ea07a6 100644 --- a/include/openssl/digest.h +++ b/include/openssl/digest.h @@ -212,6 +212,12 @@ OPENSSL_EXPORT int EVP_add_digest(const EVP_MD *digest); * |name|, or NULL if the name is unknown. */ OPENSSL_EXPORT const EVP_MD *EVP_get_digestbyname(const char *); +/* EVP_dss1 returns the value of EVP_sha1(). This was provided by OpenSSL to + * specifiy the original DSA signatures, which were fixed to use SHA-1. Note, + * however, that attempting to sign or verify DSA signatures with the EVP + * interface will always fail. */ +OPENSSL_EXPORT const EVP_MD *EVP_dss1(void); + /* Digest operation accessors. */