More X9.62 stuff was never used outside of ec_asn1.c
authortb <tb@openbsd.org>
Mon, 15 Apr 2024 15:46:29 +0000 (15:46 +0000)
committertb <tb@openbsd.org>
Mon, 15 Apr 2024 15:46:29 +0000 (15:46 +0000)
We only need the ASN.1 items.

ok jsing

lib/libcrypto/Symbols.list
lib/libcrypto/ec/ec_asn1.c

index ff90316..32100a8 100644 (file)
@@ -2911,14 +2911,6 @@ X509v3_get_ext_by_NID
 X509v3_get_ext_by_OBJ
 X509v3_get_ext_by_critical
 X509v3_get_ext_count
-X9_62_CHARACTERISTIC_TWO_free
-X9_62_CHARACTERISTIC_TWO_it
-X9_62_CHARACTERISTIC_TWO_new
-X9_62_CURVE_it
-X9_62_FIELDID_it
-X9_62_PENTANOMIAL_free
-X9_62_PENTANOMIAL_it
-X9_62_PENTANOMIAL_new
 ZLONG_it
 _CONF_add_string
 _CONF_free_data
index c1aedb4..3bb550d 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ec_asn1.c,v 1.51 2024/04/15 15:44:15 tb Exp $ */
+/* $OpenBSD: ec_asn1.c,v 1.52 2024/04/15 15:46:29 tb Exp $ */
 /*
  * Written by Nils Larsch for the OpenSSL project.
  */
@@ -167,7 +167,7 @@ static const ASN1_TEMPLATE X9_62_PENTANOMIAL_seq_tt[] = {
        },
 };
 
-const ASN1_ITEM X9_62_PENTANOMIAL_it = {
+static const ASN1_ITEM X9_62_PENTANOMIAL_it = {
        .itype = ASN1_ITYPE_SEQUENCE,
        .utype = V_ASN1_SEQUENCE,
        .templates = X9_62_PENTANOMIAL_seq_tt,
@@ -177,21 +177,6 @@ const ASN1_ITEM X9_62_PENTANOMIAL_it = {
        .sname = "X9_62_PENTANOMIAL",
 };
 
-X9_62_PENTANOMIAL *X9_62_PENTANOMIAL_new(void);
-void X9_62_PENTANOMIAL_free(X9_62_PENTANOMIAL *a);
-
-X9_62_PENTANOMIAL *
-X9_62_PENTANOMIAL_new(void)
-{
-       return (X9_62_PENTANOMIAL*)ASN1_item_new(&X9_62_PENTANOMIAL_it);
-}
-
-void
-X9_62_PENTANOMIAL_free(X9_62_PENTANOMIAL *a)
-{
-       ASN1_item_free((ASN1_VALUE *)a, &X9_62_PENTANOMIAL_it);
-}
-
 static const ASN1_TEMPLATE char_two_def_tt = {
        .flags = 0,
        .tag = 0,
@@ -267,7 +252,7 @@ static const ASN1_TEMPLATE X9_62_CHARACTERISTIC_TWO_seq_tt[] = {
        },
 };
 
-const ASN1_ITEM X9_62_CHARACTERISTIC_TWO_it = {
+static const ASN1_ITEM X9_62_CHARACTERISTIC_TWO_it = {
        .itype = ASN1_ITYPE_SEQUENCE,
        .utype = V_ASN1_SEQUENCE,
        .templates = X9_62_CHARACTERISTIC_TWO_seq_tt,
@@ -277,21 +262,6 @@ const ASN1_ITEM X9_62_CHARACTERISTIC_TWO_it = {
        .sname = "X9_62_CHARACTERISTIC_TWO",
 };
 
-X9_62_CHARACTERISTIC_TWO *X9_62_CHARACTERISTIC_TWO_new(void);
-void X9_62_CHARACTERISTIC_TWO_free(X9_62_CHARACTERISTIC_TWO *a);
-
-X9_62_CHARACTERISTIC_TWO *
-X9_62_CHARACTERISTIC_TWO_new(void)
-{
-       return (X9_62_CHARACTERISTIC_TWO*)ASN1_item_new(&X9_62_CHARACTERISTIC_TWO_it);
-}
-
-void
-X9_62_CHARACTERISTIC_TWO_free(X9_62_CHARACTERISTIC_TWO *a)
-{
-       ASN1_item_free((ASN1_VALUE *)a, &X9_62_CHARACTERISTIC_TWO_it);
-}
-
 static const ASN1_TEMPLATE fieldID_def_tt = {
        .flags = 0,
        .tag = 0,
@@ -349,7 +319,7 @@ static const ASN1_TEMPLATE X9_62_FIELDID_seq_tt[] = {
        },
 };
 
-const ASN1_ITEM X9_62_FIELDID_it = {
+static const ASN1_ITEM X9_62_FIELDID_it = {
        .itype = ASN1_ITYPE_SEQUENCE,
        .utype = V_ASN1_SEQUENCE,
        .templates = X9_62_FIELDID_seq_tt,
@@ -383,7 +353,7 @@ static const ASN1_TEMPLATE X9_62_CURVE_seq_tt[] = {
        },
 };
 
-const ASN1_ITEM X9_62_CURVE_it = {
+static const ASN1_ITEM X9_62_CURVE_it = {
        .itype = ASN1_ITYPE_SEQUENCE,
        .utype = V_ASN1_SEQUENCE,
        .templates = X9_62_CURVE_seq_tt,