diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2018-08-03 22:26:47 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2018-08-07 09:44:12 +0200 |
commit | b1f619343d39cf5266ab91b9de4b4c6ee50c3d41 (patch) | |
tree | 76160708b6b8af19c5594ed2dace03fb76fb6e47 /lib | |
parent | a288a20ccdf63e6567070964b9b77771898c52d6 (diff) | |
download | gnutls-b1f619343d39cf5266ab91b9de4b4c6ee50c3d41.tar.gz |
Corrected the importing of ECDSA public keys
This seems to be a regression since EdDSA support. The call to
_gnutls_x509_get_pk_algorithm() in public key import was unnecessary
and in fact it was overriding the available curve with a curve associated
with the OID. As the ECDSA OID doesn't include the curve, that had the
result of deleting the already read curve.
Resolves #538
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pubkey.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/pubkey.c b/lib/pubkey.c index 162ceaa4a0..8fc42b95a5 100644 --- a/lib/pubkey.c +++ b/lib/pubkey.c @@ -1072,7 +1072,6 @@ gnutls_pubkey_import(gnutls_pubkey_t key, int result = 0, need_free = 0; gnutls_datum_t _data; ASN1_TYPE spk; - gnutls_ecc_curve_t curve; if (key == NULL) { gnutls_assert(); @@ -1119,14 +1118,7 @@ gnutls_pubkey_import(gnutls_pubkey_t key, goto cleanup; } - /* this has already been called by get_asn_mpis() thus it cannot - * fail. - */ - key->params.algo = _gnutls_x509_get_pk_algorithm(spk, "", &curve, NULL); - - key->params.curve = curve; key->bits = pubkey_to_bits(&key->params); - result = 0; cleanup: |