summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/p_verify.c
diff options
context:
space:
mode:
authorbeck <>1999-09-29 04:37:45 +0000
committerbeck <>1999-09-29 04:37:45 +0000
commitde8f24ea083384bb66b32ec105dc4743c5663cdf (patch)
tree1412176ae62a3cab2cf2b0b92150fcbceaac6092 /src/lib/libcrypto/evp/p_verify.c
parentcb929d29896bcb87c2a97417fbd03e50078fc178 (diff)
downloadopenbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.gz
openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.bz2
openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.zip
OpenSSL 0.9.4 merge
Diffstat (limited to 'src/lib/libcrypto/evp/p_verify.c')
-rw-r--r--src/lib/libcrypto/evp/p_verify.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/lib/libcrypto/evp/p_verify.c b/src/lib/libcrypto/evp/p_verify.c
index 8d727d8f02..dcb54f3abb 100644
--- a/src/lib/libcrypto/evp/p_verify.c
+++ b/src/lib/libcrypto/evp/p_verify.c
@@ -58,15 +58,12 @@
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
65int EVP_VerifyFinal(ctx,sigbuf,siglen,pkey) 65int EVP_VerifyFinal(EVP_MD_CTX *ctx, unsigned char *sigbuf,
66EVP_MD_CTX *ctx; 66 unsigned int siglen, EVP_PKEY *pkey)
67unsigned char *sigbuf;
68unsigned int siglen;
69EVP_PKEY *pkey;
70 { 67 {
71 unsigned char m[EVP_MAX_MD_SIZE]; 68 unsigned char m[EVP_MAX_MD_SIZE];
72 unsigned int m_len; 69 unsigned int m_len;
@@ -88,7 +85,7 @@ EVP_PKEY *pkey;
88 EVPerr(EVP_F_EVP_VERIFYFINAL,EVP_R_WRONG_PUBLIC_KEY_TYPE); 85 EVPerr(EVP_F_EVP_VERIFYFINAL,EVP_R_WRONG_PUBLIC_KEY_TYPE);
89 return(-1); 86 return(-1);
90 } 87 }
91 memcpy(&tmp_ctx,ctx,sizeof(EVP_MD_CTX)); 88 EVP_MD_CTX_copy(&tmp_ctx,ctx);
92 EVP_DigestFinal(&tmp_ctx,&(m[0]),&m_len); 89 EVP_DigestFinal(&tmp_ctx,&(m[0]),&m_len);
93 if (ctx->digest->verify == NULL) 90 if (ctx->digest->verify == NULL)
94 { 91 {