diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/t_spki.c')
-rw-r--r-- | src/lib/libcrypto/asn1/t_spki.c | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/src/lib/libcrypto/asn1/t_spki.c b/src/lib/libcrypto/asn1/t_spki.c index a73369b949..079c081a81 100644 --- a/src/lib/libcrypto/asn1/t_spki.c +++ b/src/lib/libcrypto/asn1/t_spki.c | |||
@@ -82,36 +82,11 @@ int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki) | |||
82 | (i == NID_undef)?"UNKNOWN":OBJ_nid2ln(i)); | 82 | (i == NID_undef)?"UNKNOWN":OBJ_nid2ln(i)); |
83 | pkey = X509_PUBKEY_get(spki->spkac->pubkey); | 83 | pkey = X509_PUBKEY_get(spki->spkac->pubkey); |
84 | if(!pkey) BIO_printf(out, " Unable to load public key\n"); | 84 | if(!pkey) BIO_printf(out, " Unable to load public key\n"); |
85 | else { | 85 | else |
86 | #ifndef OPENSSL_NO_RSA | ||
87 | if (pkey->type == EVP_PKEY_RSA) | ||
88 | { | ||
89 | BIO_printf(out," RSA Public Key: (%d bit)\n", | ||
90 | BN_num_bits(pkey->pkey.rsa->n)); | ||
91 | RSA_print(out,pkey->pkey.rsa,2); | ||
92 | } | ||
93 | else | ||
94 | #endif | ||
95 | #ifndef OPENSSL_NO_DSA | ||
96 | if (pkey->type == EVP_PKEY_DSA) | ||
97 | { | ||
98 | BIO_printf(out," DSA Public Key:\n"); | ||
99 | DSA_print(out,pkey->pkey.dsa,2); | ||
100 | } | ||
101 | else | ||
102 | #endif | ||
103 | #ifndef OPENSSL_NO_EC | ||
104 | if (pkey->type == EVP_PKEY_EC) | ||
105 | { | 86 | { |
106 | BIO_printf(out, " EC Public Key:\n"); | 87 | EVP_PKEY_print_public(out, pkey, 4, NULL); |
107 | EC_KEY_print(out, pkey->pkey.ec,2); | ||
108 | } | ||
109 | else | ||
110 | #endif | ||
111 | |||
112 | BIO_printf(out," Unknown Public Key:\n"); | ||
113 | EVP_PKEY_free(pkey); | 88 | EVP_PKEY_free(pkey); |
114 | } | 89 | } |
115 | chal = spki->spkac->challenge; | 90 | chal = spki->spkac->challenge; |
116 | if(chal->length) | 91 | if(chal->length) |
117 | BIO_printf(out, " Challenge String: %s\n", chal->data); | 92 | BIO_printf(out, " Challenge String: %s\n", chal->data); |