Remove the get_rfc*_prime_*() API
authortb <tb@openbsd.org>
Fri, 28 Jul 2023 10:07:30 +0000 (10:07 +0000)
committertb <tb@openbsd.org>
Fri, 28 Jul 2023 10:07:30 +0000 (10:07 +0000)
Inconsistently named with the rest of the API, so OpenSSL 1.1 introduced
the same functions with a BN_ prefix. We'll keep the latter.

ok jsing

lib/libcrypto/Symbols.list
lib/libcrypto/Symbols.namespace
lib/libcrypto/bn/bn.h
lib/libcrypto/bn/bn_const.c
lib/libcrypto/hidden/openssl/bn.h

index cac1557..9f27a69 100644 (file)
@@ -3435,14 +3435,6 @@ d2i_X509_SIG
 d2i_X509_VAL
 d2i_X509_bio
 d2i_X509_fp
-get_rfc2409_prime_1024
-get_rfc2409_prime_768
-get_rfc3526_prime_1536
-get_rfc3526_prime_2048
-get_rfc3526_prime_3072
-get_rfc3526_prime_4096
-get_rfc3526_prime_6144
-get_rfc3526_prime_8192
 hex_to_string
 i2a_ACCESS_DESCRIPTION
 i2a_ASN1_ENUMERATED
index a58eb0b..e669cc8 100644 (file)
@@ -2293,16 +2293,8 @@ _libre_BN_MONT_CTX_free
 _libre_BN_MONT_CTX_set
 _libre_BN_MONT_CTX_copy
 _libre_BN_MONT_CTX_set_locked
-_libre_get_rfc2409_prime_768
-_libre_get_rfc2409_prime_1024
 _libre_BN_get_rfc2409_prime_768
 _libre_BN_get_rfc2409_prime_1024
-_libre_get_rfc3526_prime_1536
-_libre_get_rfc3526_prime_2048
-_libre_get_rfc3526_prime_3072
-_libre_get_rfc3526_prime_4096
-_libre_get_rfc3526_prime_6144
-_libre_get_rfc3526_prime_8192
 _libre_BN_get_rfc3526_prime_1536
 _libre_BN_get_rfc3526_prime_2048
 _libre_BN_get_rfc3526_prime_3072
index 689196c..62c85d1 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: bn.h,v 1.73 2023/07/28 10:05:16 tb Exp $ */
+/* $OpenBSD: bn.h,v 1.74 2023/07/28 10:07:30 tb Exp $ */
 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -450,18 +450,10 @@ BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, int lock,
     const BIGNUM *mod, BN_CTX *ctx);
 
 /* Primes from RFC 2409 */
-BIGNUM *get_rfc2409_prime_768(BIGNUM *bn);
-BIGNUM *get_rfc2409_prime_1024(BIGNUM *bn);
 BIGNUM *BN_get_rfc2409_prime_768(BIGNUM *bn);
 BIGNUM *BN_get_rfc2409_prime_1024(BIGNUM *bn);
 
 /* Primes from RFC 3526 */
-BIGNUM *get_rfc3526_prime_1536(BIGNUM *bn);
-BIGNUM *get_rfc3526_prime_2048(BIGNUM *bn);
-BIGNUM *get_rfc3526_prime_3072(BIGNUM *bn);
-BIGNUM *get_rfc3526_prime_4096(BIGNUM *bn);
-BIGNUM *get_rfc3526_prime_6144(BIGNUM *bn);
-BIGNUM *get_rfc3526_prime_8192(BIGNUM *bn);
 BIGNUM *BN_get_rfc3526_prime_1536(BIGNUM *bn);
 BIGNUM *BN_get_rfc3526_prime_2048(BIGNUM *bn);
 BIGNUM *BN_get_rfc3526_prime_3072(BIGNUM *bn);
index b204eb0..bf684c8 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: bn_const.c,v 1.7 2023/07/10 03:26:30 tb Exp $ */
+/* $OpenBSD: bn_const.c,v 1.8 2023/07/28 10:07:30 tb Exp $ */
 /* Insert boilerplate */
 
 #include <openssl/bn.h>
@@ -23,13 +23,6 @@ static const unsigned char RFC2409_PRIME_768[] = {
        0xA6, 0x3A, 0x36, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
 };
 
-BIGNUM *
-get_rfc2409_prime_768(BIGNUM *bn)
-{
-       return BN_bin2bn(RFC2409_PRIME_768, sizeof(RFC2409_PRIME_768), bn);
-}
-LCRYPTO_ALIAS(get_rfc2409_prime_768);
-
 BIGNUM *
 BN_get_rfc2409_prime_768(BIGNUM *bn)
 {
@@ -60,13 +53,6 @@ static const unsigned char RFC2409_PRIME_1024[] = {
        0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
 };
 
-BIGNUM *
-get_rfc2409_prime_1024(BIGNUM *bn)
-{
-       return BN_bin2bn(RFC2409_PRIME_1024, sizeof(RFC2409_PRIME_1024), bn);
-}
-LCRYPTO_ALIAS(get_rfc2409_prime_1024);
-
 BIGNUM *
 BN_get_rfc2409_prime_1024(BIGNUM *bn)
 {
@@ -102,13 +88,6 @@ static const unsigned char RFC3526_PRIME_1536[] = {
        0xCA, 0x23, 0x73, 0x27, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
 };
 
-BIGNUM *
-get_rfc3526_prime_1536(BIGNUM *bn)
-{
-       return BN_bin2bn(RFC3526_PRIME_1536, sizeof(RFC3526_PRIME_1536), bn);
-}
-LCRYPTO_ALIAS(get_rfc3526_prime_1536);
-
 BIGNUM *
 BN_get_rfc3526_prime_1536(BIGNUM *bn)
 {
@@ -149,13 +128,6 @@ static const unsigned char RFC3526_PRIME_2048[] = {
        0xFF, 0xFF, 0xFF, 0xFF,
 };
 
-BIGNUM *
-get_rfc3526_prime_2048(BIGNUM *bn)
-{
-       return BN_bin2bn(RFC3526_PRIME_2048, sizeof(RFC3526_PRIME_2048), bn);
-}
-LCRYPTO_ALIAS(get_rfc3526_prime_2048);
-
 BIGNUM *
 BN_get_rfc3526_prime_2048(BIGNUM *bn)
 {
@@ -206,13 +178,6 @@ static const unsigned char RFC3526_PRIME_3072[] = {
        0xA9, 0x3A, 0xD2, 0xCA, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
 };
 
-BIGNUM *
-get_rfc3526_prime_3072(BIGNUM *bn)
-{
-       return BN_bin2bn(RFC3526_PRIME_3072, sizeof(RFC3526_PRIME_3072), bn);
-}
-LCRYPTO_ALIAS(get_rfc3526_prime_3072);
-
 BIGNUM *
 BN_get_rfc3526_prime_3072(BIGNUM *bn)
 {
@@ -274,13 +239,6 @@ static const unsigned char RFC3526_PRIME_4096[] = {
        0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
 };
 
-BIGNUM *
-get_rfc3526_prime_4096(BIGNUM *bn)
-{
-       return BN_bin2bn(RFC3526_PRIME_4096, sizeof(RFC3526_PRIME_4096), bn);
-}
-LCRYPTO_ALIAS(get_rfc3526_prime_4096);
-
 BIGNUM *
 BN_get_rfc3526_prime_4096(BIGNUM *bn)
 {
@@ -363,13 +321,6 @@ static const unsigned char RFC3526_PRIME_6144[] = {
        0x6D, 0xCC, 0x40, 0x24, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
 };
 
-BIGNUM *
-get_rfc3526_prime_6144(BIGNUM *bn)
-{
-       return BN_bin2bn(RFC3526_PRIME_6144, sizeof(RFC3526_PRIME_6144), bn);
-}
-LCRYPTO_ALIAS(get_rfc3526_prime_6144);
-
 BIGNUM *
 BN_get_rfc3526_prime_6144(BIGNUM *bn)
 {
@@ -474,13 +425,6 @@ static const unsigned char RFC3526_PRIME_8192[] = {
        0xFF, 0xFF, 0xFF, 0xFF,
 };
 
-BIGNUM *
-get_rfc3526_prime_8192(BIGNUM *bn)
-{
-       return BN_bin2bn(RFC3526_PRIME_8192, sizeof(RFC3526_PRIME_8192), bn);
-}
-LCRYPTO_ALIAS(get_rfc3526_prime_8192);
-
 BIGNUM *
 BN_get_rfc3526_prime_8192(BIGNUM *bn)
 {
index d58bd10..cf3d476 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: bn.h,v 1.2 2023/07/28 10:05:16 tb Exp $ */
+/* $OpenBSD: bn.h,v 1.3 2023/07/28 10:07:30 tb Exp $ */
 /*
  * Copyright (c) 2023 Bob Beck <beck@openbsd.org>
  *
@@ -131,16 +131,8 @@ LCRYPTO_USED(BN_MONT_CTX_free);
 LCRYPTO_USED(BN_MONT_CTX_set);
 LCRYPTO_USED(BN_MONT_CTX_copy);
 LCRYPTO_USED(BN_MONT_CTX_set_locked);
-LCRYPTO_USED(get_rfc2409_prime_768);
-LCRYPTO_USED(get_rfc2409_prime_1024);
 LCRYPTO_USED(BN_get_rfc2409_prime_768);
 LCRYPTO_USED(BN_get_rfc2409_prime_1024);
-LCRYPTO_USED(get_rfc3526_prime_1536);
-LCRYPTO_USED(get_rfc3526_prime_2048);
-LCRYPTO_USED(get_rfc3526_prime_3072);
-LCRYPTO_USED(get_rfc3526_prime_4096);
-LCRYPTO_USED(get_rfc3526_prime_6144);
-LCRYPTO_USED(get_rfc3526_prime_8192);
 LCRYPTO_USED(BN_get_rfc3526_prime_1536);
 LCRYPTO_USED(BN_get_rfc3526_prime_2048);
 LCRYPTO_USED(BN_get_rfc3526_prime_3072);