Always build library object files with shared library cflags
[openssl.git] / crypto / x509 / t_x509.c
index 3a29f4082a73c583ca2c95260411e181d94071b6..996a755ae3de389ebaad7fd126eeadb267fa9963 100644 (file)
@@ -1,4 +1,3 @@
-/* crypto/x509/t_x509.c */
 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -209,13 +208,12 @@ int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags,
         if (BIO_puts(bp, "\n") <= 0)
             goto err;
 
-        pkey = X509_get_pubkey(x);
+        pkey = X509_get0_pubkey(x);
         if (pkey == NULL) {
             BIO_printf(bp, "%12sUnable to load Public Key\n", "");
             ERR_print_errors(bp);
         } else {
             EVP_PKEY_print_public(bp, pkey, 16, NULL);
-            EVP_PKEY_free(pkey);
         }
     }