diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/a_string.c')
-rw-r--r-- | src/lib/libcrypto/asn1/a_string.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/lib/libcrypto/asn1/a_string.c b/src/lib/libcrypto/asn1/a_string.c index d0e917b871..bfd2abf2f7 100644 --- a/src/lib/libcrypto/asn1/a_string.c +++ b/src/lib/libcrypto/asn1/a_string.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: a_string.c,v 1.13 2022/11/28 07:50:47 tb Exp $ */ | 1 | /* $OpenBSD: a_string.c,v 1.14 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 | * |
@@ -70,6 +70,7 @@ ASN1_STRING_new(void) | |||
70 | { | 70 | { |
71 | return ASN1_STRING_type_new(V_ASN1_OCTET_STRING); | 71 | return ASN1_STRING_type_new(V_ASN1_OCTET_STRING); |
72 | } | 72 | } |
73 | LCRYPTO_ALIAS(ASN1_STRING_new); | ||
73 | 74 | ||
74 | ASN1_STRING * | 75 | ASN1_STRING * |
75 | ASN1_STRING_type_new(int type) | 76 | ASN1_STRING_type_new(int type) |
@@ -84,6 +85,7 @@ ASN1_STRING_type_new(int type) | |||
84 | 85 | ||
85 | return astr; | 86 | return astr; |
86 | } | 87 | } |
88 | LCRYPTO_ALIAS(ASN1_STRING_type_new); | ||
87 | 89 | ||
88 | static void | 90 | static void |
89 | ASN1_STRING_clear(ASN1_STRING *astr) | 91 | ASN1_STRING_clear(ASN1_STRING *astr) |
@@ -106,6 +108,7 @@ ASN1_STRING_free(ASN1_STRING *astr) | |||
106 | 108 | ||
107 | free(astr); | 109 | free(astr); |
108 | } | 110 | } |
111 | LCRYPTO_ALIAS(ASN1_STRING_free); | ||
109 | 112 | ||
110 | int | 113 | int |
111 | ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b) | 114 | ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b) |
@@ -121,6 +124,7 @@ ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b) | |||
121 | 124 | ||
122 | return (a->type - b->type); | 125 | return (a->type - b->type); |
123 | } | 126 | } |
127 | LCRYPTO_ALIAS(ASN1_STRING_cmp); | ||
124 | 128 | ||
125 | int | 129 | int |
126 | ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *src) | 130 | ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *src) |
@@ -136,6 +140,7 @@ ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *src) | |||
136 | 140 | ||
137 | return 1; | 141 | return 1; |
138 | } | 142 | } |
143 | LCRYPTO_ALIAS(ASN1_STRING_copy); | ||
139 | 144 | ||
140 | ASN1_STRING * | 145 | ASN1_STRING * |
141 | ASN1_STRING_dup(const ASN1_STRING *src) | 146 | ASN1_STRING_dup(const ASN1_STRING *src) |
@@ -153,6 +158,7 @@ ASN1_STRING_dup(const ASN1_STRING *src) | |||
153 | } | 158 | } |
154 | return astr; | 159 | return astr; |
155 | } | 160 | } |
161 | LCRYPTO_ALIAS(ASN1_STRING_dup); | ||
156 | 162 | ||
157 | int | 163 | int |
158 | ASN1_STRING_set(ASN1_STRING *astr, const void *_data, int len) | 164 | ASN1_STRING_set(ASN1_STRING *astr, const void *_data, int len) |
@@ -189,6 +195,7 @@ ASN1_STRING_set(ASN1_STRING *astr, const void *_data, int len) | |||
189 | 195 | ||
190 | return 1; | 196 | return 1; |
191 | } | 197 | } |
198 | LCRYPTO_ALIAS(ASN1_STRING_set); | ||
192 | 199 | ||
193 | void | 200 | void |
194 | ASN1_STRING_set0(ASN1_STRING *astr, void *data, int len) | 201 | ASN1_STRING_set0(ASN1_STRING *astr, void *data, int len) |
@@ -198,12 +205,14 @@ ASN1_STRING_set0(ASN1_STRING *astr, void *data, int len) | |||
198 | astr->data = data; | 205 | astr->data = data; |
199 | astr->length = len; | 206 | astr->length = len; |
200 | } | 207 | } |
208 | LCRYPTO_ALIAS(ASN1_STRING_set0); | ||
201 | 209 | ||
202 | int | 210 | int |
203 | ASN1_STRING_length(const ASN1_STRING *astr) | 211 | ASN1_STRING_length(const ASN1_STRING *astr) |
204 | { | 212 | { |
205 | return astr->length; | 213 | return astr->length; |
206 | } | 214 | } |
215 | LCRYPTO_ALIAS(ASN1_STRING_length); | ||
207 | 216 | ||
208 | void | 217 | void |
209 | ASN1_STRING_length_set(ASN1_STRING *astr, int len) | 218 | ASN1_STRING_length_set(ASN1_STRING *astr, int len) |
@@ -211,24 +220,28 @@ ASN1_STRING_length_set(ASN1_STRING *astr, int len) | |||
211 | /* This is dangerous and unfixable. */ | 220 | /* This is dangerous and unfixable. */ |
212 | astr->length = len; | 221 | astr->length = len; |
213 | } | 222 | } |
223 | LCRYPTO_ALIAS(ASN1_STRING_length_set); | ||
214 | 224 | ||
215 | int | 225 | int |
216 | ASN1_STRING_type(const ASN1_STRING *astr) | 226 | ASN1_STRING_type(const ASN1_STRING *astr) |
217 | { | 227 | { |
218 | return astr->type; | 228 | return astr->type; |
219 | } | 229 | } |
230 | LCRYPTO_ALIAS(ASN1_STRING_type); | ||
220 | 231 | ||
221 | unsigned char * | 232 | unsigned char * |
222 | ASN1_STRING_data(ASN1_STRING *astr) | 233 | ASN1_STRING_data(ASN1_STRING *astr) |
223 | { | 234 | { |
224 | return astr->data; | 235 | return astr->data; |
225 | } | 236 | } |
237 | LCRYPTO_ALIAS(ASN1_STRING_data); | ||
226 | 238 | ||
227 | const unsigned char * | 239 | const unsigned char * |
228 | ASN1_STRING_get0_data(const ASN1_STRING *astr) | 240 | ASN1_STRING_get0_data(const ASN1_STRING *astr) |
229 | { | 241 | { |
230 | return astr->data; | 242 | return astr->data; |
231 | } | 243 | } |
244 | LCRYPTO_ALIAS(ASN1_STRING_get0_data); | ||
232 | 245 | ||
233 | int | 246 | int |
234 | ASN1_STRING_print(BIO *bp, const ASN1_STRING *astr) | 247 | ASN1_STRING_print(BIO *bp, const ASN1_STRING *astr) |
@@ -262,6 +275,7 @@ ASN1_STRING_print(BIO *bp, const ASN1_STRING *astr) | |||
262 | 275 | ||
263 | return 1; | 276 | return 1; |
264 | } | 277 | } |
278 | LCRYPTO_ALIAS(ASN1_STRING_print); | ||
265 | 279 | ||
266 | /* | 280 | /* |
267 | * Utility function: convert any string type to UTF8, returns number of bytes | 281 | * Utility function: convert any string type to UTF8, returns number of bytes |
@@ -304,6 +318,7 @@ ASN1_STRING_to_UTF8(unsigned char **out, const ASN1_STRING *in) | |||
304 | 318 | ||
305 | return ret; | 319 | return ret; |
306 | } | 320 | } |
321 | LCRYPTO_ALIAS(ASN1_STRING_to_UTF8); | ||
307 | 322 | ||
308 | int | 323 | int |
309 | i2a_ASN1_STRING(BIO *bp, const ASN1_STRING *astr, int type) | 324 | i2a_ASN1_STRING(BIO *bp, const ASN1_STRING *astr, int type) |
@@ -338,6 +353,7 @@ i2a_ASN1_STRING(BIO *bp, const ASN1_STRING *astr, int type) | |||
338 | err: | 353 | err: |
339 | return -1; | 354 | return -1; |
340 | } | 355 | } |
356 | LCRYPTO_ALIAS(i2a_ASN1_STRING); | ||
341 | 357 | ||
342 | int | 358 | int |
343 | a2i_ASN1_STRING(BIO *bp, ASN1_STRING *astr, char *buf, int size) | 359 | a2i_ASN1_STRING(BIO *bp, ASN1_STRING *astr, char *buf, int size) |
@@ -429,3 +445,4 @@ a2i_ASN1_STRING(BIO *bp, ASN1_STRING *astr, char *buf, int size) | |||
429 | 445 | ||
430 | return ret; | 446 | return ret; |
431 | } | 447 | } |
448 | LCRYPTO_ALIAS(a2i_ASN1_STRING); | ||