diff options
Diffstat (limited to 'src/lib/libcrypto/evp/m_dss.c')
-rw-r--r-- | src/lib/libcrypto/evp/m_dss.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/src/lib/libcrypto/evp/m_dss.c b/src/lib/libcrypto/evp/m_dss.c index 8ea826868e..beb8d7fc5c 100644 --- a/src/lib/libcrypto/evp/m_dss.c +++ b/src/lib/libcrypto/evp/m_dss.c | |||
@@ -62,21 +62,33 @@ | |||
62 | #include <openssl/objects.h> | 62 | #include <openssl/objects.h> |
63 | #include <openssl/x509.h> | 63 | #include <openssl/x509.h> |
64 | 64 | ||
65 | #ifndef NO_SHA | 65 | #ifndef OPENSSL_NO_SHA |
66 | static EVP_MD dsa_md= | 66 | static int init(EVP_MD_CTX *ctx) |
67 | { return SHA1_Init(ctx->md_data); } | ||
68 | |||
69 | static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count) | ||
70 | { return SHA1_Update(ctx->md_data,data,count); } | ||
71 | |||
72 | static int final(EVP_MD_CTX *ctx,unsigned char *md) | ||
73 | { return SHA1_Final(md,ctx->md_data); } | ||
74 | |||
75 | static const EVP_MD dsa_md= | ||
67 | { | 76 | { |
68 | NID_dsaWithSHA, | 77 | NID_dsaWithSHA, |
69 | NID_dsaWithSHA, | 78 | NID_dsaWithSHA, |
70 | SHA_DIGEST_LENGTH, | 79 | SHA_DIGEST_LENGTH, |
71 | SHA1_Init, | 80 | 0, |
72 | SHA1_Update, | 81 | init, |
73 | SHA1_Final, | 82 | update, |
83 | final, | ||
84 | NULL, | ||
85 | NULL, | ||
74 | EVP_PKEY_DSA_method, | 86 | EVP_PKEY_DSA_method, |
75 | SHA_CBLOCK, | 87 | SHA_CBLOCK, |
76 | sizeof(EVP_MD *)+sizeof(SHA_CTX), | 88 | sizeof(EVP_MD *)+sizeof(SHA_CTX), |
77 | }; | 89 | }; |
78 | 90 | ||
79 | EVP_MD *EVP_dss(void) | 91 | const EVP_MD *EVP_dss(void) |
80 | { | 92 | { |
81 | return(&dsa_md); | 93 | return(&dsa_md); |
82 | } | 94 | } |