summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/a_bitstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/asn1/a_bitstr.c')
-rw-r--r--src/lib/libcrypto/asn1/a_bitstr.c13
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}
82LCRYPTO_ALIAS(ASN1_BIT_STRING_new);
82 83
83void 84void
84ASN1_BIT_STRING_free(ASN1_BIT_STRING *a) 85ASN1_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}
89LCRYPTO_ALIAS(ASN1_BIT_STRING_free);
88 90
89static void 91static void
90asn1_abs_clear_unused_bits(ASN1_BIT_STRING *abs) 92asn1_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}
115LCRYPTO_ALIAS(ASN1_BIT_STRING_set);
113 116
114int 117int
115ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value) 118ASN1_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}
150LCRYPTO_ALIAS(ASN1_BIT_STRING_set_bit);
147 151
148int 152int
149ASN1_BIT_STRING_get_bit(const ASN1_BIT_STRING *a, int n) 153ASN1_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}
163LCRYPTO_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}
190LCRYPTO_ALIAS(ASN1_BIT_STRING_check);
185 191
186int 192int
187ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs, 193ASN1_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}
211LCRYPTO_ALIAS(ASN1_BIT_STRING_name_print);
205 212
206int 213int
207ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, const char *name, int value, 214ASN1_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}
228LCRYPTO_ALIAS(ASN1_BIT_STRING_set_asc);
221 229
222int 230int
223ASN1_BIT_STRING_num_asc(const char *name, BIT_STRING_BITNAME *tbl) 231ASN1_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}
242LCRYPTO_ALIAS(ASN1_BIT_STRING_num_asc);
234 243
235int 244int
236i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp) 245i2c_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}
400LCRYPTO_ALIAS(i2d_ASN1_BIT_STRING);
391 401
392ASN1_BIT_STRING * 402ASN1_BIT_STRING *
393d2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, const unsigned char **in, long len) 403d2i_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}
408LCRYPTO_ALIAS(d2i_ASN1_BIT_STRING);