save the plain constructed-, sequence- or set-data details
This commit is contained in:
parent
0a400f465f
commit
7ddce245b8
@ -348,6 +348,15 @@ int der_decode_sequence_flexi(const unsigned char *in, unsigned long *inlen, ltc
|
||||
l->type = LTC_ASN1_SET;
|
||||
}
|
||||
|
||||
if ((l->data = XMALLOC(len)) == NULL) {
|
||||
err = CRYPT_MEM;
|
||||
goto error;
|
||||
}
|
||||
|
||||
XMEMCPY(l->data, in, len);
|
||||
l->size = len;
|
||||
|
||||
|
||||
/* jump to the start of the data */
|
||||
in += data_offset;
|
||||
*inlen -= data_offset;
|
||||
|
@ -46,9 +46,7 @@ void der_sequence_free(ltc_asn1_list *in)
|
||||
}
|
||||
|
||||
switch (in->type) {
|
||||
case LTC_ASN1_SET:
|
||||
case LTC_ASN1_SETOF:
|
||||
case LTC_ASN1_SEQUENCE: break;
|
||||
case LTC_ASN1_SETOF: break;
|
||||
case LTC_ASN1_INTEGER : if (in->data != NULL) { mp_clear(in->data); } break;
|
||||
default : if (in->data != NULL) { XFREE(in->data); }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user