summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/evp')
-rw-r--r--src/lib/libcrypto/evp/encode.c3
-rw-r--r--src/lib/libcrypto/evp/evp_enc.c1
-rw-r--r--src/lib/libcrypto/evp/evp_test.c1
-rw-r--r--src/lib/libcrypto/evp/p_lib.c3
-rw-r--r--src/lib/libcrypto/evp/p_sign.c2
-rw-r--r--src/lib/libcrypto/evp/p_verify.c2
6 files changed, 8 insertions, 4 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)
235int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, 235int 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/evp_test.c b/src/lib/libcrypto/evp/evp_test.c
index 902efac975..55c7cdfdcc 100644
--- a/src/lib/libcrypto/evp/evp_test.c
+++ b/src/lib/libcrypto/evp/evp_test.c
@@ -435,6 +435,7 @@ int main(int argc,char **argv)
435 EXIT(3); 435 EXIT(3);
436 } 436 }
437 } 437 }
438 fclose(f);
438 439
439#ifndef OPENSSL_NO_ENGINE 440#ifndef OPENSSL_NO_ENGINE
440 ENGINE_cleanup(); 441 ENGINE_cleanup();
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)
411static void EVP_PKEY_free_it(EVP_PKEY *x) 411static 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);