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)