diff options
author | beck <> | 2002-05-15 02:29:21 +0000 |
---|---|---|
committer | beck <> | 2002-05-15 02:29:21 +0000 |
commit | b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9 (patch) | |
tree | fa27cf82a1250b64ed3bf5f4a18c7354d470bbcc /src/lib/libcrypto/evp/m_dss1.c | |
parent | e471e1ea98d673597b182ea85f29e30c97cd08b5 (diff) | |
download | openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.tar.gz openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.tar.bz2 openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.zip |
OpenSSL 0.9.7 stable 2002 05 08 merge
Diffstat (limited to 'src/lib/libcrypto/evp/m_dss1.c')
-rw-r--r-- | src/lib/libcrypto/evp/m_dss1.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/src/lib/libcrypto/evp/m_dss1.c b/src/lib/libcrypto/evp/m_dss1.c index 9d8d1ce23e..f5668ebda0 100644 --- a/src/lib/libcrypto/evp/m_dss1.c +++ b/src/lib/libcrypto/evp/m_dss1.c | |||
@@ -56,27 +56,39 @@ | |||
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
58 | 58 | ||
59 | #ifndef NO_SHA | 59 | #ifndef OPENSSL_NO_SHA |
60 | #include <stdio.h> | 60 | #include <stdio.h> |
61 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
62 | #include <openssl/evp.h> | 62 | #include <openssl/evp.h> |
63 | #include <openssl/objects.h> | 63 | #include <openssl/objects.h> |
64 | #include <openssl/x509.h> | 64 | #include <openssl/x509.h> |
65 | 65 | ||
66 | static EVP_MD dss1_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 dss1_md= | ||
67 | { | 76 | { |
68 | NID_dsa, | 77 | NID_dsa, |
69 | NID_dsaWithSHA1, | 78 | NID_dsaWithSHA1, |
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_dss1(void) | 91 | const EVP_MD *EVP_dss1(void) |
80 | { | 92 | { |
81 | return(&dss1_md); | 93 | return(&dss1_md); |
82 | } | 94 | } |