summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto')
-rw-r--r--src/lib/libcrypto/evp/enc_min.c2
-rw-r--r--src/lib/libcrypto/rsa/rsa_x931g.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/evp/enc_min.c b/src/lib/libcrypto/evp/enc_min.c
index 3cb4626bef..7fba38ee24 100644
--- a/src/lib/libcrypto/evp/enc_min.c
+++ b/src/lib/libcrypto/evp/enc_min.c
@@ -199,7 +199,7 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *imp
199 enc = 1; 199 enc = 1;
200 ctx->encrypt = enc; 200 ctx->encrypt = enc;
201 } 201 }
202#ifdef OPENSSL_NO_FIPS 202#ifdef OPENSSL_FIPS
203 if(FIPS_selftest_failed()) 203 if(FIPS_selftest_failed())
204 { 204 {
205 FIPSerr(FIPS_F_EVP_CIPHERINIT_EX,FIPS_R_FIPS_SELFTEST_FAILED); 205 FIPSerr(FIPS_F_EVP_CIPHERINIT_EX,FIPS_R_FIPS_SELFTEST_FAILED);
diff --git a/src/lib/libcrypto/rsa/rsa_x931g.c b/src/lib/libcrypto/rsa/rsa_x931g.c
index c640cc2ec9..bf94f8be7a 100644
--- a/src/lib/libcrypto/rsa/rsa_x931g.c
+++ b/src/lib/libcrypto/rsa/rsa_x931g.c
@@ -79,9 +79,9 @@ int RSA_X931_derive_ex(RSA *rsa, BIGNUM *p1, BIGNUM *p2, BIGNUM *q1, BIGNUM *q2,
79 goto err; 79 goto err;
80 80
81 ctx = BN_CTX_new(); 81 ctx = BN_CTX_new();
82 BN_CTX_start(ctx);
83 if (!ctx) 82 if (!ctx)
84 goto err; 83 goto err;
84 BN_CTX_start(ctx);
85 85
86 r0 = BN_CTX_get(ctx); 86 r0 = BN_CTX_get(ctx);
87 r1 = BN_CTX_get(ctx); 87 r1 = BN_CTX_get(ctx);
@@ -190,7 +190,7 @@ int RSA_X931_derive_ex(RSA *rsa, BIGNUM *p1, BIGNUM *p2, BIGNUM *q1, BIGNUM *q2,
190 if (ctx2) 190 if (ctx2)
191 BN_CTX_free(ctx2); 191 BN_CTX_free(ctx2);
192 /* If this is set all calls successful */ 192 /* If this is set all calls successful */
193 if (rsa->iqmp != NULL) 193 if (rsa && rsa->iqmp != NULL)
194 return 1; 194 return 1;
195 195
196 return 0; 196 return 0;