diff options
author | gregor herrmann <gregoa@debian.org> | 2023-11-01 21:24:22 +0100 |
---|---|---|
committer | gregor herrmann <gregoa@debian.org> | 2023-11-01 21:24:22 +0100 |
commit | 2d0f50ad4f8bad20bcbbdd9b3e0b6ec50588a19e (patch) | |
tree | 63c67a75ad1517c857170ceb46833c2bdee49977 /src/ltc/pk/dsa/dsa_import.c | |
parent | 5ac0a817d688c51b3ee0109aac17d73dcbbc8645 (diff) | |
parent | d0028b7800375d4b99b3b7fa0b080463b5f20516 (diff) |
Update upstream source from tag 'upstream/0.080'
Update to upstream version '0.080'
with Debian dir 292de44fa919f7a5d6252cc2a47f56ca9a8efe3d
Diffstat (limited to 'src/ltc/pk/dsa/dsa_import.c')
-rw-r--r-- | src/ltc/pk/dsa/dsa_import.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/ltc/pk/dsa/dsa_import.c b/src/ltc/pk/dsa/dsa_import.c index a1d22818..b5660d39 100644 --- a/src/ltc/pk/dsa/dsa_import.c +++ b/src/ltc/pk/dsa/dsa_import.c @@ -28,7 +28,7 @@ int dsa_import(const unsigned char *in, unsigned long inlen, dsa_key *key) LTC_ARGCHK(ltc_mp.name != NULL); /* init key */ - if (mp_init_multi(&key->p, &key->g, &key->q, &key->x, &key->y, NULL) != CRYPT_OK) { + if (mp_init_multi(&key->p, &key->g, &key->q, &key->x, &key->y, LTC_NULL) != CRYPT_OK) { return CRYPT_MEM; } @@ -72,14 +72,14 @@ int dsa_import(const unsigned char *in, unsigned long inlen, dsa_key *key) } } /* get key type */ - if ((err = der_decode_sequence_multi(in, inlen, - LTC_ASN1_SHORT_INTEGER, 1UL, &zero, - LTC_ASN1_INTEGER, 1UL, key->p, - LTC_ASN1_INTEGER, 1UL, key->q, - LTC_ASN1_INTEGER, 1UL, key->g, - LTC_ASN1_INTEGER, 1UL, key->y, - LTC_ASN1_INTEGER, 1UL, key->x, - LTC_ASN1_EOL, 0UL, NULL)) == CRYPT_OK) { + if (der_decode_sequence_multi(in, inlen, + LTC_ASN1_SHORT_INTEGER, 1UL, &zero, + LTC_ASN1_INTEGER, 1UL, key->p, + LTC_ASN1_INTEGER, 1UL, key->q, + LTC_ASN1_INTEGER, 1UL, key->g, + LTC_ASN1_INTEGER, 1UL, key->y, + LTC_ASN1_INTEGER, 1UL, key->x, + LTC_ASN1_EOL, 0UL, NULL) == CRYPT_OK) { key->type = PK_PRIVATE; } else { /* public */ @@ -97,7 +97,7 @@ int dsa_import(const unsigned char *in, unsigned long inlen, dsa_key *key) } len = 3; - err = x509_decode_subject_public_key_info(in, inlen, PKA_DSA, + err = x509_decode_subject_public_key_info(in, inlen, LTC_OID_DSA, tmpbuf, &tmpbuf_len, LTC_ASN1_SEQUENCE, params, &len); if (err != CRYPT_OK) { |