This removes ASN1_BIT_STRING_name_print(), ASN1_BIT_STRING_{num,set}_asc().
Before trust was properly handled using OIDs, there was a period where it
used bit strings. The actual interfaces used in openssl x509 were removed,
but the functions they wrapped remained unused for the next 24 years.
ok jsing
ASN1_BIT_STRING_free
ASN1_BIT_STRING_get_bit
ASN1_BIT_STRING_it
-ASN1_BIT_STRING_name_print
ASN1_BIT_STRING_new
-ASN1_BIT_STRING_num_asc
ASN1_BIT_STRING_set
-ASN1_BIT_STRING_set_asc
ASN1_BIT_STRING_set_bit
ASN1_BMPSTRING_free
ASN1_BMPSTRING_it
_libre_ASN1_BIT_STRING_set
_libre_ASN1_BIT_STRING_set_bit
_libre_ASN1_BIT_STRING_get_bit
-_libre_ASN1_BIT_STRING_name_print
-_libre_ASN1_BIT_STRING_num_asc
-_libre_ASN1_BIT_STRING_set_asc
_libre_ASN1_INTEGER_new
_libre_ASN1_INTEGER_free
_libre_d2i_ASN1_INTEGER
-/* $OpenBSD: a_bitstr.c,v 1.40 2023/07/28 10:30:16 tb Exp $ */
+/* $OpenBSD: a_bitstr.c,v 1.41 2023/07/28 10:33:13 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
}
LCRYPTO_ALIAS(ASN1_BIT_STRING_get_bit);
-int
-ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs,
- BIT_STRING_BITNAME *tbl, int indent)
-{
- BIT_STRING_BITNAME *bnam;
- char first = 1;
-
- BIO_printf(out, "%*s", indent, "");
- for (bnam = tbl; bnam->lname; bnam++) {
- if (ASN1_BIT_STRING_get_bit(bs, bnam->bitnum)) {
- if (!first)
- BIO_puts(out, ", ");
- BIO_puts(out, bnam->lname);
- first = 0;
- }
- }
- BIO_puts(out, "\n");
- return 1;
-}
-LCRYPTO_ALIAS(ASN1_BIT_STRING_name_print);
-
-int
-ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, const char *name, int value,
- BIT_STRING_BITNAME *tbl)
-{
- int bitnum;
-
- bitnum = ASN1_BIT_STRING_num_asc(name, tbl);
- if (bitnum < 0)
- return 0;
- if (bs) {
- if (!ASN1_BIT_STRING_set_bit(bs, bitnum, value))
- return 0;
- }
- return 1;
-}
-LCRYPTO_ALIAS(ASN1_BIT_STRING_set_asc);
-
-int
-ASN1_BIT_STRING_num_asc(const char *name, BIT_STRING_BITNAME *tbl)
-{
- BIT_STRING_BITNAME *bnam;
-
- for (bnam = tbl; bnam->lname; bnam++) {
- if (!strcmp(bnam->sname, name) ||
- !strcmp(bnam->lname, name))
- return bnam->bitnum;
- }
- return -1;
-}
-LCRYPTO_ALIAS(ASN1_BIT_STRING_num_asc);
-
int
i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp)
{
-/* $OpenBSD: asn1.h,v 1.79 2023/07/28 10:30:16 tb Exp $ */
+/* $OpenBSD: asn1.h,v 1.80 2023/07/28 10:33:13 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value);
int ASN1_BIT_STRING_get_bit(const ASN1_BIT_STRING *a, int n);
-#ifndef OPENSSL_NO_BIO
-int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs,
- BIT_STRING_BITNAME *tbl, int indent);
-#endif
-int ASN1_BIT_STRING_num_asc(const char *name, BIT_STRING_BITNAME *tbl);
-int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, const char *name, int value,
- BIT_STRING_BITNAME *tbl);
-
ASN1_INTEGER *ASN1_INTEGER_new(void);
void ASN1_INTEGER_free(ASN1_INTEGER *a);
ASN1_INTEGER *d2i_ASN1_INTEGER(ASN1_INTEGER **a, const unsigned char **in, long len);
-/* $OpenBSD: asn1.h,v 1.5 2023/07/28 10:30:16 tb Exp $ */
+/* $OpenBSD: asn1.h,v 1.6 2023/07/28 10:33:13 tb Exp $ */
/*
* Copyright (c) 2023 Bob Beck <beck@openbsd.org>
*
LCRYPTO_USED(ASN1_BIT_STRING_set);
LCRYPTO_USED(ASN1_BIT_STRING_set_bit);
LCRYPTO_USED(ASN1_BIT_STRING_get_bit);
-LCRYPTO_USED(ASN1_BIT_STRING_name_print);
-LCRYPTO_USED(ASN1_BIT_STRING_num_asc);
-LCRYPTO_USED(ASN1_BIT_STRING_set_asc);
LCRYPTO_USED(ASN1_INTEGER_new);
LCRYPTO_USED(ASN1_INTEGER_free);
LCRYPTO_USED(d2i_ASN1_INTEGER);