X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fevp%2Fm_sha1.c;h=f5eccb7e25a30377b9fd4334243f7ccedcba1846;hb=6f77f82bfcdf40c41e095bf292e887d15f2bf69d;hp=daf6db6ebeed673f19140289cb4079bee17eb1b6;hpb=31c2ac1cdc9df8f15b1faa8f7df1117c32095037;p=oweals%2Fopenssl.git diff --git a/crypto/evp/m_sha1.c b/crypto/evp/m_sha1.c index daf6db6ebe..f5eccb7e25 100644 --- a/crypto/evp/m_sha1.c +++ b/crypto/evp/m_sha1.c @@ -63,8 +63,15 @@ #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); } @@ -80,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), }; @@ -117,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), }; @@ -136,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), }; @@ -167,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), }; @@ -186,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), }; @@ -200,3 +207,4 @@ static const EVP_MD sha512_md= const EVP_MD *EVP_sha512(void) { return(&sha512_md); } #endif /* ifndef OPENSSL_NO_SHA512 */ +