Loading crypto/bn/bn_gf2m.c +1 −1 Original line number Diff line number Diff line Loading @@ -574,7 +574,7 @@ int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[], bn_check_top(a); BN_CTX_start(ctx); if ((s = BN_CTX_get(ctx)) == NULL) return 0; goto err; if (!bn_wexpand(s, 2 * a->top)) goto err; Loading crypto/bn/bn_recp.c +3 −1 Original line number Diff line number Diff line Loading @@ -151,8 +151,10 @@ int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, if (BN_ucmp(m, &(recp->N)) < 0) { BN_zero(d); if (!BN_copy(r, m)) if (!BN_copy(r, m)) { BN_CTX_end(ctx); return 0; } BN_CTX_end(ctx); return (1); } Loading crypto/bn/bn_x931p.c +5 −2 Original line number Diff line number Diff line Loading @@ -214,14 +214,14 @@ int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx) * exceeded. */ if (!BN_rand(Xp, nbits, 1, 0)) return 0; goto err; BN_CTX_start(ctx); t = BN_CTX_get(ctx); for (i = 0; i < 1000; i++) { if (!BN_rand(Xq, nbits, 1, 0)) return 0; goto err; /* Check that |Xp - Xq| > 2^(nbits - 100) */ BN_sub(t, Xp, Xq); if (BN_num_bits(t) > (nbits - 100)) Loading @@ -235,6 +235,9 @@ int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx) return 0; err: BN_CTX_end(ctx); return 0; } /* Loading crypto/dsa/dsa_gen.c +3 −3 Original line number Diff line number Diff line Loading @@ -142,14 +142,14 @@ int dsa_builtin_paramgen(DSA *ret, size_t bits, size_t qbits, memcpy(seed, seed_in, seed_len); } if ((mont = BN_MONT_CTX_new()) == NULL) goto err; if ((ctx = BN_CTX_new()) == NULL) goto err; BN_CTX_start(ctx); if ((mont = BN_MONT_CTX_new()) == NULL) goto err; r0 = BN_CTX_get(ctx); g = BN_CTX_get(ctx); W = BN_CTX_get(ctx); Loading crypto/evp/evp_key.c +2 −2 Original line number Diff line number Diff line Loading @@ -137,7 +137,7 @@ int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md, EVP_MD_CTX_init(&c); for (;;) { if (!EVP_DigestInit_ex(&c, md, NULL)) return 0; goto err; if (addmd++) if (!EVP_DigestUpdate(&c, &(md_buf[0]), mds)) goto err; Loading Loading @@ -188,6 +188,6 @@ int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md, rv = type->key_len; err: EVP_MD_CTX_cleanup(&c); OPENSSL_cleanse(&(md_buf[0]), EVP_MAX_MD_SIZE); OPENSSL_cleanse(md_buf, sizeof(md_buf)); return rv; } Loading
crypto/bn/bn_gf2m.c +1 −1 Original line number Diff line number Diff line Loading @@ -574,7 +574,7 @@ int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[], bn_check_top(a); BN_CTX_start(ctx); if ((s = BN_CTX_get(ctx)) == NULL) return 0; goto err; if (!bn_wexpand(s, 2 * a->top)) goto err; Loading
crypto/bn/bn_recp.c +3 −1 Original line number Diff line number Diff line Loading @@ -151,8 +151,10 @@ int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, if (BN_ucmp(m, &(recp->N)) < 0) { BN_zero(d); if (!BN_copy(r, m)) if (!BN_copy(r, m)) { BN_CTX_end(ctx); return 0; } BN_CTX_end(ctx); return (1); } Loading
crypto/bn/bn_x931p.c +5 −2 Original line number Diff line number Diff line Loading @@ -214,14 +214,14 @@ int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx) * exceeded. */ if (!BN_rand(Xp, nbits, 1, 0)) return 0; goto err; BN_CTX_start(ctx); t = BN_CTX_get(ctx); for (i = 0; i < 1000; i++) { if (!BN_rand(Xq, nbits, 1, 0)) return 0; goto err; /* Check that |Xp - Xq| > 2^(nbits - 100) */ BN_sub(t, Xp, Xq); if (BN_num_bits(t) > (nbits - 100)) Loading @@ -235,6 +235,9 @@ int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx) return 0; err: BN_CTX_end(ctx); return 0; } /* Loading
crypto/dsa/dsa_gen.c +3 −3 Original line number Diff line number Diff line Loading @@ -142,14 +142,14 @@ int dsa_builtin_paramgen(DSA *ret, size_t bits, size_t qbits, memcpy(seed, seed_in, seed_len); } if ((mont = BN_MONT_CTX_new()) == NULL) goto err; if ((ctx = BN_CTX_new()) == NULL) goto err; BN_CTX_start(ctx); if ((mont = BN_MONT_CTX_new()) == NULL) goto err; r0 = BN_CTX_get(ctx); g = BN_CTX_get(ctx); W = BN_CTX_get(ctx); Loading
crypto/evp/evp_key.c +2 −2 Original line number Diff line number Diff line Loading @@ -137,7 +137,7 @@ int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md, EVP_MD_CTX_init(&c); for (;;) { if (!EVP_DigestInit_ex(&c, md, NULL)) return 0; goto err; if (addmd++) if (!EVP_DigestUpdate(&c, &(md_buf[0]), mds)) goto err; Loading Loading @@ -188,6 +188,6 @@ int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md, rv = type->key_len; err: EVP_MD_CTX_cleanup(&c); OPENSSL_cleanse(&(md_buf[0]), EVP_MAX_MD_SIZE); OPENSSL_cleanse(md_buf, sizeof(md_buf)); return rv; }