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_ripemd.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_ripemd.c')
-rw-r--r-- | src/lib/libcrypto/evp/m_ripemd.c | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/src/lib/libcrypto/evp/m_ripemd.c b/src/lib/libcrypto/evp/m_ripemd.c index 04c5d8897b..64725528dc 100644 --- a/src/lib/libcrypto/evp/m_ripemd.c +++ b/src/lib/libcrypto/evp/m_ripemd.c | |||
@@ -56,26 +56,41 @@ | |||
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
58 | 58 | ||
59 | #ifndef OPENSSL_NO_RIPEMD | ||
59 | #include <stdio.h> | 60 | #include <stdio.h> |
60 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
61 | #include "evp.h" | 62 | #include <openssl/ripemd.h> |
62 | #include "objects.h" | 63 | #include <openssl/evp.h> |
63 | #include "x509.h" | 64 | #include <openssl/objects.h> |
65 | #include <openssl/x509.h> | ||
64 | 66 | ||
65 | static EVP_MD ripemd160_md= | 67 | static int init(EVP_MD_CTX *ctx) |
68 | { return RIPEMD160_Init(ctx->md_data); } | ||
69 | |||
70 | static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count) | ||
71 | { return RIPEMD160_Update(ctx->md_data,data,count); } | ||
72 | |||
73 | static int final(EVP_MD_CTX *ctx,unsigned char *md) | ||
74 | { return RIPEMD160_Final(md,ctx->md_data); } | ||
75 | |||
76 | static const EVP_MD ripemd160_md= | ||
66 | { | 77 | { |
67 | NID_ripemd160, | 78 | NID_ripemd160, |
68 | NID_ripemd160WithRSA, | 79 | NID_ripemd160WithRSA, |
69 | RIPEMD160_DIGEST_LENGTH, | 80 | RIPEMD160_DIGEST_LENGTH, |
70 | RIPEMD160_Init, | 81 | 0, |
71 | RIPEMD160_Update, | 82 | init, |
72 | RIPEMD160_Final, | 83 | update, |
84 | final, | ||
85 | NULL, | ||
86 | NULL, | ||
73 | EVP_PKEY_RSA_method, | 87 | EVP_PKEY_RSA_method, |
74 | RIPEMD160_CBLOCK, | 88 | RIPEMD160_CBLOCK, |
75 | sizeof(EVP_MD *)+sizeof(RIPEMD160_CTX), | 89 | sizeof(EVP_MD *)+sizeof(RIPEMD160_CTX), |
76 | }; | 90 | }; |
77 | 91 | ||
78 | EVP_MD *EVP_ripemd160() | 92 | const EVP_MD *EVP_ripemd160(void) |
79 | { | 93 | { |
80 | return(&ripemd160_md); | 94 | return(&ripemd160_md); |
81 | } | 95 | } |
96 | #endif | ||