Patch so the new crl stuff actually compiles this time :-) Also update the
[openssl.git] / apps / s_client.c
index e5d281ba3b2fe4c08d221589e50987b6fe30d387..a75e8ae3112227b7e939ebc3ea7b24318008fc96 100644 (file)
@@ -104,7 +104,7 @@ static int c_quiet=0;
 
 static void sc_usage()
        {
-       BIO_printf(bio_err,"usage: client args\n");
+       BIO_printf(bio_err,"usage: s_client args\n");
        BIO_printf(bio_err,"\n");
        BIO_printf(bio_err," -host host     - use -connect instead\n");
        BIO_printf(bio_err," -port port     - use -connect instead\n");
@@ -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)