summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/evp/m_ripemd.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/crypto/evp/m_ripemd.c')
-rw-r--r--crypto/openssl/crypto/evp/m_ripemd.c24
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);
}
OpenPOWER on IntegriCloud