Add support for shared libraries with OS/2.
[oweals/openssl.git] / crypto / asn1 / t_x509.c
index 5de4833ed0517d4d9f3102197c0fa2538bf7c230..ae6d5ce041863ba3cf8e0b93de1db6869d7bac9b 100644 (file)
@@ -66,6 +66,9 @@
 #ifndef OPENSSL_NO_DSA
 #include <openssl/dsa.h>
 #endif
+#ifndef OPENSSL_NO_ECDSA
+#include <openssl/ecdsa.h>
+#endif
 #include <openssl/objects.h>
 #include <openssl/x509.h>
 #include <openssl/x509v3.h>
@@ -228,6 +231,14 @@ int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags, unsigned long cflag)
                        DSA_print(bp,pkey->pkey.dsa,16);
                        }
                else
+#endif
+#ifndef OPENSSL_NO_ECDSA
+               if (pkey->type == EVP_PKEY_ECDSA)
+                       {
+                       BIO_printf(bp, "%12sECDSA Public Key:\n","");
+                       ECDSA_print(bp, pkey->pkey.ecdsa, 16);
+                       }
+               else
 #endif
                        BIO_printf(bp,"%12sUnknown Public Key:\n","");