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;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case LTC_ASN1_PRINTABLE_STRING:
|
case LTC_ASN1_PRINTABLE_STRING:
|
||||||
if (der_decode_printable_string(in, *inlen, data, &size) == CRYPT_OK) {
|
if (der_decode_printable_string(in, *inlen, data, &size) == CRYPT_OK) {
|
||||||
if (der_length_printable_string(data, size, &z) == 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 */
|
/* we have to decode the SEQUENCE header and get it's length */
|
||||||
|
|
||||||
/* move past type */
|
/* move past type */
|
||||||
++in; --(*inlen);
|
++in; --(*inlen);
|
||||||
|
|
||||||
/* read length byte */
|
/* read length byte */
|
||||||
x = *in++; --(*inlen);
|
x = *in++; --(*inlen);
|
||||||
|
|
||||||
/* smallest SEQUENCE/SET header */
|
/* smallest SEQUENCE/SET header */
|
||||||
y = 2;
|
y = 2;
|
||||||
|
|
||||||
/* now if it's > 127 the next bytes are the length of the length */
|
/* now if it's > 127 the next bytes are the length of the length */
|
||||||
if (x > 128) {
|
if (x > 128) {
|
||||||
x &= 0x7F;
|
x &= 0x7F;
|
||||||
in += x;
|
in += x;
|
||||||
*inlen -= x;
|
*inlen -= x;
|
||||||
|
|
||||||
/* update sequence header len */
|
/* update sequence header len */
|
||||||
y += x;
|
y += x;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sequence elements go as child */
|
/* Sequence elements go as child */
|
||||||
len = len - y;
|
len = len - y;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user