Add preliminary user level config documentation for extension stuff. Programming
[openssl.git] / apps / s_client.c
index 2830785c9594f039c698368ae8edcef81318eef5..a75e8ae3112227b7e939ebc3ea7b24318008fc96 100644 (file)
@@ -743,9 +743,13 @@ int full;
        BIO_printf(bio,"%s, Cipher is %s\n",
                SSL_CIPHER_get_version(c),
                SSL_CIPHER_get_name(c));
-       if (peer != NULL)
+       if (peer != NULL) {
+               EVP_PKEY *pktmp;
+               pktmp = X509_get_pubkey(peer);
                BIO_printf(bio,"Server public key is %d bit\n",
-                       EVP_PKEY_bits(X509_get_pubkey(peer)));
+                                                        EVP_PKEY_bits(pktmp));
+               EVP_PKEY_free(pktmp);
+       }
        SSL_SESSION_print(bio,SSL_get_session(s));
        BIO_printf(bio,"---\n");
        if (peer != NULL)