16# define OPENSSL_ASN1_H
19# include <openssl/macros.h>
20# ifndef OPENSSL_NO_DEPRECATED_3_0
25# include <openssl/e_os2.h>
26# include <openssl/opensslconf.h>
27# include <openssl/bio.h>
28# include <openssl/safestack.h>
29# include <openssl/asn1err.h>
30# include <openssl/symhacks.h>
32# include <openssl/types.h>
33# include <openssl/bn.h>
35# ifdef OPENSSL_BUILD_SHLIBCRYPTO
37# define OPENSSL_EXTERN OPENSSL_EXPORT
44# define V_ASN1_UNIVERSAL 0x00
45# define V_ASN1_APPLICATION 0x40
46# define V_ASN1_CONTEXT_SPECIFIC 0x80
47# define V_ASN1_PRIVATE 0xc0
49# define V_ASN1_CONSTRUCTED 0x20
50# define V_ASN1_PRIMITIVE_TAG 0x1f
51# define V_ASN1_PRIMATIVE_TAG V_ASN1_PRIMITIVE_TAG
53# define V_ASN1_APP_CHOOSE -2
54# define V_ASN1_OTHER -3
57# define V_ASN1_UNDEF -1
60# define V_ASN1_BOOLEAN 1
61# define V_ASN1_INTEGER 2
62# define V_ASN1_BIT_STRING 3
63# define V_ASN1_OCTET_STRING 4
65# define V_ASN1_OBJECT 6
66# define V_ASN1_OBJECT_DESCRIPTOR 7
67# define V_ASN1_EXTERNAL 8
69# define V_ASN1_ENUMERATED 10
70# define V_ASN1_UTF8STRING 12
71# define V_ASN1_SEQUENCE 16
73# define V_ASN1_NUMERICSTRING 18
74# define V_ASN1_PRINTABLESTRING 19
75# define V_ASN1_T61STRING 20
76# define V_ASN1_TELETEXSTRING 20
77# define V_ASN1_VIDEOTEXSTRING 21
78# define V_ASN1_IA5STRING 22
79# define V_ASN1_UTCTIME 23
80# define V_ASN1_GENERALIZEDTIME 24
81# define V_ASN1_GRAPHICSTRING 25
82# define V_ASN1_ISO64STRING 26
83# define V_ASN1_VISIBLESTRING 26
84# define V_ASN1_GENERALSTRING 27
85# define V_ASN1_UNIVERSALSTRING 28
86# define V_ASN1_BMPSTRING 30
94# define V_ASN1_NEG 0x100
95# define V_ASN1_NEG_INTEGER (2 | V_ASN1_NEG)
96# define V_ASN1_NEG_ENUMERATED (10 | V_ASN1_NEG)
99# define B_ASN1_NUMERICSTRING 0x0001
100# define B_ASN1_PRINTABLESTRING 0x0002
101# define B_ASN1_T61STRING 0x0004
102# define B_ASN1_TELETEXSTRING 0x0004
103# define B_ASN1_VIDEOTEXSTRING 0x0008
104# define B_ASN1_IA5STRING 0x0010
105# define B_ASN1_GRAPHICSTRING 0x0020
106# define B_ASN1_ISO64STRING 0x0040
107# define B_ASN1_VISIBLESTRING 0x0040
108# define B_ASN1_GENERALSTRING 0x0080
109# define B_ASN1_UNIVERSALSTRING 0x0100
110# define B_ASN1_OCTET_STRING 0x0200
111# define B_ASN1_BIT_STRING 0x0400
112# define B_ASN1_BMPSTRING 0x0800
113# define B_ASN1_UNKNOWN 0x1000
114# define B_ASN1_UTF8STRING 0x2000
115# define B_ASN1_UTCTIME 0x4000
116# define B_ASN1_GENERALIZEDTIME 0x8000
117# define B_ASN1_SEQUENCE 0x10000
119# define MBSTRING_FLAG 0x1000
120# define MBSTRING_UTF8 (MBSTRING_FLAG)
121# define MBSTRING_ASC (MBSTRING_FLAG|1)
122# define MBSTRING_BMP (MBSTRING_FLAG|2)
123# define MBSTRING_UNIV (MBSTRING_FLAG|4)
124# define SMIME_OLDMIME 0x400
125# define SMIME_CRLFEOL 0x800
126# define SMIME_STREAM 0x1000
129SKM_DEFINE_STACK_OF_INTERNAL(X509_ALGOR, X509_ALGOR, X509_ALGOR)
130#define sk_X509_ALGOR_num(sk) OPENSSL_sk_num(ossl_check_const_X509_ALGOR_sk_type(sk))
131#define sk_X509_ALGOR_value(sk, idx) ((X509_ALGOR *)OPENSSL_sk_value(ossl_check_const_X509_ALGOR_sk_type(sk), (idx)))
132#define sk_X509_ALGOR_new(cmp) ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_new(ossl_check_X509_ALGOR_compfunc_type(cmp)))
133#define sk_X509_ALGOR_new_null() ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_new_null())
134#define sk_X509_ALGOR_new_reserve(cmp, n) ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_new_reserve(ossl_check_X509_ALGOR_compfunc_type(cmp), (n)))
135#define sk_X509_ALGOR_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_X509_ALGOR_sk_type(sk), (n))
136#define sk_X509_ALGOR_free(sk) OPENSSL_sk_free(ossl_check_X509_ALGOR_sk_type(sk))
137#define sk_X509_ALGOR_zero(sk) OPENSSL_sk_zero(ossl_check_X509_ALGOR_sk_type(sk))
138#define sk_X509_ALGOR_delete(sk, i) ((X509_ALGOR *)OPENSSL_sk_delete(ossl_check_X509_ALGOR_sk_type(sk), (i)))
139#define sk_X509_ALGOR_delete_ptr(sk, ptr) ((X509_ALGOR *)OPENSSL_sk_delete_ptr(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr)))
140#define sk_X509_ALGOR_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr))
141#define sk_X509_ALGOR_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr))
142#define sk_X509_ALGOR_pop(sk) ((X509_ALGOR *)OPENSSL_sk_pop(ossl_check_X509_ALGOR_sk_type(sk)))
143#define sk_X509_ALGOR_shift(sk) ((X509_ALGOR *)OPENSSL_sk_shift(ossl_check_X509_ALGOR_sk_type(sk)))
144#define sk_X509_ALGOR_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_ALGOR_sk_type(sk),ossl_check_X509_ALGOR_freefunc_type(freefunc))
145#define sk_X509_ALGOR_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr), (idx))
146#define sk_X509_ALGOR_set(sk, idx, ptr) ((X509_ALGOR *)OPENSSL_sk_set(ossl_check_X509_ALGOR_sk_type(sk), (idx), ossl_check_X509_ALGOR_type(ptr)))
147#define sk_X509_ALGOR_find(sk, ptr) OPENSSL_sk_find(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr))
148#define sk_X509_ALGOR_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr))
149#define sk_X509_ALGOR_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr), pnum)
150#define sk_X509_ALGOR_sort(sk) OPENSSL_sk_sort(ossl_check_X509_ALGOR_sk_type(sk))
151#define sk_X509_ALGOR_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_X509_ALGOR_sk_type(sk))
152#define sk_X509_ALGOR_dup(sk) ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_dup(ossl_check_const_X509_ALGOR_sk_type(sk)))
153#define sk_X509_ALGOR_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_deep_copy(ossl_check_const_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_copyfunc_type(copyfunc), ossl_check_X509_ALGOR_freefunc_type(freefunc)))
154#define sk_X509_ALGOR_set_cmp_func(sk, cmp) ((sk_X509_ALGOR_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_compfunc_type(cmp)))
158# define ASN1_STRING_FLAG_BITS_LEFT 0x08
164# define ASN1_STRING_FLAG_NDEF 0x010
172# define ASN1_STRING_FLAG_CONT 0x020
177# define ASN1_STRING_FLAG_MSTRING 0x040
179# define ASN1_STRING_FLAG_EMBED 0x080
181# define ASN1_STRING_FLAG_X509_TIME 0x100
208# define ASN1_LONG_UNDEF 0x7fffffffL
210# define STABLE_FLAGS_MALLOC 0x01
217# define STABLE_FLAGS_CLEAR STABLE_FLAGS_MALLOC
218# define STABLE_NO_MASK 0x02
219# define DIRSTRING_TYPE \
220 (B_ASN1_PRINTABLESTRING|B_ASN1_T61STRING|B_ASN1_BMPSTRING|B_ASN1_UTF8STRING)
221# define PKCS9STRING_TYPE (DIRSTRING_TYPE|B_ASN1_IA5STRING)
231SKM_DEFINE_STACK_OF_INTERNAL(ASN1_STRING_TABLE, ASN1_STRING_TABLE, ASN1_STRING_TABLE)
232#define sk_ASN1_STRING_TABLE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk))
233#define sk_ASN1_STRING_TABLE_value(sk, idx) ((ASN1_STRING_TABLE *)OPENSSL_sk_value(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk), (idx)))
234#define sk_ASN1_STRING_TABLE_new(cmp) ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_new(ossl_check_ASN1_STRING_TABLE_compfunc_type(cmp)))
235#define sk_ASN1_STRING_TABLE_new_null() ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_new_null())
236#define sk_ASN1_STRING_TABLE_new_reserve(cmp, n) ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_STRING_TABLE_compfunc_type(cmp), (n)))
237#define sk_ASN1_STRING_TABLE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_STRING_TABLE_sk_type(sk), (n))
238#define sk_ASN1_STRING_TABLE_free(sk) OPENSSL_sk_free(ossl_check_ASN1_STRING_TABLE_sk_type(sk))
239#define sk_ASN1_STRING_TABLE_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_STRING_TABLE_sk_type(sk))
240#define sk_ASN1_STRING_TABLE_delete(sk, i) ((ASN1_STRING_TABLE *)OPENSSL_sk_delete(ossl_check_ASN1_STRING_TABLE_sk_type(sk), (i)))
241#define sk_ASN1_STRING_TABLE_delete_ptr(sk, ptr) ((ASN1_STRING_TABLE *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr)))
242#define sk_ASN1_STRING_TABLE_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr))
243#define sk_ASN1_STRING_TABLE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr))
244#define sk_ASN1_STRING_TABLE_pop(sk) ((ASN1_STRING_TABLE *)OPENSSL_sk_pop(ossl_check_ASN1_STRING_TABLE_sk_type(sk)))
245#define sk_ASN1_STRING_TABLE_shift(sk) ((ASN1_STRING_TABLE *)OPENSSL_sk_shift(ossl_check_ASN1_STRING_TABLE_sk_type(sk)))
246#define sk_ASN1_STRING_TABLE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_STRING_TABLE_sk_type(sk),ossl_check_ASN1_STRING_TABLE_freefunc_type(freefunc))
247#define sk_ASN1_STRING_TABLE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr), (idx))
248#define sk_ASN1_STRING_TABLE_set(sk, idx, ptr) ((ASN1_STRING_TABLE *)OPENSSL_sk_set(ossl_check_ASN1_STRING_TABLE_sk_type(sk), (idx), ossl_check_ASN1_STRING_TABLE_type(ptr)))
249#define sk_ASN1_STRING_TABLE_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr))
250#define sk_ASN1_STRING_TABLE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr))
251#define sk_ASN1_STRING_TABLE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr), pnum)
252#define sk_ASN1_STRING_TABLE_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_STRING_TABLE_sk_type(sk))
253#define sk_ASN1_STRING_TABLE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk))
254#define sk_ASN1_STRING_TABLE_dup(sk) ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_dup(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk)))
255#define sk_ASN1_STRING_TABLE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_copyfunc_type(copyfunc), ossl_check_ASN1_STRING_TABLE_freefunc_type(freefunc)))
256#define sk_ASN1_STRING_TABLE_set_cmp_func(sk, cmp) ((sk_ASN1_STRING_TABLE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_compfunc_type(cmp)))
261# define ub_name 32768
262# define ub_common_name 64
263# define ub_locality_name 128
264# define ub_state_name 128
265# define ub_organization_name 64
266# define ub_organization_unit_name 64
268# define ub_email_address 128
276typedef struct ASN1_VALUE_st ASN1_VALUE;
286# define DECLARE_ASN1_FUNCTIONS_attr(attr, type) \
287 DECLARE_ASN1_FUNCTIONS_name_attr(attr, type, type)
288# define DECLARE_ASN1_FUNCTIONS(type) \
289 DECLARE_ASN1_FUNCTIONS_attr(extern, type)
291# define DECLARE_ASN1_ALLOC_FUNCTIONS_attr(attr, type) \
292 DECLARE_ASN1_ALLOC_FUNCTIONS_name_attr(attr, type, type)
293# define DECLARE_ASN1_ALLOC_FUNCTIONS(type) \
294 DECLARE_ASN1_ALLOC_FUNCTIONS_attr(extern, type)
296# define DECLARE_ASN1_FUNCTIONS_name_attr(attr, type, name) \
297 DECLARE_ASN1_ALLOC_FUNCTIONS_name_attr(attr, type, name) \
298 DECLARE_ASN1_ENCODE_FUNCTIONS_name_attr(attr, type, name)
299# define DECLARE_ASN1_FUNCTIONS_name(type, name) \
300 DECLARE_ASN1_FUNCTIONS_name_attr(extern, type, name)
302# define DECLARE_ASN1_ENCODE_FUNCTIONS_attr(attr, type, itname, name) \
303 DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(attr, type, name) \
304 DECLARE_ASN1_ITEM_attr(attr, itname)
305# define DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name) \
306 DECLARE_ASN1_ENCODE_FUNCTIONS_attr(extern, type, itname, name)
308# define DECLARE_ASN1_ENCODE_FUNCTIONS_name_attr(attr, type, name) \
309 DECLARE_ASN1_ENCODE_FUNCTIONS_attr(attr, type, name, name)
310# define DECLARE_ASN1_ENCODE_FUNCTIONS_name(type, name) \
311 DECLARE_ASN1_ENCODE_FUNCTIONS_name_attr(extern, type, name)
313# define DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(attr, type, name) \
314 attr type *d2i_##name(type **a, const unsigned char **in, long len); \
315 attr int i2d_##name(const type *a, unsigned char **out);
316# define DECLARE_ASN1_ENCODE_FUNCTIONS_only(type, name) \
317 DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(extern, type, name)
319# define DECLARE_ASN1_NDEF_FUNCTION_attr(attr, name) \
320 attr int i2d_##name##_NDEF(const name *a, unsigned char **out);
321# define DECLARE_ASN1_NDEF_FUNCTION(name) \
322 DECLARE_ASN1_NDEF_FUNCTION_attr(extern, name)
324# define DECLARE_ASN1_ALLOC_FUNCTIONS_name_attr(attr, type, name) \
325 attr type *name##_new(void); \
326 attr void name##_free(type *a);
327# define DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \
328 DECLARE_ASN1_ALLOC_FUNCTIONS_name_attr(extern, type, name)
330# define DECLARE_ASN1_DUP_FUNCTION_attr(attr, type) \
331 DECLARE_ASN1_DUP_FUNCTION_name_attr(attr, type, type)
332# define DECLARE_ASN1_DUP_FUNCTION(type) \
333 DECLARE_ASN1_DUP_FUNCTION_attr(extern, type)
335# define DECLARE_ASN1_DUP_FUNCTION_name_attr(attr, type, name) \
336 attr type *name##_dup(const type *a);
337# define DECLARE_ASN1_DUP_FUNCTION_name(type, name) \
338 DECLARE_ASN1_DUP_FUNCTION_name_attr(extern, type, name)
340# define DECLARE_ASN1_PRINT_FUNCTION_attr(attr, stname) \
341 DECLARE_ASN1_PRINT_FUNCTION_fname_attr(attr, stname, stname)
342# define DECLARE_ASN1_PRINT_FUNCTION(stname) \
343 DECLARE_ASN1_PRINT_FUNCTION_attr(extern, stname)
345# define DECLARE_ASN1_PRINT_FUNCTION_fname_attr(attr, stname, fname) \
346 attr int fname##_print_ctx(BIO *out, const stname *x, int indent, \
347 const ASN1_PCTX *pctx);
348# define DECLARE_ASN1_PRINT_FUNCTION_fname(stname, fname) \
349 DECLARE_ASN1_PRINT_FUNCTION_fname_attr(extern, stname, fname)
351# define D2I_OF(type) type *(*)(type **,const unsigned char **,long)
352# define I2D_OF(type) int (*)(const type *,unsigned char **)
354# define CHECKED_D2I_OF(type, d2i) \
355 ((d2i_of_void*) (1 ? d2i : ((D2I_OF(type))0)))
356# define CHECKED_I2D_OF(type, i2d) \
357 ((i2d_of_void*) (1 ? i2d : ((I2D_OF(type))0)))
358# define CHECKED_NEW_OF(type, xnew) \
359 ((void *(*)(void)) (1 ? xnew : ((type *(*)(void))0)))
360# define CHECKED_PTR_OF(type, p) \
361 ((void*) (1 ? p : (type*)0))
362# define CHECKED_PPTR_OF(type, p) \
363 ((void**) (1 ? p : (type**)0))
365# define TYPEDEF_D2I_OF(type) typedef type *d2i_of_##type(type **,const unsigned char **,long)
366# define TYPEDEF_I2D_OF(type) typedef int i2d_of_##type(const type *,unsigned char **)
367# define TYPEDEF_D2I2D_OF(type) TYPEDEF_D2I_OF(type); TYPEDEF_I2D_OF(type)
369typedef void *d2i_of_void(
void **,
const unsigned char **,
long);
370typedef int i2d_of_void(
const void *,
unsigned char **);
415typedef const ASN1_ITEM *ASN1_ITEM_EXP (
void);
418# define ASN1_ITEM_ptr(iptr) (iptr())
421# define ASN1_ITEM_ref(iptr) (iptr##_it)
423# define ASN1_ITEM_rptr(ref) (ref##_it())
425# define DECLARE_ASN1_ITEM_attr(attr, name) \
426 attr const ASN1_ITEM * name##_it(void);
427# define DECLARE_ASN1_ITEM(name) \
428 DECLARE_ASN1_ITEM_attr(extern, name)
437# define ASN1_STRFLGS_ESC_2253 1
438# define ASN1_STRFLGS_ESC_CTRL 2
439# define ASN1_STRFLGS_ESC_MSB 4
442# define ASN1_DTFLGS_TYPE_MASK 0x0FUL
443# define ASN1_DTFLGS_RFC822 0x00UL
444# define ASN1_DTFLGS_ISO8601 0x01UL
451# define ASN1_STRFLGS_ESC_QUOTE 8
456# define CHARTYPE_PRINTABLESTRING 0x10
458# define CHARTYPE_FIRST_ESC_2253 0x20
460# define CHARTYPE_LAST_ESC_2253 0x40
471# define ASN1_STRFLGS_UTF8_CONVERT 0x10
479# define ASN1_STRFLGS_IGNORE_TYPE 0x20
482# define ASN1_STRFLGS_SHOW_TYPE 0x40
492# define ASN1_STRFLGS_DUMP_ALL 0x80
493# define ASN1_STRFLGS_DUMP_UNKNOWN 0x100
500# define ASN1_STRFLGS_DUMP_DER 0x200
505#define ASN1_STRFLGS_ESC_2254 0x400
512# define ASN1_STRFLGS_RFC2253 (ASN1_STRFLGS_ESC_2253 | \
513 ASN1_STRFLGS_ESC_CTRL | \
514 ASN1_STRFLGS_ESC_MSB | \
515 ASN1_STRFLGS_UTF8_CONVERT | \
516 ASN1_STRFLGS_DUMP_UNKNOWN | \
517 ASN1_STRFLGS_DUMP_DER)
524 ASN1_BOOLEAN boolean;
525 ASN1_STRING *asn1_string;
527 ASN1_INTEGER *integer;
528 ASN1_ENUMERATED *enumerated;
529 ASN1_BIT_STRING *bit_string;
530 ASN1_OCTET_STRING *octet_string;
531 ASN1_PRINTABLESTRING *printablestring;
532 ASN1_T61STRING *t61string;
533 ASN1_IA5STRING *ia5string;
534 ASN1_GENERALSTRING *generalstring;
535 ASN1_BMPSTRING *bmpstring;
536 ASN1_UNIVERSALSTRING *universalstring;
537 ASN1_UTCTIME *utctime;
538 ASN1_GENERALIZEDTIME *generalizedtime;
539 ASN1_VISIBLESTRING *visiblestring;
540 ASN1_UTF8STRING *utf8string;
546 ASN1_STRING *sequence;
547 ASN1_VALUE *asn1_value;
551SKM_DEFINE_STACK_OF_INTERNAL(ASN1_TYPE, ASN1_TYPE, ASN1_TYPE)
552#define sk_ASN1_TYPE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_TYPE_sk_type(sk))
553#define sk_ASN1_TYPE_value(sk, idx) ((ASN1_TYPE *)OPENSSL_sk_value(ossl_check_const_ASN1_TYPE_sk_type(sk), (idx)))
554#define sk_ASN1_TYPE_new(cmp) ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_new(ossl_check_ASN1_TYPE_compfunc_type(cmp)))
555#define sk_ASN1_TYPE_new_null() ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_new_null())
556#define sk_ASN1_TYPE_new_reserve(cmp, n) ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_TYPE_compfunc_type(cmp), (n)))
557#define sk_ASN1_TYPE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_TYPE_sk_type(sk), (n))
558#define sk_ASN1_TYPE_free(sk) OPENSSL_sk_free(ossl_check_ASN1_TYPE_sk_type(sk))
559#define sk_ASN1_TYPE_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_TYPE_sk_type(sk))
560#define sk_ASN1_TYPE_delete(sk, i) ((ASN1_TYPE *)OPENSSL_sk_delete(ossl_check_ASN1_TYPE_sk_type(sk), (i)))
561#define sk_ASN1_TYPE_delete_ptr(sk, ptr) ((ASN1_TYPE *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr)))
562#define sk_ASN1_TYPE_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr))
563#define sk_ASN1_TYPE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr))
564#define sk_ASN1_TYPE_pop(sk) ((ASN1_TYPE *)OPENSSL_sk_pop(ossl_check_ASN1_TYPE_sk_type(sk)))
565#define sk_ASN1_TYPE_shift(sk) ((ASN1_TYPE *)OPENSSL_sk_shift(ossl_check_ASN1_TYPE_sk_type(sk)))
566#define sk_ASN1_TYPE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_TYPE_sk_type(sk),ossl_check_ASN1_TYPE_freefunc_type(freefunc))
567#define sk_ASN1_TYPE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr), (idx))
568#define sk_ASN1_TYPE_set(sk, idx, ptr) ((ASN1_TYPE *)OPENSSL_sk_set(ossl_check_ASN1_TYPE_sk_type(sk), (idx), ossl_check_ASN1_TYPE_type(ptr)))
569#define sk_ASN1_TYPE_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr))
570#define sk_ASN1_TYPE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr))
571#define sk_ASN1_TYPE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr), pnum)
572#define sk_ASN1_TYPE_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_TYPE_sk_type(sk))
573#define sk_ASN1_TYPE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_TYPE_sk_type(sk))
574#define sk_ASN1_TYPE_dup(sk) ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_dup(ossl_check_const_ASN1_TYPE_sk_type(sk)))
575#define sk_ASN1_TYPE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_copyfunc_type(copyfunc), ossl_check_ASN1_TYPE_freefunc_type(freefunc)))
576#define sk_ASN1_TYPE_set_cmp_func(sk, cmp) ((sk_ASN1_TYPE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_compfunc_type(cmp)))
579typedef STACK_OF(ASN1_TYPE) ASN1_SEQUENCE_ANY;
581DECLARE_ASN1_ENCODE_FUNCTIONS_name(ASN1_SEQUENCE_ANY, ASN1_SEQUENCE_ANY)
582DECLARE_ASN1_ENCODE_FUNCTIONS_name(ASN1_SEQUENCE_ANY, ASN1_SET_ANY)
591# define B_ASN1_TIME \
593 B_ASN1_GENERALIZEDTIME
595# define B_ASN1_PRINTABLE \
596 B_ASN1_NUMERICSTRING| \
597 B_ASN1_PRINTABLESTRING| \
601 B_ASN1_UNIVERSALSTRING|\
607# define B_ASN1_DIRECTORYSTRING \
608 B_ASN1_PRINTABLESTRING| \
609 B_ASN1_TELETEXSTRING|\
611 B_ASN1_UNIVERSALSTRING|\
614# define B_ASN1_DISPLAYTEXT \
616 B_ASN1_VISIBLESTRING| \
620DECLARE_ASN1_ALLOC_FUNCTIONS_name(ASN1_TYPE, ASN1_TYPE)
621DECLARE_ASN1_ENCODE_FUNCTIONS(ASN1_TYPE, ASN1_ANY, ASN1_TYPE)
623int ASN1_TYPE_get(
const ASN1_TYPE *a);
624void ASN1_TYPE_set(ASN1_TYPE *a,
int type,
void *value);
625int ASN1_TYPE_set1(ASN1_TYPE *a,
int type,
const void *value);
626int ASN1_TYPE_cmp(
const ASN1_TYPE *a,
const ASN1_TYPE *b);
628ASN1_TYPE *ASN1_TYPE_pack_sequence(
const ASN1_ITEM *it,
void *s, ASN1_TYPE **t);
629void *ASN1_TYPE_unpack_sequence(
const ASN1_ITEM *it,
const ASN1_TYPE *t);
631SKM_DEFINE_STACK_OF_INTERNAL(ASN1_OBJECT, ASN1_OBJECT, ASN1_OBJECT)
632#define sk_ASN1_OBJECT_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_OBJECT_sk_type(sk))
633#define sk_ASN1_OBJECT_value(sk, idx) ((ASN1_OBJECT *)OPENSSL_sk_value(ossl_check_const_ASN1_OBJECT_sk_type(sk), (idx)))
634#define sk_ASN1_OBJECT_new(cmp) ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_new(ossl_check_ASN1_OBJECT_compfunc_type(cmp)))
635#define sk_ASN1_OBJECT_new_null() ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_new_null())
636#define sk_ASN1_OBJECT_new_reserve(cmp, n) ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_OBJECT_compfunc_type(cmp), (n)))
637#define sk_ASN1_OBJECT_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_OBJECT_sk_type(sk), (n))
638#define sk_ASN1_OBJECT_free(sk) OPENSSL_sk_free(ossl_check_ASN1_OBJECT_sk_type(sk))
639#define sk_ASN1_OBJECT_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_OBJECT_sk_type(sk))
640#define sk_ASN1_OBJECT_delete(sk, i) ((ASN1_OBJECT *)OPENSSL_sk_delete(ossl_check_ASN1_OBJECT_sk_type(sk), (i)))
641#define sk_ASN1_OBJECT_delete_ptr(sk, ptr) ((ASN1_OBJECT *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr)))
642#define sk_ASN1_OBJECT_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr))
643#define sk_ASN1_OBJECT_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr))
644#define sk_ASN1_OBJECT_pop(sk) ((ASN1_OBJECT *)OPENSSL_sk_pop(ossl_check_ASN1_OBJECT_sk_type(sk)))
645#define sk_ASN1_OBJECT_shift(sk) ((ASN1_OBJECT *)OPENSSL_sk_shift(ossl_check_ASN1_OBJECT_sk_type(sk)))
646#define sk_ASN1_OBJECT_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_OBJECT_sk_type(sk),ossl_check_ASN1_OBJECT_freefunc_type(freefunc))
647#define sk_ASN1_OBJECT_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr), (idx))
648#define sk_ASN1_OBJECT_set(sk, idx, ptr) ((ASN1_OBJECT *)OPENSSL_sk_set(ossl_check_ASN1_OBJECT_sk_type(sk), (idx), ossl_check_ASN1_OBJECT_type(ptr)))
649#define sk_ASN1_OBJECT_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr))
650#define sk_ASN1_OBJECT_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr))
651#define sk_ASN1_OBJECT_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr), pnum)
652#define sk_ASN1_OBJECT_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_OBJECT_sk_type(sk))
653#define sk_ASN1_OBJECT_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_OBJECT_sk_type(sk))
654#define sk_ASN1_OBJECT_dup(sk) ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_dup(ossl_check_const_ASN1_OBJECT_sk_type(sk)))
655#define sk_ASN1_OBJECT_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_copyfunc_type(copyfunc), ossl_check_ASN1_OBJECT_freefunc_type(freefunc)))
656#define sk_ASN1_OBJECT_set_cmp_func(sk, cmp) ((sk_ASN1_OBJECT_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_compfunc_type(cmp)))
659DECLARE_ASN1_FUNCTIONS(ASN1_OBJECT)
661ASN1_STRING *ASN1_STRING_new(
void);
662void ASN1_STRING_free(ASN1_STRING *a);
663void ASN1_STRING_clear_free(ASN1_STRING *a);
664int ASN1_STRING_copy(ASN1_STRING *dst,
const ASN1_STRING *str);
665DECLARE_ASN1_DUP_FUNCTION(ASN1_STRING)
666ASN1_STRING *ASN1_STRING_type_new(
int type);
667int ASN1_STRING_cmp(
const ASN1_STRING *a,
const ASN1_STRING *b);
672int ASN1_STRING_set(ASN1_STRING *str,
const void *data,
int len);
673void ASN1_STRING_set0(ASN1_STRING *str,
void *data,
int len);
674int ASN1_STRING_length(
const ASN1_STRING *x);
675# ifndef OPENSSL_NO_DEPRECATED_3_0
676OSSL_DEPRECATEDIN_3_0
void ASN1_STRING_length_set(ASN1_STRING *x,
int n);
678int ASN1_STRING_type(
const ASN1_STRING *x);
679# ifndef OPENSSL_NO_DEPRECATED_1_1_0
680OSSL_DEPRECATEDIN_1_1_0
unsigned char *ASN1_STRING_data(ASN1_STRING *x);
682const unsigned char *ASN1_STRING_get0_data(
const ASN1_STRING *x);
684DECLARE_ASN1_FUNCTIONS(ASN1_BIT_STRING)
685int ASN1_BIT_STRING_set(ASN1_BIT_STRING *a,
unsigned char *d,
int length);
686int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a,
int n,
int value);
687int ASN1_BIT_STRING_get_bit(
const ASN1_BIT_STRING *a,
int n);
688int ASN1_BIT_STRING_check(
const ASN1_BIT_STRING *a,
689 const unsigned char *flags,
int flags_len);
691int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs,
692 BIT_STRING_BITNAME *tbl,
int indent);
693int ASN1_BIT_STRING_num_asc(
const char *name, BIT_STRING_BITNAME *tbl);
694int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs,
const char *name,
int value,
695 BIT_STRING_BITNAME *tbl);
697SKM_DEFINE_STACK_OF_INTERNAL(ASN1_INTEGER, ASN1_INTEGER, ASN1_INTEGER)
698#define sk_ASN1_INTEGER_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_INTEGER_sk_type(sk))
699#define sk_ASN1_INTEGER_value(sk, idx) ((ASN1_INTEGER *)OPENSSL_sk_value(ossl_check_const_ASN1_INTEGER_sk_type(sk), (idx)))
700#define sk_ASN1_INTEGER_new(cmp) ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_new(ossl_check_ASN1_INTEGER_compfunc_type(cmp)))
701#define sk_ASN1_INTEGER_new_null() ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_new_null())
702#define sk_ASN1_INTEGER_new_reserve(cmp, n) ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_INTEGER_compfunc_type(cmp), (n)))
703#define sk_ASN1_INTEGER_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_INTEGER_sk_type(sk), (n))
704#define sk_ASN1_INTEGER_free(sk) OPENSSL_sk_free(ossl_check_ASN1_INTEGER_sk_type(sk))
705#define sk_ASN1_INTEGER_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_INTEGER_sk_type(sk))
706#define sk_ASN1_INTEGER_delete(sk, i) ((ASN1_INTEGER *)OPENSSL_sk_delete(ossl_check_ASN1_INTEGER_sk_type(sk), (i)))
707#define sk_ASN1_INTEGER_delete_ptr(sk, ptr) ((ASN1_INTEGER *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr)))
708#define sk_ASN1_INTEGER_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr))
709#define sk_ASN1_INTEGER_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr))
710#define sk_ASN1_INTEGER_pop(sk) ((ASN1_INTEGER *)OPENSSL_sk_pop(ossl_check_ASN1_INTEGER_sk_type(sk)))
711#define sk_ASN1_INTEGER_shift(sk) ((ASN1_INTEGER *)OPENSSL_sk_shift(ossl_check_ASN1_INTEGER_sk_type(sk)))
712#define sk_ASN1_INTEGER_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_INTEGER_sk_type(sk),ossl_check_ASN1_INTEGER_freefunc_type(freefunc))
713#define sk_ASN1_INTEGER_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr), (idx))
714#define sk_ASN1_INTEGER_set(sk, idx, ptr) ((ASN1_INTEGER *)OPENSSL_sk_set(ossl_check_ASN1_INTEGER_sk_type(sk), (idx), ossl_check_ASN1_INTEGER_type(ptr)))
715#define sk_ASN1_INTEGER_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr))
716#define sk_ASN1_INTEGER_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr))
717#define sk_ASN1_INTEGER_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr), pnum)
718#define sk_ASN1_INTEGER_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_INTEGER_sk_type(sk))
719#define sk_ASN1_INTEGER_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_INTEGER_sk_type(sk))
720#define sk_ASN1_INTEGER_dup(sk) ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_dup(ossl_check_const_ASN1_INTEGER_sk_type(sk)))
721#define sk_ASN1_INTEGER_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_copyfunc_type(copyfunc), ossl_check_ASN1_INTEGER_freefunc_type(freefunc)))
722#define sk_ASN1_INTEGER_set_cmp_func(sk, cmp) ((sk_ASN1_INTEGER_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_compfunc_type(cmp)))
726DECLARE_ASN1_FUNCTIONS(ASN1_INTEGER)
727ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a,
const unsigned char **pp,
729DECLARE_ASN1_DUP_FUNCTION(ASN1_INTEGER)
730int ASN1_INTEGER_cmp(
const ASN1_INTEGER *x,
const ASN1_INTEGER *y);
732DECLARE_ASN1_FUNCTIONS(ASN1_ENUMERATED)
734int ASN1_UTCTIME_check(
const ASN1_UTCTIME *a);
735ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t);
736ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
737 int offset_day,
long offset_sec);
738int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s,
const char *str);
739int ASN1_UTCTIME_cmp_time_t(
const ASN1_UTCTIME *s, time_t t);
741int ASN1_GENERALIZEDTIME_check(
const ASN1_GENERALIZEDTIME *a);
742ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
744ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,
745 time_t t,
int offset_day,
747int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s,
const char *str);
749int ASN1_TIME_diff(
int *pday,
int *psec,
750 const ASN1_TIME *from,
const ASN1_TIME *to);
752DECLARE_ASN1_FUNCTIONS(ASN1_OCTET_STRING)
753DECLARE_ASN1_DUP_FUNCTION(ASN1_OCTET_STRING)
754int ASN1_OCTET_STRING_cmp(
const ASN1_OCTET_STRING *a,
755 const ASN1_OCTET_STRING *b);
756int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str,
const unsigned char *data,
759SKM_DEFINE_STACK_OF_INTERNAL(ASN1_UTF8STRING, ASN1_UTF8STRING, ASN1_UTF8STRING)
760#define sk_ASN1_UTF8STRING_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_UTF8STRING_sk_type(sk))
761#define sk_ASN1_UTF8STRING_value(sk, idx) ((ASN1_UTF8STRING *)OPENSSL_sk_value(ossl_check_const_ASN1_UTF8STRING_sk_type(sk), (idx)))
762#define sk_ASN1_UTF8STRING_new(cmp) ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_new(ossl_check_ASN1_UTF8STRING_compfunc_type(cmp)))
763#define sk_ASN1_UTF8STRING_new_null() ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_new_null())
764#define sk_ASN1_UTF8STRING_new_reserve(cmp, n) ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_UTF8STRING_compfunc_type(cmp), (n)))
765#define sk_ASN1_UTF8STRING_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_UTF8STRING_sk_type(sk), (n))
766#define sk_ASN1_UTF8STRING_free(sk) OPENSSL_sk_free(ossl_check_ASN1_UTF8STRING_sk_type(sk))
767#define sk_ASN1_UTF8STRING_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_UTF8STRING_sk_type(sk))
768#define sk_ASN1_UTF8STRING_delete(sk, i) ((ASN1_UTF8STRING *)OPENSSL_sk_delete(ossl_check_ASN1_UTF8STRING_sk_type(sk), (i)))
769#define sk_ASN1_UTF8STRING_delete_ptr(sk, ptr) ((ASN1_UTF8STRING *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr)))
770#define sk_ASN1_UTF8STRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr))
771#define sk_ASN1_UTF8STRING_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr))
772#define sk_ASN1_UTF8STRING_pop(sk) ((ASN1_UTF8STRING *)OPENSSL_sk_pop(ossl_check_ASN1_UTF8STRING_sk_type(sk)))
773#define sk_ASN1_UTF8STRING_shift(sk) ((ASN1_UTF8STRING *)OPENSSL_sk_shift(ossl_check_ASN1_UTF8STRING_sk_type(sk)))
774#define sk_ASN1_UTF8STRING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_UTF8STRING_sk_type(sk),ossl_check_ASN1_UTF8STRING_freefunc_type(freefunc))
775#define sk_ASN1_UTF8STRING_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr), (idx))
776#define sk_ASN1_UTF8STRING_set(sk, idx, ptr) ((ASN1_UTF8STRING *)OPENSSL_sk_set(ossl_check_ASN1_UTF8STRING_sk_type(sk), (idx), ossl_check_ASN1_UTF8STRING_type(ptr)))
777#define sk_ASN1_UTF8STRING_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr))
778#define sk_ASN1_UTF8STRING_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr))
779#define sk_ASN1_UTF8STRING_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr), pnum)
780#define sk_ASN1_UTF8STRING_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_UTF8STRING_sk_type(sk))
781#define sk_ASN1_UTF8STRING_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_UTF8STRING_sk_type(sk))
782#define sk_ASN1_UTF8STRING_dup(sk) ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_dup(ossl_check_const_ASN1_UTF8STRING_sk_type(sk)))
783#define sk_ASN1_UTF8STRING_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_copyfunc_type(copyfunc), ossl_check_ASN1_UTF8STRING_freefunc_type(freefunc)))
784#define sk_ASN1_UTF8STRING_set_cmp_func(sk, cmp) ((sk_ASN1_UTF8STRING_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_compfunc_type(cmp)))
787DECLARE_ASN1_FUNCTIONS(ASN1_VISIBLESTRING)
788DECLARE_ASN1_FUNCTIONS(ASN1_UNIVERSALSTRING)
789DECLARE_ASN1_FUNCTIONS(ASN1_UTF8STRING)
790DECLARE_ASN1_FUNCTIONS(ASN1_NULL)
791DECLARE_ASN1_FUNCTIONS(ASN1_BMPSTRING)
793int UTF8_getc(
const unsigned char *str,
int len,
unsigned long *val);
794int UTF8_putc(
unsigned char *str,
int len,
unsigned long value);
796SKM_DEFINE_STACK_OF_INTERNAL(ASN1_GENERALSTRING, ASN1_GENERALSTRING, ASN1_GENERALSTRING)
797#define sk_ASN1_GENERALSTRING_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk))
798#define sk_ASN1_GENERALSTRING_value(sk, idx) ((ASN1_GENERALSTRING *)OPENSSL_sk_value(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk), (idx)))
799#define sk_ASN1_GENERALSTRING_new(cmp) ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_new(ossl_check_ASN1_GENERALSTRING_compfunc_type(cmp)))
800#define sk_ASN1_GENERALSTRING_new_null() ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_new_null())
801#define sk_ASN1_GENERALSTRING_new_reserve(cmp, n) ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_GENERALSTRING_compfunc_type(cmp), (n)))
802#define sk_ASN1_GENERALSTRING_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_GENERALSTRING_sk_type(sk), (n))
803#define sk_ASN1_GENERALSTRING_free(sk) OPENSSL_sk_free(ossl_check_ASN1_GENERALSTRING_sk_type(sk))
804#define sk_ASN1_GENERALSTRING_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_GENERALSTRING_sk_type(sk))
805#define sk_ASN1_GENERALSTRING_delete(sk, i) ((ASN1_GENERALSTRING *)OPENSSL_sk_delete(ossl_check_ASN1_GENERALSTRING_sk_type(sk), (i)))
806#define sk_ASN1_GENERALSTRING_delete_ptr(sk, ptr) ((ASN1_GENERALSTRING *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr)))
807#define sk_ASN1_GENERALSTRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr))
808#define sk_ASN1_GENERALSTRING_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr))
809#define sk_ASN1_GENERALSTRING_pop(sk) ((ASN1_GENERALSTRING *)OPENSSL_sk_pop(ossl_check_ASN1_GENERALSTRING_sk_type(sk)))
810#define sk_ASN1_GENERALSTRING_shift(sk) ((ASN1_GENERALSTRING *)OPENSSL_sk_shift(ossl_check_ASN1_GENERALSTRING_sk_type(sk)))
811#define sk_ASN1_GENERALSTRING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_GENERALSTRING_sk_type(sk),ossl_check_ASN1_GENERALSTRING_freefunc_type(freefunc))
812#define sk_ASN1_GENERALSTRING_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr), (idx))
813#define sk_ASN1_GENERALSTRING_set(sk, idx, ptr) ((ASN1_GENERALSTRING *)OPENSSL_sk_set(ossl_check_ASN1_GENERALSTRING_sk_type(sk), (idx), ossl_check_ASN1_GENERALSTRING_type(ptr)))
814#define sk_ASN1_GENERALSTRING_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr))
815#define sk_ASN1_GENERALSTRING_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr))
816#define sk_ASN1_GENERALSTRING_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr), pnum)
817#define sk_ASN1_GENERALSTRING_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_GENERALSTRING_sk_type(sk))
818#define sk_ASN1_GENERALSTRING_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk))
819#define sk_ASN1_GENERALSTRING_dup(sk) ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_dup(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk)))
820#define sk_ASN1_GENERALSTRING_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_copyfunc_type(copyfunc), ossl_check_ASN1_GENERALSTRING_freefunc_type(freefunc)))
821#define sk_ASN1_GENERALSTRING_set_cmp_func(sk, cmp) ((sk_ASN1_GENERALSTRING_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_compfunc_type(cmp)))
824DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, ASN1_PRINTABLE)
826DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, DIRECTORYSTRING)
827DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, DISPLAYTEXT)
828DECLARE_ASN1_FUNCTIONS(ASN1_PRINTABLESTRING)
829DECLARE_ASN1_FUNCTIONS(ASN1_T61STRING)
830DECLARE_ASN1_FUNCTIONS(ASN1_IA5STRING)
831DECLARE_ASN1_FUNCTIONS(ASN1_GENERALSTRING)
832DECLARE_ASN1_FUNCTIONS(ASN1_UTCTIME)
833DECLARE_ASN1_FUNCTIONS(ASN1_GENERALIZEDTIME)
834DECLARE_ASN1_FUNCTIONS(ASN1_TIME)
836DECLARE_ASN1_DUP_FUNCTION(ASN1_TIME)
837DECLARE_ASN1_DUP_FUNCTION(ASN1_UTCTIME)
838DECLARE_ASN1_DUP_FUNCTION(ASN1_GENERALIZEDTIME)
840DECLARE_ASN1_ITEM(ASN1_OCTET_STRING_NDEF)
842ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t);
843ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s, time_t t,
844 int offset_day,
long offset_sec);
845int ASN1_TIME_check(
const ASN1_TIME *t);
846ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(
const ASN1_TIME *t,
847 ASN1_GENERALIZEDTIME **out);
848int ASN1_TIME_set_string(ASN1_TIME *s,
const char *str);
849int ASN1_TIME_set_string_X509(ASN1_TIME *s,
const char *str);
850int ASN1_TIME_to_tm(
const ASN1_TIME *s,
struct tm *
tm);
851int ASN1_TIME_normalize(ASN1_TIME *s);
852int ASN1_TIME_cmp_time_t(
const ASN1_TIME *s, time_t t);
853int ASN1_TIME_compare(
const ASN1_TIME *a,
const ASN1_TIME *b);
855int i2a_ASN1_INTEGER(BIO *bp,
const ASN1_INTEGER *a);
856int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs,
char *buf,
int size);
857int i2a_ASN1_ENUMERATED(BIO *bp,
const ASN1_ENUMERATED *a);
858int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs,
char *buf,
int size);
859int i2a_ASN1_OBJECT(BIO *bp,
const ASN1_OBJECT *a);
860int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs,
char *buf,
int size);
861int i2a_ASN1_STRING(BIO *bp,
const ASN1_STRING *a,
int type);
862int i2t_ASN1_OBJECT(
char *buf,
int buf_len,
const ASN1_OBJECT *a);
864int a2d_ASN1_OBJECT(
unsigned char *out,
int olen,
const char *buf,
int num);
865ASN1_OBJECT *ASN1_OBJECT_create(
int nid,
unsigned char *data,
int len,
866 const char *sn,
const char *ln);
868int ASN1_INTEGER_get_int64(int64_t *pr,
const ASN1_INTEGER *a);
869int ASN1_INTEGER_set_int64(ASN1_INTEGER *a, int64_t r);
870int ASN1_INTEGER_get_uint64(uint64_t *pr,
const ASN1_INTEGER *a);
871int ASN1_INTEGER_set_uint64(ASN1_INTEGER *a, uint64_t r);
873int ASN1_INTEGER_set(ASN1_INTEGER *a,
long v);
874long ASN1_INTEGER_get(
const ASN1_INTEGER *a);
875ASN1_INTEGER *BN_to_ASN1_INTEGER(
const BIGNUM *bn, ASN1_INTEGER *ai);
876BIGNUM *ASN1_INTEGER_to_BN(
const ASN1_INTEGER *ai, BIGNUM *bn);
878int ASN1_ENUMERATED_get_int64(int64_t *pr,
const ASN1_ENUMERATED *a);
879int ASN1_ENUMERATED_set_int64(ASN1_ENUMERATED *a, int64_t r);
882int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a,
long v);
883long ASN1_ENUMERATED_get(
const ASN1_ENUMERATED *a);
884ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(
const BIGNUM *bn, ASN1_ENUMERATED *ai);
885BIGNUM *ASN1_ENUMERATED_to_BN(
const ASN1_ENUMERATED *ai, BIGNUM *bn);
889int ASN1_PRINTABLE_type(
const unsigned char *s,
int max);
891unsigned long ASN1_tag2bit(
int tag);
894int ASN1_get_object(
const unsigned char **pp,
long *plength,
int *ptag,
895 int *pclass,
long omax);
896int ASN1_check_infinite_end(
unsigned char **p,
long len);
897int ASN1_const_check_infinite_end(
const unsigned char **p,
long len);
898void ASN1_put_object(
unsigned char **pp,
int constructed,
int length,
899 int tag,
int xclass);
900int ASN1_put_eoc(
unsigned char **pp);
901int ASN1_object_size(
int constructed,
int length,
int tag);
904void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i,
const void *x);
906# define ASN1_dup_of(type,i2d,d2i,x) \
907 ((type*)ASN1_dup(CHECKED_I2D_OF(type, i2d), \
908 CHECKED_D2I_OF(type, d2i), \
909 CHECKED_PTR_OF(const type, x)))
911void *ASN1_item_dup(
const ASN1_ITEM *it,
const void *x);
912int ASN1_item_sign_ex(
const ASN1_ITEM *it, X509_ALGOR *algor1,
913 X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
914 const void *data,
const ASN1_OCTET_STRING *
id,
915 EVP_PKEY *pkey,
const EVP_MD *md, OSSL_LIB_CTX *libctx,
917int ASN1_item_verify_ex(
const ASN1_ITEM *it,
const X509_ALGOR *alg,
918 const ASN1_BIT_STRING *signature,
const void *data,
919 const ASN1_OCTET_STRING *
id, EVP_PKEY *pkey,
920 OSSL_LIB_CTX *libctx,
const char *propq);
924# define M_ASN1_new_of(type) (type *)ASN1_item_new(ASN1_ITEM_rptr(type))
925# define M_ASN1_free_of(x, type) \
926 ASN1_item_free(CHECKED_PTR_OF(type, x), ASN1_ITEM_rptr(type))
928# ifndef OPENSSL_NO_STDIO
929void *ASN1_d2i_fp(
void *(*xnew) (
void), d2i_of_void *d2i, FILE *in,
void **x);
931# define ASN1_d2i_fp_of(type,xnew,d2i,in,x) \
932 ((type*)ASN1_d2i_fp(CHECKED_NEW_OF(type, xnew), \
933 CHECKED_D2I_OF(type, d2i), \
935 CHECKED_PPTR_OF(type, x)))
937void *ASN1_item_d2i_fp_ex(
const ASN1_ITEM *it, FILE *in,
void *x,
938 OSSL_LIB_CTX *libctx,
const char *propq);
939void *ASN1_item_d2i_fp(
const ASN1_ITEM *it, FILE *in,
void *x);
940int ASN1_i2d_fp(i2d_of_void *i2d, FILE *out,
const void *x);
942# define ASN1_i2d_fp_of(type,i2d,out,x) \
943 (ASN1_i2d_fp(CHECKED_I2D_OF(type, i2d), \
945 CHECKED_PTR_OF(const type, x)))
947int ASN1_item_i2d_fp(
const ASN1_ITEM *it, FILE *out,
const void *x);
948int ASN1_STRING_print_ex_fp(FILE *fp,
const ASN1_STRING *str,
unsigned long flags);
951int ASN1_STRING_to_UTF8(
unsigned char **out,
const ASN1_STRING *in);
953void *ASN1_d2i_bio(
void *(*xnew) (
void), d2i_of_void *d2i, BIO *in,
void **x);
955# define ASN1_d2i_bio_of(type,xnew,d2i,in,x) \
956 ((type*)ASN1_d2i_bio( CHECKED_NEW_OF(type, xnew), \
957 CHECKED_D2I_OF(type, d2i), \
959 CHECKED_PPTR_OF(type, x)))
961void *ASN1_item_d2i_bio_ex(
const ASN1_ITEM *it, BIO *in,
void *pval,
962 OSSL_LIB_CTX *libctx,
const char *propq);
963void *ASN1_item_d2i_bio(
const ASN1_ITEM *it, BIO *in,
void *pval);
964int ASN1_i2d_bio(i2d_of_void *i2d, BIO *out,
const void *x);
966# define ASN1_i2d_bio_of(type,i2d,out,x) \
967 (ASN1_i2d_bio(CHECKED_I2D_OF(type, i2d), \
969 CHECKED_PTR_OF(const type, x)))
971int ASN1_item_i2d_bio(
const ASN1_ITEM *it, BIO *out,
const void *x);
972BIO *ASN1_item_i2d_mem_bio(
const ASN1_ITEM *it,
const ASN1_VALUE *val);
973int ASN1_UTCTIME_print(BIO *fp,
const ASN1_UTCTIME *a);
974int ASN1_GENERALIZEDTIME_print(BIO *fp,
const ASN1_GENERALIZEDTIME *a);
975int ASN1_TIME_print(BIO *bp,
const ASN1_TIME *
tm);
976int ASN1_TIME_print_ex(BIO *bp,
const ASN1_TIME *
tm,
unsigned long flags);
977int ASN1_STRING_print(BIO *bp,
const ASN1_STRING *v);
978int ASN1_STRING_print_ex(BIO *out,
const ASN1_STRING *str,
unsigned long flags);
979int ASN1_buf_print(BIO *bp,
const unsigned char *buf,
size_t buflen,
int off);
980int ASN1_bn_print(BIO *bp,
const char *number,
const BIGNUM *num,
981 unsigned char *buf,
int off);
982int ASN1_parse(BIO *bp,
const unsigned char *pp,
long len,
int indent);
983int ASN1_parse_dump(BIO *bp,
const unsigned char *pp,
long len,
int indent,
985const char *ASN1_tag2str(
int tag);
989int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s);
991int ASN1_TYPE_set_octetstring(ASN1_TYPE *a,
unsigned char *data,
int len);
992int ASN1_TYPE_get_octetstring(
const ASN1_TYPE *a,
unsigned char *data,
int max_len);
993int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a,
long num,
994 unsigned char *data,
int len);
995int ASN1_TYPE_get_int_octetstring(
const ASN1_TYPE *a,
long *num,
996 unsigned char *data,
int max_len);
998void *ASN1_item_unpack(
const ASN1_STRING *oct,
const ASN1_ITEM *it);
1000ASN1_STRING *ASN1_item_pack(
void *obj,
const ASN1_ITEM *it,
1001 ASN1_OCTET_STRING **oct);
1003void ASN1_STRING_set_default_mask(
unsigned long mask);
1004int ASN1_STRING_set_default_mask_asc(
const char *p);
1005unsigned long ASN1_STRING_get_default_mask(
void);
1006int ASN1_mbstring_copy(ASN1_STRING **out,
const unsigned char *in,
int len,
1007 int inform,
unsigned long mask);
1008int ASN1_mbstring_ncopy(ASN1_STRING **out,
const unsigned char *in,
int len,
1009 int inform,
unsigned long mask,
1010 long minsize,
long maxsize);
1012ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out,
1013 const unsigned char *in,
int inlen,
1014 int inform,
int nid);
1015ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(
int nid);
1016int ASN1_STRING_TABLE_add(
int,
long,
long,
unsigned long,
unsigned long);
1017void ASN1_STRING_TABLE_cleanup(
void);
1022ASN1_VALUE *ASN1_item_new(
const ASN1_ITEM *it);
1023ASN1_VALUE *ASN1_item_new_ex(
const ASN1_ITEM *it, OSSL_LIB_CTX *libctx,
1025void ASN1_item_free(ASN1_VALUE *val,
const ASN1_ITEM *it);
1026ASN1_VALUE *ASN1_item_d2i_ex(ASN1_VALUE **val,
const unsigned char **in,
1027 long len,
const ASN1_ITEM *it,
1028 OSSL_LIB_CTX *libctx,
const char *propq);
1029ASN1_VALUE *ASN1_item_d2i(ASN1_VALUE **val,
const unsigned char **in,
1030 long len,
const ASN1_ITEM *it);
1031int ASN1_item_i2d(
const ASN1_VALUE *val,
unsigned char **out,
const ASN1_ITEM *it);
1032int ASN1_item_ndef_i2d(
const ASN1_VALUE *val,
unsigned char **out,
1033 const ASN1_ITEM *it);
1035void ASN1_add_oid_module(
void);
1036void ASN1_add_stable_module(
void);
1038ASN1_TYPE *ASN1_generate_nconf(
const char *str, CONF *nconf);
1039ASN1_TYPE *ASN1_generate_v3(
const char *str, X509V3_CTX *cnf);
1040int ASN1_str2mask(
const char *str,
unsigned long *pmask);
1045# define ASN1_PCTX_FLAGS_SHOW_ABSENT 0x001
1047# define ASN1_PCTX_FLAGS_SHOW_SEQUENCE 0x002
1049# define ASN1_PCTX_FLAGS_SHOW_SSOF 0x004
1051# define ASN1_PCTX_FLAGS_SHOW_TYPE 0x008
1053# define ASN1_PCTX_FLAGS_NO_ANY_TYPE 0x010
1055# define ASN1_PCTX_FLAGS_NO_MSTRING_TYPE 0x020
1057# define ASN1_PCTX_FLAGS_NO_FIELD_NAME 0x040
1059# define ASN1_PCTX_FLAGS_SHOW_FIELD_STRUCT_NAME 0x080
1061# define ASN1_PCTX_FLAGS_NO_STRUCT_NAME 0x100
1063int ASN1_item_print(BIO *out,
const ASN1_VALUE *ifld,
int indent,
1064 const ASN1_ITEM *it,
const ASN1_PCTX *pctx);
1065ASN1_PCTX *ASN1_PCTX_new(
void);
1066void ASN1_PCTX_free(ASN1_PCTX *p);
1067unsigned long ASN1_PCTX_get_flags(
const ASN1_PCTX *p);
1068void ASN1_PCTX_set_flags(ASN1_PCTX *p,
unsigned long flags);
1069unsigned long ASN1_PCTX_get_nm_flags(
const ASN1_PCTX *p);
1070void ASN1_PCTX_set_nm_flags(ASN1_PCTX *p,
unsigned long flags);
1071unsigned long ASN1_PCTX_get_cert_flags(
const ASN1_PCTX *p);
1072void ASN1_PCTX_set_cert_flags(ASN1_PCTX *p,
unsigned long flags);
1073unsigned long ASN1_PCTX_get_oid_flags(
const ASN1_PCTX *p);
1074void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p,
unsigned long flags);
1075unsigned long ASN1_PCTX_get_str_flags(
const ASN1_PCTX *p);
1076void ASN1_PCTX_set_str_flags(ASN1_PCTX *p,
unsigned long flags);
1078ASN1_SCTX *ASN1_SCTX_new(
int (*scan_cb) (ASN1_SCTX *ctx));
1079void ASN1_SCTX_free(ASN1_SCTX *p);
1080const ASN1_ITEM *ASN1_SCTX_get_item(ASN1_SCTX *p);
1082unsigned long ASN1_SCTX_get_flags(ASN1_SCTX *p);
1083void ASN1_SCTX_set_app_data(ASN1_SCTX *p,
void *data);
1084void *ASN1_SCTX_get_app_data(ASN1_SCTX *p);
1086const BIO_METHOD *BIO_f_asn1(
void);
1089BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val,
const ASN1_ITEM *it);
1091int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in,
int flags,
1092 const ASN1_ITEM *it);
1093int PEM_write_bio_ASN1_stream(BIO *out, ASN1_VALUE *val, BIO *in,
int flags,
1094 const char *hdr,
const ASN1_ITEM *it);
1096int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data,
int flags,
1097 int ctype_nid,
int econt_nid,
1098 STACK_OF(X509_ALGOR) *mdalgs,
const ASN1_ITEM *it);
1099int SMIME_write_ASN1_ex(BIO *bio, ASN1_VALUE *val, BIO *data,
int flags,
1100 int ctype_nid,
int econt_nid,
1101 STACK_OF(X509_ALGOR) *mdalgs,
const ASN1_ITEM *it,
1102 OSSL_LIB_CTX *libctx,
const char *propq);
1103ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont,
const ASN1_ITEM *it);
1104ASN1_VALUE *SMIME_read_ASN1_ex(BIO *bio,
int flags, BIO **bcont,
1105 const ASN1_ITEM *it, ASN1_VALUE **x,
1106 OSSL_LIB_CTX *libctx,
const char *propq);
1107int SMIME_crlf_copy(BIO *in, BIO *out,
int flags);
1108int SMIME_text(BIO *in, BIO *out);
1110const ASN1_ITEM *ASN1_ITEM_lookup(
const char *name);
1111const ASN1_ITEM *ASN1_ITEM_get(
size_t i);
1114# define DECLARE_ASN1_FUNCTIONS_fname(type, itname, name) \
1115 DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \
1116 DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name)
1117# define DECLARE_ASN1_FUNCTIONS_const(type) DECLARE_ASN1_FUNCTIONS(type)
1118# define DECLARE_ASN1_ENCODE_FUNCTIONS_const(type, name) \
1119 DECLARE_ASN1_ENCODE_FUNCTIONS(type, name)
1120# define I2D_OF_const(type) I2D_OF(type)
1121# define ASN1_dup_of_const(type,i2d,d2i,x) ASN1_dup_of(type,i2d,d2i,x)
1122# define ASN1_i2d_fp_of_const(type,i2d,out,x) ASN1_i2d_fp_of(type,i2d,out,x)
1123# define ASN1_i2d_bio_of_const(type,i2d,out,x) ASN1_i2d_bio_of(type,i2d,out,x)