diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2002-11-15 03:26:07 +0300 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2002-11-15 03:26:07 +0300 |
commit | d78254aa2816f6c80220ada64f2231879003278b (patch) | |
tree | 1b6cdb8c70e2a888fd5a937729709a3860ff42cb /crypto | |
parent | af67804bef0a98882c3e4f5cb0764b078b1a7370 (diff) |
Add SETWRAP modifier to ASN1 generate.
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/asn1/asn1_gen.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/crypto/asn1/asn1_gen.c b/crypto/asn1/asn1_gen.c index 0c5dd9b52b..097b4b8ecf 100644 --- a/crypto/asn1/asn1_gen.c +++ b/crypto/asn1/asn1_gen.c @@ -67,7 +67,8 @@ #define ASN1_GEN_FLAG_BITWRAP (ASN1_GEN_FLAG|4) #define ASN1_GEN_FLAG_OCTWRAP (ASN1_GEN_FLAG|5) #define ASN1_GEN_FLAG_SEQWRAP (ASN1_GEN_FLAG|6) -#define ASN1_GEN_FLAG_FORMAT (ASN1_GEN_FLAG|7) +#define ASN1_GEN_FLAG_SETWRAP (ASN1_GEN_FLAG|7) +#define ASN1_GEN_FLAG_FORMAT (ASN1_GEN_FLAG|8) #define ASN1_GEN_STR(str,val) {str, sizeof(str) - 1, val} @@ -335,6 +336,11 @@ static int asn1_cb(const char *elem, int len, void *bitstr) return -1; break; + case ASN1_GEN_FLAG_SETWRAP: + if (!append_exp(arg, V_ASN1_SET, V_ASN1_UNIVERSAL, 1, 0, 1)) + return -1; + break; + case ASN1_GEN_FLAG_BITWRAP: if (!append_exp(arg, V_ASN1_BIT_STRING, V_ASN1_UNIVERSAL, 0, 1, 1)) return -1; @@ -588,6 +594,8 @@ static int asn1_str2tag(const char *tagstr, int len) ASN1_GEN_STR("OCTWRAP", ASN1_GEN_FLAG_OCTWRAP), /* SEQUENCE wrapper */ ASN1_GEN_STR("SEQWRAP", ASN1_GEN_FLAG_SEQWRAP), + /* SET wrapper */ + ASN1_GEN_STR("SETWRAP", ASN1_GEN_FLAG_SEQWRAP), /* BIT STRING wrapper */ ASN1_GEN_STR("BITWRAP", ASN1_GEN_FLAG_BITWRAP), ASN1_GEN_STR("FORM", ASN1_GEN_FLAG_FORMAT), |