[openssl-commits] [openssl] master update

Rich Salz rsalz at openssl.org
Mon Feb 8 14:21:30 UTC 2016


The branch master has been updated
       via  895ffe41c2c7ed11f2362cbc59ed7070a4f1fe10 (commit)
      from  b00387a0a3cc9e340915eeb878e5b45bbb9f1ccd (commit)


- Log -----------------------------------------------------------------
commit 895ffe41c2c7ed11f2362cbc59ed7070a4f1fe10
Author: Rich Salz <rsalz at akamai.com>
Date:   Sat Feb 6 13:57:21 2016 -0500

    GH322 revisited: remove unused function.
    
    Reviewed-by: Viktor Dukhovni <viktor at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 crypto/dsa/dsa_gen.c  | 36 ------------------------------------
 crypto/dsa/dsa_locl.h |  2 --
 2 files changed, 38 deletions(-)

diff --git a/crypto/dsa/dsa_gen.c b/crypto/dsa/dsa_gen.c
index c36aa15..15d5116 100644
--- a/crypto/dsa/dsa_gen.c
+++ b/crypto/dsa/dsa_gen.c
@@ -642,39 +642,3 @@ int dsa_builtin_paramgen2(DSA *ret, size_t L, size_t N,
     EVP_MD_CTX_free(mctx);
     return ok;
 }
-
-int dsa_paramgen_check_g(DSA *dsa)
-{
-    BN_CTX *ctx;
-    BIGNUM *tmp;
-    BN_MONT_CTX *mont = NULL;
-    int rv = -1;
-    ctx = BN_CTX_new();
-    if (ctx == NULL)
-        return -1;
-    BN_CTX_start(ctx);
-    if (BN_cmp(dsa->g, BN_value_one()) <= 0)
-        return 0;
-    if (BN_cmp(dsa->g, dsa->p) >= 0)
-        return 0;
-    tmp = BN_CTX_get(ctx);
-    if (!tmp)
-        goto err;
-    if ((mont = BN_MONT_CTX_new()) == NULL)
-        goto err;
-    if (!BN_MONT_CTX_set(mont, dsa->p, ctx))
-        goto err;
-    /* Work out g^q mod p */
-    if (!BN_mod_exp_mont(tmp, dsa->g, dsa->q, dsa->p, ctx, mont))
-        goto err;
-    if (!BN_cmp(tmp, BN_value_one()))
-        rv = 1;
-    else
-        rv = 0;
- err:
-    BN_CTX_end(ctx);
-    BN_MONT_CTX_free(mont);
-    BN_CTX_free(ctx);
-    return rv;
-
-}
diff --git a/crypto/dsa/dsa_locl.h b/crypto/dsa/dsa_locl.h
index 9c23c3e..6182495 100644
--- a/crypto/dsa/dsa_locl.h
+++ b/crypto/dsa/dsa_locl.h
@@ -65,5 +65,3 @@ int dsa_builtin_paramgen2(DSA *ret, size_t L, size_t N,
                           size_t seed_len, int idx, unsigned char *seed_out,
                           int *counter_ret, unsigned long *h_ret,
                           BN_GENCB *cb);
-
-int dsa_paramgen_check_g(DSA *dsa);


More information about the openssl-commits mailing list