de-/encode printable strings as well

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2514 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
nils 2005-08-24 08:00:44 +00:00
parent 260723da53
commit eec0e22b03
1 changed files with 2 additions and 0 deletions

View File

@ -972,6 +972,7 @@ static int asn1_decode_entry(sc_context_t *ctx,struct sc_asn1_entry *entry,
if (parm != NULL)
r = sc_asn1_decode_object_id(obj, objlen, (struct sc_object_id *) parm);
break;
case SC_ASN1_PRINTABLESTRING:
case SC_ASN1_UTF8STRING:
if (parm != NULL) {
assert(len != NULL);
@ -1218,6 +1219,7 @@ static int asn1_encode_entry(sc_context_t *ctx, const struct sc_asn1_entry *entr
assert(len != NULL);
r = encode_bit_field((const u8 *) parm, *len, &buf, &buflen);
break;
case SC_ASN1_PRINTABLESTRING:
case SC_ASN1_OCTET_STRING:
case SC_ASN1_UTF8STRING:
assert(len != NULL);