diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/a_bitstr.c')
| -rw-r--r-- | src/lib/libcrypto/asn1/a_bitstr.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/libcrypto/asn1/a_bitstr.c b/src/lib/libcrypto/asn1/a_bitstr.c index 767055144d..8076723de8 100644 --- a/src/lib/libcrypto/asn1/a_bitstr.c +++ b/src/lib/libcrypto/asn1/a_bitstr.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: a_bitstr.c,v 1.38 2023/01/13 14:46:08 tb Exp $ */ | 1 | /* $OpenBSD: a_bitstr.c,v 1.39 2023/07/05 21:23:36 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -79,12 +79,14 @@ ASN1_BIT_STRING_new(void) | |||
| 79 | { | 79 | { |
| 80 | return (ASN1_BIT_STRING *)ASN1_item_new(&ASN1_BIT_STRING_it); | 80 | return (ASN1_BIT_STRING *)ASN1_item_new(&ASN1_BIT_STRING_it); |
| 81 | } | 81 | } |
| 82 | LCRYPTO_ALIAS(ASN1_BIT_STRING_new); | ||
| 82 | 83 | ||
| 83 | void | 84 | void |
| 84 | ASN1_BIT_STRING_free(ASN1_BIT_STRING *a) | 85 | ASN1_BIT_STRING_free(ASN1_BIT_STRING *a) |
| 85 | { | 86 | { |
| 86 | ASN1_item_free((ASN1_VALUE *)a, &ASN1_BIT_STRING_it); | 87 | ASN1_item_free((ASN1_VALUE *)a, &ASN1_BIT_STRING_it); |
| 87 | } | 88 | } |
| 89 | LCRYPTO_ALIAS(ASN1_BIT_STRING_free); | ||
| 88 | 90 | ||
| 89 | static void | 91 | static void |
| 90 | asn1_abs_clear_unused_bits(ASN1_BIT_STRING *abs) | 92 | asn1_abs_clear_unused_bits(ASN1_BIT_STRING *abs) |
| @@ -110,6 +112,7 @@ ASN1_BIT_STRING_set(ASN1_BIT_STRING *x, unsigned char *d, int len) | |||
| 110 | { | 112 | { |
| 111 | return ASN1_STRING_set(x, d, len); | 113 | return ASN1_STRING_set(x, d, len); |
| 112 | } | 114 | } |
| 115 | LCRYPTO_ALIAS(ASN1_BIT_STRING_set); | ||
| 113 | 116 | ||
| 114 | int | 117 | int |
| 115 | ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value) | 118 | ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value) |
| @@ -144,6 +147,7 @@ ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value) | |||
| 144 | 147 | ||
| 145 | return (1); | 148 | return (1); |
| 146 | } | 149 | } |
| 150 | LCRYPTO_ALIAS(ASN1_BIT_STRING_set_bit); | ||
| 147 | 151 | ||
| 148 | int | 152 | int |
| 149 | ASN1_BIT_STRING_get_bit(const ASN1_BIT_STRING *a, int n) | 153 | ASN1_BIT_STRING_get_bit(const ASN1_BIT_STRING *a, int n) |
| @@ -156,6 +160,7 @@ ASN1_BIT_STRING_get_bit(const ASN1_BIT_STRING *a, int n) | |||
| 156 | return (0); | 160 | return (0); |
| 157 | return ((a->data[w] & v) != 0); | 161 | return ((a->data[w] & v) != 0); |
| 158 | } | 162 | } |
| 163 | LCRYPTO_ALIAS(ASN1_BIT_STRING_get_bit); | ||
| 159 | 164 | ||
| 160 | /* | 165 | /* |
| 161 | * Checks if the given bit string contains only bits specified by | 166 | * Checks if the given bit string contains only bits specified by |
| @@ -182,6 +187,7 @@ ASN1_BIT_STRING_check(const ASN1_BIT_STRING *a, const unsigned char *flags, | |||
| 182 | } | 187 | } |
| 183 | return ok; | 188 | return ok; |
| 184 | } | 189 | } |
| 190 | LCRYPTO_ALIAS(ASN1_BIT_STRING_check); | ||
| 185 | 191 | ||
| 186 | int | 192 | int |
| 187 | ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs, | 193 | ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs, |
| @@ -202,6 +208,7 @@ ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs, | |||
| 202 | BIO_puts(out, "\n"); | 208 | BIO_puts(out, "\n"); |
| 203 | return 1; | 209 | return 1; |
| 204 | } | 210 | } |
| 211 | LCRYPTO_ALIAS(ASN1_BIT_STRING_name_print); | ||
| 205 | 212 | ||
| 206 | int | 213 | int |
| 207 | ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, const char *name, int value, | 214 | ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, const char *name, int value, |
| @@ -218,6 +225,7 @@ ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, const char *name, int value, | |||
| 218 | } | 225 | } |
| 219 | return 1; | 226 | return 1; |
| 220 | } | 227 | } |
| 228 | LCRYPTO_ALIAS(ASN1_BIT_STRING_set_asc); | ||
| 221 | 229 | ||
| 222 | int | 230 | int |
| 223 | ASN1_BIT_STRING_num_asc(const char *name, BIT_STRING_BITNAME *tbl) | 231 | ASN1_BIT_STRING_num_asc(const char *name, BIT_STRING_BITNAME *tbl) |
| @@ -231,6 +239,7 @@ ASN1_BIT_STRING_num_asc(const char *name, BIT_STRING_BITNAME *tbl) | |||
| 231 | } | 239 | } |
| 232 | return -1; | 240 | return -1; |
| 233 | } | 241 | } |
| 242 | LCRYPTO_ALIAS(ASN1_BIT_STRING_num_asc); | ||
| 234 | 243 | ||
| 235 | int | 244 | int |
| 236 | i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp) | 245 | i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp) |
| @@ -388,6 +397,7 @@ i2d_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **out) | |||
| 388 | { | 397 | { |
| 389 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &ASN1_BIT_STRING_it); | 398 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &ASN1_BIT_STRING_it); |
| 390 | } | 399 | } |
| 400 | LCRYPTO_ALIAS(i2d_ASN1_BIT_STRING); | ||
| 391 | 401 | ||
| 392 | ASN1_BIT_STRING * | 402 | ASN1_BIT_STRING * |
| 393 | d2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, const unsigned char **in, long len) | 403 | d2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, const unsigned char **in, long len) |
| @@ -395,3 +405,4 @@ d2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, const unsigned char **in, long len) | |||
| 395 | return (ASN1_BIT_STRING *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | 405 | return (ASN1_BIT_STRING *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, |
| 396 | &ASN1_BIT_STRING_it); | 406 | &ASN1_BIT_STRING_it); |
| 397 | } | 407 | } |
| 408 | LCRYPTO_ALIAS(d2i_ASN1_BIT_STRING); | ||
