diff options
| author | djm <> | 2011-11-03 02:32:23 +0000 |
|---|---|---|
| committer | djm <> | 2011-11-03 02:32:23 +0000 |
| commit | 113f799ec7d1728f0a5d7ab5b0e3b42e3de56407 (patch) | |
| tree | 26d712b25a8fa580b8f2dfc6df470ba5ffea9eb7 /src/lib/libcrypto/evp | |
| parent | 829fd51d4f8dde4a7f3bf54754f3c1d1a502f5e2 (diff) | |
| download | openbsd-113f799ec7d1728f0a5d7ab5b0e3b42e3de56407.tar.gz openbsd-113f799ec7d1728f0a5d7ab5b0e3b42e3de56407.tar.bz2 openbsd-113f799ec7d1728f0a5d7ab5b0e3b42e3de56407.zip | |
import OpenSSL 1.0.0e
Diffstat (limited to 'src/lib/libcrypto/evp')
| -rw-r--r-- | src/lib/libcrypto/evp/encode.c | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/evp/evp_enc.c | 1 | ||||
| -rw-r--r-- | src/lib/libcrypto/evp/m_sigver.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/evp/p_lib.c | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/evp/p_sign.c | 2 | ||||
| -rw-r--r-- | src/lib/libcrypto/evp/p_verify.c | 2 | ||||
| -rw-r--r-- | src/lib/libcrypto/evp/pmeth_lib.c | 2 |
7 files changed, 11 insertions, 6 deletions
diff --git a/src/lib/libcrypto/evp/encode.c b/src/lib/libcrypto/evp/encode.c index b42c747249..28546a84bc 100644 --- a/src/lib/libcrypto/evp/encode.c +++ b/src/lib/libcrypto/evp/encode.c | |||
| @@ -235,7 +235,7 @@ void EVP_DecodeInit(EVP_ENCODE_CTX *ctx) | |||
| 235 | int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, | 235 | int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, |
| 236 | const unsigned char *in, int inl) | 236 | const unsigned char *in, int inl) |
| 237 | { | 237 | { |
| 238 | int seof= -1,eof=0,rv= -1,ret=0,i,v,tmp,n,ln,tmp2,exp_nl; | 238 | int seof= -1,eof=0,rv= -1,ret=0,i,v,tmp,n,ln,exp_nl; |
| 239 | unsigned char *d; | 239 | unsigned char *d; |
| 240 | 240 | ||
| 241 | n=ctx->num; | 241 | n=ctx->num; |
| @@ -319,7 +319,6 @@ int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, | |||
| 319 | * lines. We process the line and then need to | 319 | * lines. We process the line and then need to |
| 320 | * accept the '\n' */ | 320 | * accept the '\n' */ |
| 321 | if ((v != B64_EOF) && (n >= 64)) exp_nl=1; | 321 | if ((v != B64_EOF) && (n >= 64)) exp_nl=1; |
| 322 | tmp2=v; | ||
| 323 | if (n > 0) | 322 | if (n > 0) |
| 324 | { | 323 | { |
| 325 | v=EVP_DecodeBlock(out,d,n); | 324 | v=EVP_DecodeBlock(out,d,n); |
diff --git a/src/lib/libcrypto/evp/evp_enc.c b/src/lib/libcrypto/evp/evp_enc.c index bead6a2170..c268d25cb4 100644 --- a/src/lib/libcrypto/evp/evp_enc.c +++ b/src/lib/libcrypto/evp/evp_enc.c | |||
| @@ -204,6 +204,7 @@ skip_to_init: | |||
| 204 | case EVP_CIPH_OFB_MODE: | 204 | case EVP_CIPH_OFB_MODE: |
| 205 | 205 | ||
| 206 | ctx->num = 0; | 206 | ctx->num = 0; |
| 207 | /* fall-through */ | ||
| 207 | 208 | ||
| 208 | case EVP_CIPH_CBC_MODE: | 209 | case EVP_CIPH_CBC_MODE: |
| 209 | 210 | ||
diff --git a/src/lib/libcrypto/evp/m_sigver.c b/src/lib/libcrypto/evp/m_sigver.c index f0b7f95059..7e2731f4a4 100644 --- a/src/lib/libcrypto/evp/m_sigver.c +++ b/src/lib/libcrypto/evp/m_sigver.c | |||
| @@ -137,7 +137,7 @@ int EVP_DigestSignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, size_t *siglen) | |||
| 137 | sctx = 0; | 137 | sctx = 0; |
| 138 | if (sigret) | 138 | if (sigret) |
| 139 | { | 139 | { |
| 140 | MS_STATIC EVP_MD_CTX tmp_ctx; | 140 | EVP_MD_CTX tmp_ctx; |
| 141 | unsigned char md[EVP_MAX_MD_SIZE]; | 141 | unsigned char md[EVP_MAX_MD_SIZE]; |
| 142 | unsigned int mdlen; | 142 | unsigned int mdlen; |
| 143 | EVP_MD_CTX_init(&tmp_ctx); | 143 | EVP_MD_CTX_init(&tmp_ctx); |
| @@ -173,7 +173,7 @@ int EVP_DigestSignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, size_t *siglen) | |||
| 173 | 173 | ||
| 174 | int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx, unsigned char *sig, size_t siglen) | 174 | int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx, unsigned char *sig, size_t siglen) |
| 175 | { | 175 | { |
| 176 | MS_STATIC EVP_MD_CTX tmp_ctx; | 176 | EVP_MD_CTX tmp_ctx; |
| 177 | unsigned char md[EVP_MAX_MD_SIZE]; | 177 | unsigned char md[EVP_MAX_MD_SIZE]; |
| 178 | int r; | 178 | int r; |
| 179 | unsigned int mdlen; | 179 | unsigned int mdlen; |
diff --git a/src/lib/libcrypto/evp/p_lib.c b/src/lib/libcrypto/evp/p_lib.c index 1916c61699..e26ccd0d08 100644 --- a/src/lib/libcrypto/evp/p_lib.c +++ b/src/lib/libcrypto/evp/p_lib.c | |||
| @@ -411,7 +411,10 @@ void EVP_PKEY_free(EVP_PKEY *x) | |||
| 411 | static void EVP_PKEY_free_it(EVP_PKEY *x) | 411 | static void EVP_PKEY_free_it(EVP_PKEY *x) |
| 412 | { | 412 | { |
| 413 | if (x->ameth && x->ameth->pkey_free) | 413 | if (x->ameth && x->ameth->pkey_free) |
| 414 | { | ||
| 414 | x->ameth->pkey_free(x); | 415 | x->ameth->pkey_free(x); |
| 416 | x->pkey.ptr = NULL; | ||
| 417 | } | ||
| 415 | #ifndef OPENSSL_NO_ENGINE | 418 | #ifndef OPENSSL_NO_ENGINE |
| 416 | if (x->engine) | 419 | if (x->engine) |
| 417 | { | 420 | { |
diff --git a/src/lib/libcrypto/evp/p_sign.c b/src/lib/libcrypto/evp/p_sign.c index 8df6d48a7e..bb893f5bde 100644 --- a/src/lib/libcrypto/evp/p_sign.c +++ b/src/lib/libcrypto/evp/p_sign.c | |||
| @@ -81,7 +81,7 @@ int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen, | |||
| 81 | unsigned char m[EVP_MAX_MD_SIZE]; | 81 | unsigned char m[EVP_MAX_MD_SIZE]; |
| 82 | unsigned int m_len; | 82 | unsigned int m_len; |
| 83 | int i,ok=0,v; | 83 | int i,ok=0,v; |
| 84 | MS_STATIC EVP_MD_CTX tmp_ctx; | 84 | EVP_MD_CTX tmp_ctx; |
| 85 | 85 | ||
| 86 | *siglen=0; | 86 | *siglen=0; |
| 87 | EVP_MD_CTX_init(&tmp_ctx); | 87 | EVP_MD_CTX_init(&tmp_ctx); |
diff --git a/src/lib/libcrypto/evp/p_verify.c b/src/lib/libcrypto/evp/p_verify.c index 8db46412f3..41d4b67130 100644 --- a/src/lib/libcrypto/evp/p_verify.c +++ b/src/lib/libcrypto/evp/p_verify.c | |||
| @@ -68,7 +68,7 @@ int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf, | |||
| 68 | unsigned char m[EVP_MAX_MD_SIZE]; | 68 | unsigned char m[EVP_MAX_MD_SIZE]; |
| 69 | unsigned int m_len; | 69 | unsigned int m_len; |
| 70 | int i,ok=0,v; | 70 | int i,ok=0,v; |
| 71 | MS_STATIC EVP_MD_CTX tmp_ctx; | 71 | EVP_MD_CTX tmp_ctx; |
| 72 | 72 | ||
| 73 | EVP_MD_CTX_init(&tmp_ctx); | 73 | EVP_MD_CTX_init(&tmp_ctx); |
| 74 | EVP_MD_CTX_copy_ex(&tmp_ctx,ctx); | 74 | EVP_MD_CTX_copy_ex(&tmp_ctx,ctx); |
diff --git a/src/lib/libcrypto/evp/pmeth_lib.c b/src/lib/libcrypto/evp/pmeth_lib.c index b2d8de3a8d..5481d4b8a5 100644 --- a/src/lib/libcrypto/evp/pmeth_lib.c +++ b/src/lib/libcrypto/evp/pmeth_lib.c | |||
| @@ -134,6 +134,8 @@ static EVP_PKEY_CTX *int_ctx_new(EVP_PKEY *pkey, ENGINE *e, int id) | |||
| 134 | id = pkey->ameth->pkey_id; | 134 | id = pkey->ameth->pkey_id; |
| 135 | } | 135 | } |
| 136 | #ifndef OPENSSL_NO_ENGINE | 136 | #ifndef OPENSSL_NO_ENGINE |
| 137 | if (pkey && pkey->engine) | ||
| 138 | e = pkey->engine; | ||
| 137 | /* Try to find an ENGINE which implements this method */ | 139 | /* Try to find an ENGINE which implements this method */ |
| 138 | if (e) | 140 | if (e) |
| 139 | { | 141 | { |
