Merge branch 'pr/124' into develop

This closes #124
This commit is contained in:
Steffen Jaeckel 2017-02-21 11:50:25 +01:00
commit 5757fdb035
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ int der_decode_subject_public_key_info(const unsigned char *in, unsigned long in
/* this includes the internal hash ID and optional params (NULL in this case) */
LTC_SET_ASN1(alg_id, 0, LTC_ASN1_OBJECT_IDENTIFIER, tmpoid, sizeof(tmpoid)/sizeof(tmpoid[0]));
LTC_SET_ASN1(alg_id, 1, parameters_type, parameters, parameters_len);
LTC_SET_ASN1(alg_id, 1, (ltc_asn1_type)parameters_type, parameters, parameters_len);
/* the actual format of the SSL DER key is odd, it stores a RSAPublicKey
* in a **BIT** string ... so we have to extract it then proceed to convert bit to octet

View File

@ -50,7 +50,7 @@ int der_encode_subject_public_key_info(unsigned char *out, unsigned long *outlen
}
LTC_SET_ASN1(alg_id, 0, LTC_ASN1_OBJECT_IDENTIFIER, oid.OID, oid.OIDlen);
LTC_SET_ASN1(alg_id, 1, parameters_type, parameters, parameters_len);
LTC_SET_ASN1(alg_id, 1, (ltc_asn1_type)parameters_type, parameters, parameters_len);
return der_encode_sequence_multi(out, outlen,
LTC_ASN1_SEQUENCE, (unsigned long)sizeof(alg_id)/sizeof(alg_id[0]), alg_id,