summaryrefslogtreecommitdiffstats
path: root/apps/req.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-04-02 15:12:58 +0200
committerRichard Levitte <levitte@openssl.org>2016-04-06 16:19:17 +0200
commit9862e9aa98ee1e38fbcef8d1dd5db0e750eb5e8d (patch)
treed7ddbd0b7d4c97875479e3b9cd52fdf579ca2434 /apps/req.c
parent3e41ac35281827b59e55d51058cf6bb086c1f2b5 (diff)
Make the RSA structure opaque
Move rsa_st away from public headers. Add accessor/writer functions for the public RSA data. Adapt all other source to use the accessors and writers. Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'apps/req.c')
-rw-r--r--apps/req.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/req.c b/apps/req.c
index b6a545fa38..e3869bab19 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -811,9 +811,11 @@ int req_main(int argc, char **argv)
}
fprintf(stdout, "Modulus=");
#ifndef OPENSSL_NO_RSA
- if (EVP_PKEY_base_id(tpubkey) == EVP_PKEY_RSA)
- BN_print(out, EVP_PKEY_get0_RSA(tpubkey)->n);
- else
+ if (EVP_PKEY_base_id(tpubkey) == EVP_PKEY_RSA) {
+ BIGNUM *n;
+ RSA_get0_key(EVP_PKEY_get0_RSA(tpubkey), &n, NULL, NULL);
+ BN_print(out, n);
+ } else
#endif
fprintf(stdout, "Wrong Algorithm type");
EVP_PKEY_free(tpubkey);