diff options
| author | markus <> | 2002-09-05 12:51:50 +0000 |
|---|---|---|
| committer | markus <> | 2002-09-05 12:51:50 +0000 |
| commit | 15b5d84f9da2ce4bfae8580e56e34a859f74ad71 (patch) | |
| tree | bf939e82d7fd73cc8a01cf6959002209972091bc /src/lib/libcrypto/evp/m_dss.c | |
| parent | 027351f729b9e837200dae6e1520cda6577ab930 (diff) | |
| download | openbsd-15b5d84f9da2ce4bfae8580e56e34a859f74ad71.tar.gz openbsd-15b5d84f9da2ce4bfae8580e56e34a859f74ad71.tar.bz2 openbsd-15b5d84f9da2ce4bfae8580e56e34a859f74ad71.zip | |
import openssl-0.9.7-beta1
Diffstat (limited to 'src/lib/libcrypto/evp/m_dss.c')
| -rw-r--r-- | src/lib/libcrypto/evp/m_dss.c | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/src/lib/libcrypto/evp/m_dss.c b/src/lib/libcrypto/evp/m_dss.c index 3549b1699c..beb8d7fc5c 100644 --- a/src/lib/libcrypto/evp/m_dss.c +++ b/src/lib/libcrypto/evp/m_dss.c | |||
| @@ -58,25 +58,38 @@ | |||
| 58 | 58 | ||
| 59 | #include <stdio.h> | 59 | #include <stdio.h> |
| 60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
| 61 | #include "evp.h" | 61 | #include <openssl/evp.h> |
| 62 | #include "objects.h" | 62 | #include <openssl/objects.h> |
| 63 | #include "x509.h" | 63 | #include <openssl/x509.h> |
| 64 | 64 | ||
| 65 | static EVP_MD dsa_md= | 65 | #ifndef OPENSSL_NO_SHA |
| 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= | ||
| 66 | { | 76 | { |
| 67 | NID_dsaWithSHA, | 77 | NID_dsaWithSHA, |
| 68 | NID_dsaWithSHA, | 78 | NID_dsaWithSHA, |
| 69 | SHA_DIGEST_LENGTH, | 79 | SHA_DIGEST_LENGTH, |
| 70 | SHA1_Init, | 80 | 0, |
| 71 | SHA1_Update, | 81 | init, |
| 72 | SHA1_Final, | 82 | update, |
| 83 | final, | ||
| 84 | NULL, | ||
| 85 | NULL, | ||
| 73 | EVP_PKEY_DSA_method, | 86 | EVP_PKEY_DSA_method, |
| 74 | SHA_CBLOCK, | 87 | SHA_CBLOCK, |
| 75 | sizeof(EVP_MD *)+sizeof(SHA_CTX), | 88 | sizeof(EVP_MD *)+sizeof(SHA_CTX), |
| 76 | }; | 89 | }; |
| 77 | 90 | ||
| 78 | EVP_MD *EVP_dss() | 91 | const EVP_MD *EVP_dss(void) |
| 79 | { | 92 | { |
| 80 | return(&dsa_md); | 93 | return(&dsa_md); |
| 81 | } | 94 | } |
| 82 | 95 | #endif | |
