diff options
author | markm <markm@FreeBSD.org> | 2003-01-28 21:43:22 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2003-01-28 21:43:22 +0000 |
commit | aad1d64cb5a8d9b503d9199642363dc1e92d2f9b (patch) | |
tree | 610a51c6e3965764fb0f1629c1376e2d23afffe8 /crypto/openssl/crypto/evp/m_ripemd.c | |
parent | eba366e36e93f5da8ae5c744eb337c3ef6872641 (diff) | |
download | FreeBSD-src-aad1d64cb5a8d9b503d9199642363dc1e92d2f9b.zip FreeBSD-src-aad1d64cb5a8d9b503d9199642363dc1e92d2f9b.tar.gz |
Vendor import of OpenSSL release 0.9.7. This release includes
support for AES and OpenBSD's hardware crypto.
Diffstat (limited to 'crypto/openssl/crypto/evp/m_ripemd.c')
-rw-r--r-- | crypto/openssl/crypto/evp/m_ripemd.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/crypto/openssl/crypto/evp/m_ripemd.c b/crypto/openssl/crypto/evp/m_ripemd.c index 3d781a4..6472552 100644 --- a/crypto/openssl/crypto/evp/m_ripemd.c +++ b/crypto/openssl/crypto/evp/m_ripemd.c @@ -56,7 +56,7 @@ * [including the GNU Public Licence.] */ -#ifndef NO_RIPEMD +#ifndef OPENSSL_NO_RIPEMD #include <stdio.h> #include "cryptlib.h" #include <openssl/ripemd.h> @@ -64,20 +64,32 @@ #include <openssl/objects.h> #include <openssl/x509.h> -static EVP_MD ripemd160_md= +static int init(EVP_MD_CTX *ctx) + { return RIPEMD160_Init(ctx->md_data); } + +static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count) + { return RIPEMD160_Update(ctx->md_data,data,count); } + +static int final(EVP_MD_CTX *ctx,unsigned char *md) + { return RIPEMD160_Final(md,ctx->md_data); } + +static const EVP_MD ripemd160_md= { NID_ripemd160, NID_ripemd160WithRSA, RIPEMD160_DIGEST_LENGTH, - RIPEMD160_Init, - RIPEMD160_Update, - RIPEMD160_Final, + 0, + init, + update, + final, + NULL, + NULL, EVP_PKEY_RSA_method, RIPEMD160_CBLOCK, sizeof(EVP_MD *)+sizeof(RIPEMD160_CTX), }; -EVP_MD *EVP_ripemd160(void) +const EVP_MD *EVP_ripemd160(void) { return(&ripemd160_md); } |