trim trailing spaces
This commit is contained in:
parent
1fb649d394
commit
01c34dc236
@ -123,7 +123,6 @@ int der_decode_choice(const unsigned char *in, unsigned long *inlen,
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case LTC_ASN1_PRINTABLE_STRING:
|
||||
if (der_decode_printable_string(in, *inlen, data, &size) == CRYPT_OK) {
|
||||
if (der_length_printable_string(data, size, &z) == CRYPT_OK) {
|
||||
|
@ -336,24 +336,24 @@ int der_decode_sequence_flexi(const unsigned char *in, unsigned long *inlen, ltc
|
||||
|
||||
/* we have to decode the SEQUENCE header and get it's length */
|
||||
|
||||
/* move past type */
|
||||
++in; --(*inlen);
|
||||
/* move past type */
|
||||
++in; --(*inlen);
|
||||
|
||||
/* read length byte */
|
||||
x = *in++; --(*inlen);
|
||||
/* read length byte */
|
||||
x = *in++; --(*inlen);
|
||||
|
||||
/* smallest SEQUENCE/SET header */
|
||||
y = 2;
|
||||
/* smallest SEQUENCE/SET header */
|
||||
y = 2;
|
||||
|
||||
/* now if it's > 127 the next bytes are the length of the length */
|
||||
if (x > 128) {
|
||||
x &= 0x7F;
|
||||
in += x;
|
||||
*inlen -= x;
|
||||
/* now if it's > 127 the next bytes are the length of the length */
|
||||
if (x > 128) {
|
||||
x &= 0x7F;
|
||||
in += x;
|
||||
*inlen -= x;
|
||||
|
||||
/* update sequence header len */
|
||||
y += x;
|
||||
}
|
||||
/* update sequence header len */
|
||||
y += x;
|
||||
}
|
||||
|
||||
/* Sequence elements go as child */
|
||||
len = len - y;
|
||||
|
Loading…
x
Reference in New Issue
Block a user