X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fevp%2Fm_sha1.c;h=f5eccb7e25a30377b9fd4334243f7ccedcba1846;hb=9587429fa07a34066107e926fbc8708220f058fa;hp=4679b1c4638c18d1e0d8c6edc8c1d86f14fff28d;hpb=3eeaab4bed46e3320947d0f609b82007b65b5a46;p=oweals%2Fopenssl.git diff --git a/crypto/evp/m_sha1.c b/crypto/evp/m_sha1.c index 4679b1c463..f5eccb7e25 100644 --- a/crypto/evp/m_sha1.c +++ b/crypto/evp/m_sha1.c @@ -63,11 +63,16 @@ #include #include -#include +#include #ifndef OPENSSL_NO_RSA #include #endif +#ifdef OPENSSL_FIPS +#include +#endif + + static int init(EVP_MD_CTX *ctx) { return SHA1_Init(ctx->md_data); } @@ -82,13 +87,13 @@ static const EVP_MD sha1_md= NID_sha1, NID_sha1WithRSAEncryption, SHA_DIGEST_LENGTH, - 0, + EVP_MD_FLAG_PKEY_METHOD_SIGNATURE|EVP_MD_FLAG_DIGALGID_ABSENT|EVP_MD_FLAG_FIPS, init, update, final, NULL, NULL, - EVP_PKEY_RSA_method, + EVP_PKEY_NULL_method, SHA_CBLOCK, sizeof(EVP_MD *)+sizeof(SHA_CTX), }; @@ -119,13 +124,13 @@ static const EVP_MD sha224_md= NID_sha224, NID_sha224WithRSAEncryption, SHA224_DIGEST_LENGTH, - 0, + EVP_MD_FLAG_PKEY_METHOD_SIGNATURE|EVP_MD_FLAG_DIGALGID_ABSENT|EVP_MD_FLAG_FIPS, init224, update256, final256, NULL, NULL, - EVP_PKEY_RSA_method, + EVP_PKEY_NULL_method, SHA256_CBLOCK, sizeof(EVP_MD *)+sizeof(SHA256_CTX), }; @@ -138,13 +143,13 @@ static const EVP_MD sha256_md= NID_sha256, NID_sha256WithRSAEncryption, SHA256_DIGEST_LENGTH, - 0, + EVP_MD_FLAG_PKEY_METHOD_SIGNATURE|EVP_MD_FLAG_DIGALGID_ABSENT|EVP_MD_FLAG_FIPS, init256, update256, final256, NULL, NULL, - EVP_PKEY_RSA_method, + EVP_PKEY_NULL_method, SHA256_CBLOCK, sizeof(EVP_MD *)+sizeof(SHA256_CTX), }; @@ -169,13 +174,13 @@ static const EVP_MD sha384_md= NID_sha384, NID_sha384WithRSAEncryption, SHA384_DIGEST_LENGTH, - 0, + EVP_MD_FLAG_PKEY_METHOD_SIGNATURE|EVP_MD_FLAG_DIGALGID_ABSENT|EVP_MD_FLAG_FIPS, init384, update512, final512, NULL, NULL, - EVP_PKEY_RSA_method, + EVP_PKEY_NULL_method, SHA512_CBLOCK, sizeof(EVP_MD *)+sizeof(SHA512_CTX), }; @@ -188,13 +193,13 @@ static const EVP_MD sha512_md= NID_sha512, NID_sha512WithRSAEncryption, SHA512_DIGEST_LENGTH, - 0, + EVP_MD_FLAG_PKEY_METHOD_SIGNATURE|EVP_MD_FLAG_DIGALGID_ABSENT|EVP_MD_FLAG_FIPS, init512, update512, final512, NULL, NULL, - EVP_PKEY_RSA_method, + EVP_PKEY_NULL_method, SHA512_CBLOCK, sizeof(EVP_MD *)+sizeof(SHA512_CTX), }; @@ -202,3 +207,4 @@ static const EVP_MD sha512_md= const EVP_MD *EVP_sha512(void) { return(&sha512_md); } #endif /* ifndef OPENSSL_NO_SHA512 */ +