diff options
author | Dr. Stephen Henson <steve@openssl.org> | 1999-04-17 15:53:32 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 1999-04-17 15:53:32 +0000 |
commit | d77b3054cd87c2b13fa0169931f74b8e0dac5252 (patch) | |
tree | 9af5e9a4cc267a46a1dc1611ec6b9b580917e727 /crypto/asn1/a_type.c | |
parent | cfdcfede9cfb0c5f649f379255eea19b37f43f4f (diff) |
Add support for VISIBLESTRING and UTF8String
Diffstat (limited to 'crypto/asn1/a_type.c')
-rw-r--r-- | crypto/asn1/a_type.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/crypto/asn1/a_type.c b/crypto/asn1/a_type.c index a3cf736026..2f8a16174e 100644 --- a/crypto/asn1/a_type.c +++ b/crypto/asn1/a_type.c @@ -117,6 +117,12 @@ unsigned char **pp; case V_ASN1_UNIVERSALSTRING: r=M_i2d_ASN1_UNIVERSALSTRING(a->value.universalstring,pp); break; + case V_ASN1_UTF8STRING: + r=M_i2d_ASN1_UTF8STRING(a->value.utf8string,pp); + break; + case V_ASN1_VISIBLESTRING: + r=M_i2d_ASN1_VISIBLESTRING(a->value.visiblestring,pp); + break; case V_ASN1_BMPSTRING: r=M_i2d_ASN1_BMPSTRING(a->value.bmpstring,pp); break; @@ -196,6 +202,16 @@ long length; d2i_ASN1_OCTET_STRING(NULL,&p,max-p)) == NULL) goto err; break; + case V_ASN1_VISIBLESTRING: + if ((ret->value.visiblestring= + d2i_ASN1_VISIBLESTRING(NULL,&p,max-p)) == NULL) + goto err; + break; + case V_ASN1_UTF8STRING: + if ((ret->value.utf8string= + d2i_ASN1_UTF8STRING(NULL,&p,max-p)) == NULL) + goto err; + break; case V_ASN1_OBJECT: if ((ret->value.object= d2i_ASN1_OBJECT(NULL,&p,max-p)) == NULL) @@ -336,6 +352,7 @@ ASN1_TYPE *a; case V_ASN1_GENERALSTRING: case V_ASN1_UNIVERSALSTRING: case V_ASN1_BMPSTRING: + case V_ASN1_UTF8STRING: ASN1_STRING_free((ASN1_STRING *)a->value.ptr); break; default: |