X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Fopenssl%2Fasn1t.h;h=455efffbab3b142985138fc281f1e2f121de37bc;hb=9471f7760dcc81fe6995f016fc7120db0c678818;hp=6467e4a6455d934a4d0c4adcb9c3b0d960cdb7ba;hpb=df2ee0e27d2db02660c1d15fe6a3e38be9df0a60;p=oweals%2Fopenssl.git diff --git a/include/openssl/asn1t.h b/include/openssl/asn1t.h index 6467e4a645..455efffbab 100644 --- a/include/openssl/asn1t.h +++ b/include/openssl/asn1t.h @@ -1,4 +1,3 @@ -/* asn1t.h */ /* * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project * 2000. @@ -102,6 +101,9 @@ extern "C" { { \ static const ASN1_ITEM local_it = { +# define static_ASN1_ITEM_start(itname) \ + static ASN1_ITEM_start(itname) + # define ASN1_ITEM_end(itname) \ }; \ return &local_it; \ @@ -205,8 +207,8 @@ extern "C" { static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_BROKEN, 0, 0, 0, 0}; \ ASN1_SEQUENCE(tname) -# define ASN1_SEQUENCE_ref(tname, cb, lck) \ - static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_REFCOUNT, offsetof(tname, references), lck, cb, 0}; \ +# define ASN1_SEQUENCE_ref(tname, cb) \ + static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_REFCOUNT, offsetof(tname, references), offsetof(tname, lock), cb, 0}; \ ASN1_SEQUENCE(tname) # define ASN1_SEQUENCE_enc(tname, enc, cb) \ @@ -387,6 +389,8 @@ extern "C" { # endif /* Plain simple type */ # define ASN1_SIMPLE(stname, field, type) ASN1_EX_TYPE(0,0, stname, field, type) +/* Embedded simple type */ +# define ASN1_EMBED(stname, field, type) ASN1_EX_TYPE(ASN1_TFLG_EMBED,0, stname, field, type) /* OPTIONAL simple type */ # define ASN1_OPT(stname, field, type) ASN1_EX_TYPE(ASN1_TFLG_OPTIONAL, 0, stname, field, type) @@ -459,12 +463,12 @@ extern "C" { # ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION -# define ASN1_ADB_END(name, flags, field, app_table, def, none) \ +# define ASN1_ADB_END(name, flags, field, adb_cb, def, none) \ ;\ static const ASN1_ADB name##_adb = {\ flags,\ offsetof(name, field),\ - app_table,\ + adb_cb,\ name##_adbtbl,\ sizeof(name##_adbtbl) / sizeof(ASN1_ADB_TABLE),\ def,\ @@ -473,7 +477,7 @@ extern "C" { # else -# define ASN1_ADB_END(name, flags, field, app_table, def, none) \ +# define ASN1_ADB_END(name, flags, field, adb_cb, def, none) \ ;\ static const ASN1_ITEM *name##_adb(void) \ { \ @@ -481,7 +485,7 @@ extern "C" { {\ flags,\ offsetof(name, field),\ - app_table,\ + adb_cb,\ name##_adbtbl,\ sizeof(name##_adbtbl) / sizeof(ASN1_ADB_TABLE),\ def,\ @@ -525,7 +529,7 @@ typedef struct ASN1_ADB_st ASN1_ADB; struct ASN1_ADB_st { unsigned long flags; /* Various flags */ unsigned long offset; /* Offset of selector field */ - STACK_OF(ASN1_ADB_TABLE) **app_items; /* Application defined items */ + int (*adb_cb)(long *psel); /* Application callback */ const ASN1_ADB_TABLE *tbl; /* Table of possible types */ long tblcount; /* Number of entries in tbl */ const ASN1_TEMPLATE *default_tt; /* Type to use if no match */ @@ -613,6 +617,9 @@ struct ASN1_ADB_TABLE_st { # define ASN1_TFLG_NDEF (0x1<<11) +/* Field is embedded and not a pointer */ +# define ASN1_TFLG_EMBED (0x1 << 12) + /* This is the actual ASN1 item itself */ struct ASN1_ITEM_st { @@ -956,7 +963,7 @@ DECLARE_ASN1_ITEM(BIGNUM) DECLARE_ASN1_ITEM(LONG) DECLARE_ASN1_ITEM(ZLONG) -DECLARE_STACK_OF(ASN1_VALUE) +DEFINE_STACK_OF(ASN1_VALUE) /* Functions used internally by the ASN1 code */