diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-05-22 15:59:58 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-05-22 15:59:58 +0200 |
commit | 80febddf239ff7209a4eaf184023f336fcdc5fde (patch) | |
tree | 046b9bb655c970e4c0327cb0a606aaabe266360f /lib/x509/mpi.c | |
parent | f099342688710138ba8cd94e47846bda5c331faf (diff) | |
download | gnutls-80febddf239ff7209a4eaf184023f336fcdc5fde.tar.gz |
print information on ECC certificates.
Diffstat (limited to 'lib/x509/mpi.c')
-rw-r--r-- | lib/x509/mpi.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/lib/x509/mpi.c b/lib/x509/mpi.c index b57e7988a8..37a8386946 100644 --- a/lib/x509/mpi.c +++ b/lib/x509/mpi.c @@ -123,24 +123,27 @@ _gnutls_get_asn_mpis (ASN1_TYPE asn, const char *root, _asnstr_append_name (name, sizeof (name), root, ".algorithm.parameters"); - result = _gnutls_x509_read_value (asn, name, &tmp, 0); /* FIXME: If the parameters are not included in the certificate * then the issuer's parameters should be used. This is not * done yet. */ - if (result < 0 && pk_algorithm != GNUTLS_PK_RSA) /* RSA doesn't use parameters */ + if (pk_algorithm != GNUTLS_PK_RSA) /* RSA doesn't use parameters */ { - gnutls_assert (); - goto error; - } - - if ((result = - _gnutls_x509_read_pubkey_params (pk_algorithm, tmp.data, tmp.size, params)) < 0) - { - gnutls_assert (); - goto error; + result = _gnutls_x509_read_value (asn, name, &tmp, 0); + if (result < 0) + { + gnutls_assert (); + goto error; + } + + if ((result = + _gnutls_x509_read_pubkey_params (pk_algorithm, tmp.data, tmp.size, params)) < 0) + { + gnutls_assert (); + goto error; + } } result = 0; |