|
|
@@ -39,9 +39,10 @@ int dsa_import(const unsigned char *in, unsigned long inlen, dsa_key *key)
|
|
|
}
|
|
|
|
|
|
/* try to match the old libtomcrypt format */
|
|
|
- if ((err = der_decode_sequence_multi(in, inlen,
|
|
|
- LTC_ASN1_BIT_STRING, 1UL, flags,
|
|
|
- LTC_ASN1_EOL, 0UL, NULL)) == CRYPT_OK) {
|
|
|
+ err = der_decode_sequence_multi(in, inlen, LTC_ASN1_BIT_STRING, 1UL, flags,
|
|
|
+ LTC_ASN1_EOL, 0UL, NULL);
|
|
|
+
|
|
|
+ if (err == CRYPT_OK || err == CRYPT_PK_INVALID_SIZE) {
|
|
|
/* private key */
|
|
|
if (flags[0]) {
|
|
|
if ((err = der_decode_sequence_multi(in, inlen,
|