]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_apple_csp/open_ssl/bn/bn_prime.c
Security-57740.1.18.tar.gz
[apple/security.git] / OSX / libsecurity_apple_csp / open_ssl / bn / bn_prime.c
index 837300796ac935842cedb764550d411c0164d928..0f65ff3b7f040ba427fa32ba2dc2f343db47aacd 100644 (file)
@@ -157,6 +157,8 @@ BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe, BIGNUM *add,
        BN_CTX *ctx;
        int checks = BN_prime_checks_for_size(bits);
 
+    BN_init(&t);
+
        ctx=BN_CTX_new();
        if (ctx == NULL) goto err;
        if (ret == NULL)
@@ -165,8 +167,7 @@ BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe, BIGNUM *add,
                }
        else
                rnd=ret;
-       BN_init(&t);
-loop: 
+loop:
        /* make a random number and set the top and bottom bits */
        if (add == NULL)
                {