projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New pkey functions for keygen callbacks and retrieving operation type.
[openssl.git]
/
crypto
/
evp
/
m_md2.c
diff --git
a/crypto/evp/m_md2.c
b/crypto/evp/m_md2.c
index 4b842382838b9a933c0dd2dc434d2693b2d2cfe7..5ce849f161dde283fa899d4a4a02f3538e486d94 100644
(file)
--- a/
crypto/evp/m_md2.c
+++ b/
crypto/evp/m_md2.c
@@
-58,25
+58,44
@@
#include <stdio.h>
#include "cryptlib.h"
#include <stdio.h>
#include "cryptlib.h"
+
+#ifndef OPENSSL_NO_MD2
+
#include <openssl/evp.h>
#include <openssl/objects.h>
#include <openssl/x509.h>
#include <openssl/evp.h>
#include <openssl/objects.h>
#include <openssl/x509.h>
+#include <openssl/md2.h>
+#ifndef OPENSSL_NO_RSA
+#include <openssl/rsa.h>
+#endif
+
+static int init(EVP_MD_CTX *ctx)
+ { return MD2_Init(ctx->md_data); }
-static EVP_MD md2_md=
+static int update(EVP_MD_CTX *ctx,const void *data,size_t count)
+ { return MD2_Update(ctx->md_data,data,count); }
+
+static int final(EVP_MD_CTX *ctx,unsigned char *md)
+ { return MD2_Final(md,ctx->md_data); }
+
+static const EVP_MD md2_md=
{
NID_md2,
NID_md2WithRSAEncryption,
MD2_DIGEST_LENGTH,
{
NID_md2,
NID_md2WithRSAEncryption,
MD2_DIGEST_LENGTH,
- MD2_Init,
- MD2_Update,
- MD2_Final,
+ 0,
+ init,
+ update,
+ final,
+ NULL,
+ NULL,
EVP_PKEY_RSA_method,
MD2_BLOCK,
sizeof(EVP_MD *)+sizeof(MD2_CTX),
};
EVP_PKEY_RSA_method,
MD2_BLOCK,
sizeof(EVP_MD *)+sizeof(MD2_CTX),
};
-EVP_MD *EVP_md2(void)
+
const
EVP_MD *EVP_md2(void)
{
return(&md2_md);
}
{
return(&md2_md);
}
-
+#endif