Check sk_SSL_CIPHER_num() after assigning sk.
This commit is contained in:
parent
778f2b648c
commit
69526a354d
1 changed files with 3 additions and 2 deletions
|
@ -1347,11 +1347,12 @@ char *SSL_get_shared_ciphers(const SSL *s,char *buf,int len)
|
||||||
(len < 2))
|
(len < 2))
|
||||||
return(NULL);
|
return(NULL);
|
||||||
|
|
||||||
|
p=buf;
|
||||||
|
sk=s->session->ciphers;
|
||||||
|
|
||||||
if (sk_SSL_CIPHER_num(sk) == 0)
|
if (sk_SSL_CIPHER_num(sk) == 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
p=buf;
|
|
||||||
sk=s->session->ciphers;
|
|
||||||
for (i=0; i<sk_SSL_CIPHER_num(sk); i++)
|
for (i=0; i<sk_SSL_CIPHER_num(sk); i++)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
|
|
Loading…
Reference in a new issue