Kaydet (Commit) baf7c1e5 authored tarafından Benjamin Peterson's avatar Benjamin Peterson

use SSL_get_session

üst 5318c7aa
......@@ -1404,13 +1404,14 @@ cipher_to_tuple(const SSL_CIPHER *cipher)
static PyObject *PySSL_shared_ciphers(PySSLSocket *self)
{
SSL_SESSION *sess = SSL_get_session(self->ssl);
STACK_OF(SSL_CIPHER) *ciphers;
int i;
PyObject *res;
if (!self->ssl->session || !self->ssl->session->ciphers)
if (!sess || !sess->ciphers)
Py_RETURN_NONE;
ciphers = self->ssl->session->ciphers;
ciphers = sess->ciphers;
res = PyList_New(sk_SSL_CIPHER_num(ciphers));
if (!res)
return NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment