
#use wml::openssl-macros area=docs page=SSL_get_ciphers

<title>Documents, SSL_get_ciphers(3)</title>

<h1>SSL_get_ciphers(3)</h1>

#use wml::imp::generic

{:
## What's this? [[s|(<STRONG>[^<].+?)</A>(</STRONG><DD>)|$1$2|sg]]
[[s|<P>\s+<P>|<P>|sg]]
[[s|<P>\s+</|</|sg]]
[[s|<DD>\s*<DT>|<DD>&nbsp;<DT>|sg]]
[[s|<DD>\s*</DL>|<DD>&nbsp;</DL>|sg]]
[[s|\[|&#91;|sg]]
[[s|\]|&#93;|sg]]

<!-- INDEX BEGIN -->

<UL>

	<LI><A HREF="#NAME">NAME</A>
	<LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
	<LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
	<LI><A HREF="#NOTES">NOTES</A>
	<LI><A HREF="#RETURN_VALUES">RETURN VALUES</A>
	<LI><A HREF="#SEE_ALSO">SEE ALSO</A>
</UL>
<!-- INDEX END -->

<HR>
<P>
<HR>
<H1><A NAME="NAME">NAME</A></H1>
<P>
SSL_get_ciphers, SSL_get_cipher_list - get list of available SSL_CIPHERs

</P>
<P>
<HR>
<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
<PRE> #include &lt;openssl/ssl.h&gt;
</PRE>
<PRE> STACK_OF(SSL_CIPHER) *SSL_get_ciphers(const SSL *ssl);
 const char *SSL_get_cipher_list(const SSL *ssl, int priority);
</PRE>
<P>
<HR>
<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
<P>
<CODE>SSL_get_ciphers()</CODE> returns the stack of available SSL_CIPHERs
for <STRONG>ssl</STRONG>, sorted by preference. If <STRONG>ssl</STRONG> is NULL or no ciphers are available, NULL is returned.

</P>
<P>
<CODE>SSL_get_cipher_list()</CODE> returns a pointer to the name of the
SSL_CIPHER listed for <STRONG>ssl</STRONG> with <STRONG>priority</STRONG>. If <STRONG>ssl</STRONG> is NULL, no ciphers are available, or there are less ciphers than <STRONG>priority</STRONG> available, NULL is returned.

</P>
<P>
<HR>
<H1><A NAME="NOTES">NOTES</A></H1>
<P>
The details of the ciphers obtained by <CODE>SSL_get_ciphers()</CODE> can
be obtained using the <A HREF="../ssl/SSL_CIPHER_get_name.html#">SSL_CIPHER_get_name(3)</A> family of functions.

</P>
<P>
Call <CODE>SSL_get_cipher_list()</CODE> with <STRONG>priority</STRONG> starting from 0 to obtain the sorted list of available ciphers, until NULL
is returned.

</P>
<P>
<HR>
<H1><A NAME="RETURN_VALUES">RETURN VALUES</A></H1>
<P>
See DESCRIPTION

</P>
<P>
<HR>
<H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
<P>
<A HREF="../ssl/ssl.html#">ssl(3)</A>, <A HREF="../ssl/SSL_CTX_set_cipher_list.html#">SSL_CTX_set_cipher_list(3)</A>,
<A HREF="../ssl/SSL_CIPHER_get_name.html#">SSL_CIPHER_get_name(3)</A>



</P>
:}

