diff options
author | beck <> | 1999-09-29 04:37:45 +0000 |
---|---|---|
committer | beck <> | 1999-09-29 04:37:45 +0000 |
commit | de8f24ea083384bb66b32ec105dc4743c5663cdf (patch) | |
tree | 1412176ae62a3cab2cf2b0b92150fcbceaac6092 /src/lib/libcrypto/evp/p_sign.c | |
parent | cb929d29896bcb87c2a97417fbd03e50078fc178 (diff) | |
download | openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.gz openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.bz2 openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.zip |
OpenSSL 0.9.4 merge
Diffstat (limited to 'src/lib/libcrypto/evp/p_sign.c')
-rw-r--r-- | src/lib/libcrypto/evp/p_sign.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/src/lib/libcrypto/evp/p_sign.c b/src/lib/libcrypto/evp/p_sign.c index 073270ce31..1fa32ac17e 100644 --- a/src/lib/libcrypto/evp/p_sign.c +++ b/src/lib/libcrypto/evp/p_sign.c | |||
@@ -58,32 +58,25 @@ | |||
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 | ||
65 | #ifdef undef | 65 | #ifdef undef |
66 | void EVP_SignInit(ctx,type) | 66 | void EVP_SignInit(EVP_MD_CTX *ctx, EVP_MD *type) |
67 | EVP_MD_CTX *ctx; | ||
68 | EVP_MD *type; | ||
69 | { | 67 | { |
70 | EVP_DigestInit(ctx,type); | 68 | EVP_DigestInit(ctx,type); |
71 | } | 69 | } |
72 | 70 | ||
73 | void EVP_SignUpdate(ctx,data,count) | 71 | void EVP_SignUpdate(EVP_MD_CTX *ctx, unsigned char *data, |
74 | EVP_MD_CTX *ctx; | 72 | unsigned int count) |
75 | unsigned char *data; | ||
76 | unsigned int count; | ||
77 | { | 73 | { |
78 | EVP_DigestUpdate(ctx,data,count); | 74 | EVP_DigestUpdate(ctx,data,count); |
79 | } | 75 | } |
80 | #endif | 76 | #endif |
81 | 77 | ||
82 | int EVP_SignFinal(ctx,sigret,siglen,pkey) | 78 | int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen, |
83 | EVP_MD_CTX *ctx; | 79 | EVP_PKEY *pkey) |
84 | unsigned char *sigret; | ||
85 | unsigned int *siglen; | ||
86 | EVP_PKEY *pkey; | ||
87 | { | 80 | { |
88 | unsigned char m[EVP_MAX_MD_SIZE]; | 81 | unsigned char m[EVP_MAX_MD_SIZE]; |
89 | unsigned int m_len; | 82 | unsigned int m_len; |
@@ -91,7 +84,7 @@ EVP_PKEY *pkey; | |||
91 | MS_STATIC EVP_MD_CTX tmp_ctx; | 84 | MS_STATIC EVP_MD_CTX tmp_ctx; |
92 | 85 | ||
93 | *siglen=0; | 86 | *siglen=0; |
94 | memcpy(&tmp_ctx,ctx,sizeof(EVP_MD_CTX)); | 87 | EVP_MD_CTX_copy(&tmp_ctx,ctx); |
95 | EVP_DigestFinal(&tmp_ctx,&(m[0]),&m_len); | 88 | EVP_DigestFinal(&tmp_ctx,&(m[0]),&m_len); |
96 | for (i=0; i<4; i++) | 89 | for (i=0; i<4; i++) |
97 | { | 90 | { |