projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make
[openssl.git]
/
crypto
/
asn1
/
t_spki.c
diff --git
a/crypto/asn1/t_spki.c
b/crypto/asn1/t_spki.c
index f27342136d291ea3213b89f77988656a12bff3a0..c2a5797dd8bf3ad42bcefc74d885cfc234d9921e 100644
(file)
--- a/
crypto/asn1/t_spki.c
+++ b/
crypto/asn1/t_spki.c
@@
-60,6
+60,13
@@
#include "cryptlib.h"
#include <openssl/x509.h>
#include <openssl/asn1.h>
#include "cryptlib.h"
#include <openssl/x509.h>
#include <openssl/asn1.h>
+#ifndef OPENSSL_NO_RSA
+#include <openssl/rsa.h>
+#endif
+#ifndef OPENSSL_NO_DSA
+#include <openssl/dsa.h>
+#endif
+#include <openssl/bn.h>
/* Print out an SPKI */
/* Print out an SPKI */
@@
-76,7
+83,7
@@
int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki)
pkey = X509_PUBKEY_get(spki->spkac->pubkey);
if(!pkey) BIO_printf(out, " Unable to load public key\n");
else {
pkey = X509_PUBKEY_get(spki->spkac->pubkey);
if(!pkey) BIO_printf(out, " Unable to load public key\n");
else {
-#ifndef NO_RSA
+#ifndef
OPENSSL_
NO_RSA
if (pkey->type == EVP_PKEY_RSA)
{
BIO_printf(out," RSA Public Key: (%d bit)\n",
if (pkey->type == EVP_PKEY_RSA)
{
BIO_printf(out," RSA Public Key: (%d bit)\n",
@@
-85,7
+92,7
@@
int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki)
}
else
#endif
}
else
#endif
-#ifndef NO_DSA
+#ifndef
OPENSSL_
NO_DSA
if (pkey->type == EVP_PKEY_DSA)
{
BIO_printf(out," DSA Public Key:\n");
if (pkey->type == EVP_PKEY_DSA)
{
BIO_printf(out," DSA Public Key:\n");
@@
-93,6
+100,15
@@
int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki)
}
else
#endif
}
else
#endif
+#ifndef OPENSSL_NO_EC
+ if (pkey->type == EVP_PKEY_EC)
+ {
+ BIO_printf(out, " EC Public Key:\n");
+ EC_KEY_print(out, pkey->pkey.ec,2);
+ }
+ else
+#endif
+
BIO_printf(out," Unknown Public Key:\n");
EVP_PKEY_free(pkey);
}
BIO_printf(out," Unknown Public Key:\n");
EVP_PKEY_free(pkey);
}