Skip to content

Commit ce7ae84

Browse files
committed
correctly fix decoding of SubjectPublicKeyInfo
1 parent db7d7a8 commit ce7ae84

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/pk/asn1/der/sequence/der_decode_subject_public_key_info.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ int der_decode_subject_public_key_info(const unsigned char *in, unsigned long in
7272
* in a **BIT** string ... so we have to extract it then proceed to convert bit to octet
7373
*/
7474
LTC_SET_ASN1(subject_pubkey, 0, LTC_ASN1_SEQUENCE, alg_id, 2);
75-
LTC_SET_ASN1(subject_pubkey, 1, LTC_ASN1_RAW_BIT_STRING, tmpbuf, inlen);
75+
LTC_SET_ASN1(subject_pubkey, 1, LTC_ASN1_RAW_BIT_STRING, tmpbuf, inlen*8U);
7676

7777
err=der_decode_sequence(in, inlen, subject_pubkey, 2UL);
7878
if (err != CRYPT_OK) {

0 commit comments

Comments
 (0)