fix call to SSL_get_peer_certificate()