]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Remove the unused crypto_ec_cofactor() function
authorJouni Malinen <j@w1.fi>
Sat, 13 Apr 2019 14:33:15 +0000 (17:33 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 13 Apr 2019 15:28:05 +0000 (18:28 +0300)
All users of this wrapper function were removed, so the wrapper can be
removed as well.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/crypto/crypto.h
src/crypto/crypto_openssl.c
src/crypto/crypto_wolfssl.c

index a28ddbd719d66cb440553f3232331e1c53485e64..12109ce83a9adbfaa4c69c42e793ad4dd018b1ea 100644 (file)
@@ -703,14 +703,6 @@ struct crypto_ec * crypto_ec_init(int group);
  */
 void crypto_ec_deinit(struct crypto_ec *e);
 
-/**
- * crypto_ec_cofactor - Set the cofactor into the big number
- * @e: EC context from crypto_ec_init()
- * @cofactor: Cofactor of curve.
- * Returns: 0 on success, -1 on failure
- */
-int crypto_ec_cofactor(struct crypto_ec *e, struct crypto_bignum *cofactor);
-
 /**
  * crypto_ec_prime_len - Get length of the prime in octets
  * @e: EC context from crypto_ec_init()
index 27e68f739f439091ff6cbd1fbdb0d9579627f358..1b0c1ec96b36cadda4158dda6ad447419a7e9466 100644 (file)
@@ -1636,13 +1636,6 @@ void crypto_ec_deinit(struct crypto_ec *e)
 }
 
 
-int crypto_ec_cofactor(struct crypto_ec *e, struct crypto_bignum *cofactor)
-{
-       return EC_GROUP_get_cofactor(e->group, (BIGNUM *) cofactor,
-                                    e->bnctx) == 0 ? -1 : 0;
-}
-
-
 struct crypto_ec_point * crypto_ec_point_init(struct crypto_ec *e)
 {
        if (TEST_FAIL())
index 6b2ac8c433d51d65338a44bbdca3de80ee57e880..976a008651b75202fba14ec0ef67cded9803dc29 100644 (file)
@@ -1352,16 +1352,6 @@ void crypto_ec_deinit(struct crypto_ec* e)
 }
 
 
-int crypto_ec_cofactor(struct crypto_ec *e, struct crypto_bignum *cofactor)
-{
-       if (!e || !cofactor)
-               return -1;
-
-       mp_set((mp_int *) cofactor, e->key.dp->cofactor);
-       return 0;
-}
-
-
 struct crypto_ec_point * crypto_ec_point_init(struct crypto_ec *e)
 {
        if (TEST_FAIL())