.\" .\" $OpenBSD: SSL_get_ciphers.3,v 1.2 2014/12/02 14:11:01 jmc Exp $ .\" .Dd $Mdocdate: December 2 2014 $ .Dt SSL_GET_CIPHERS 3 .Os .Sh NAME .Nm SSL_get_ciphers , .Nm SSL_get_cipher_list .Nd get list of available SSL_CIPHERs .Sh SYNOPSIS .In openssl/ssl.h .Ft STACK_OF(SSL_CIPHER) * .Fn SSL_get_ciphers "const SSL *ssl" .Ft const char * .Fn SSL_get_cipher_list "const SSL *ssl" "int priority" .Sh DESCRIPTION .Fn SSL_get_ciphers returns the stack of available .Vt SSL_CIPHER Ns s for .Fa ssl , sorted by preference. If .Fa ssl is .Dv NULL or no ciphers are available, .Dv NULL is returned. .Pp .Fn SSL_get_cipher_list returns a pointer to the name of the .Vt SSL_CIPHER listed for .Fa ssl with .Fa priority . If .Fa ssl is .Dv NULL , no ciphers are available, or there are fewer ciphers than .Fa priority available, .Dv NULL is returned. .Sh NOTES The details of the ciphers obtained by .Fn SSL_get_ciphers can be obtained using the .Xr SSL_CIPHER_get_name 3 family of functions. .Pp Call .Fn SSL_get_cipher_list with .Fa priority starting from 0 to obtain the sorted list of available ciphers, until .Dv NULL is returned. .Sh RETURN VALUES See .Sx DESCRIPTION . .Sh SEE ALSO .Xr ssl 3 , .Xr SSL_CIPHER_get_name 3 , .Xr SSL_CTX_set_cipher_list 3