Merge pull request #286 from libtom/pr/fix-dsa-rsa-trouble

Fix DSA dependency on RSA
This commit is contained in:
karel-m 2017-09-01 20:15:52 +02:00 committed by GitHub
commit aade47c62c

View File

@ -86,7 +86,7 @@ int dsa_import(const unsigned char *in, unsigned long inlen, dsa_key *key)
key->type = PK_PRIVATE; key->type = PK_PRIVATE;
} else { /* public */ } else { /* public */
ltc_asn1_list params[3]; ltc_asn1_list params[3];
unsigned long tmpbuf_len = MAX_RSA_SIZE*8; unsigned long tmpbuf_len = LTC_DER_MAX_PUBKEY_SIZE*8;
LTC_SET_ASN1(params, 0, LTC_ASN1_INTEGER, key->p, 1UL); LTC_SET_ASN1(params, 0, LTC_ASN1_INTEGER, key->p, 1UL);
LTC_SET_ASN1(params, 1, LTC_ASN1_INTEGER, key->q, 1UL); LTC_SET_ASN1(params, 1, LTC_ASN1_INTEGER, key->q, 1UL);