diff options
author | Matt Caswell <matt@openssl.org> | 2016-03-30 17:18:55 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-04-03 00:23:56 +0100 |
commit | 6e9fa57c6ddde7df49983251373a05cd663aac22 (patch) | |
tree | 1930de43f7e9ec5a9a9597f8d70965f4b1aa80b7 /apps/x509.c | |
parent | 1258396d73cf937e4daaf2c35377011b9366f956 (diff) |
Make DSA_METHOD opaque
Move the dsa_method structure out of the public header file, and provide
getter and setter functions for creating and modifying custom DSA_METHODs.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Stephen Henson <steve@openssl.org>
Diffstat (limited to 'apps/x509.c')
-rw-r--r-- | apps/x509.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/x509.c b/apps/x509.c index 4319d69f81..00c0d97aa2 100644 --- a/apps/x509.c +++ b/apps/x509.c @@ -734,11 +734,15 @@ int x509_main(int argc, char **argv) else #endif #ifndef OPENSSL_NO_DSA - if (EVP_PKEY_id(pkey) == EVP_PKEY_DSA) - BN_print(out, DSA_get0_pub_key(EVP_PKEY_get0_DSA(pkey))); - else + if (EVP_PKEY_id(pkey) == EVP_PKEY_DSA) { + BIGNUM *dsapub = NULL; + DSA_get0_key(EVP_PKEY_get0_DSA(pkey), &dsapub, NULL); + BN_print(out, dsapub); + } else #endif + { BIO_printf(out, "Wrong Algorithm type"); + } BIO_printf(out, "\n"); } else if (pubkey == i) { EVP_PKEY *pkey; |