X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fasn1%2Ft_spki.c;h=23ab3b94e0bb03e3d4ce1823444959e3d8fc2020;hb=53d899676411c52c2389451887d0a0b2cd452802;hp=d708434fcabb7dd5c35faf95f91e712bd4fd1d14;hpb=8ce97163a2a3dea3d47e20f956032b50940422a2;p=oweals%2Fopenssl.git diff --git a/crypto/asn1/t_spki.c b/crypto/asn1/t_spki.c index d708434fca..23ab3b94e0 100644 --- a/crypto/asn1/t_spki.c +++ b/crypto/asn1/t_spki.c @@ -59,7 +59,10 @@ #include #include "cryptlib.h" #include -#include +#include +#include +#include +#include /* Print out an SPKI */ @@ -76,7 +79,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 { -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA if (pkey->type == EVP_PKEY_RSA) { BIO_printf(out," RSA Public Key: (%d bit)\n", @@ -85,7 +88,7 @@ int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki) } else #endif -#ifndef NO_DSA +#ifndef OPENSSL_NO_DSA if (pkey->type == EVP_PKEY_DSA) { BIO_printf(out," DSA Public Key:\n"); @@ -93,6 +96,15 @@ int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki) } 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); }