-.\" $OpenBSD: SSL_get_ciphers.3,v 1.2 2016/12/03 09:00:46 schwarze Exp $
-.\" OpenSSL c3e64028 Mar 30 11:50:14 2005 +0000
+.\" $OpenBSD: SSL_get_ciphers.3,v 1.3 2018/02/26 16:23:43 schwarze Exp $
+.\" full merge up to: OpenSSL c3e64028 Mar 30 11:50:14 2005 +0000
+.\" selective merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
-.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
-.\" Copyright (c) 2000, 2005, 2015 The OpenSSL Project. All rights reserved.
+.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>,
+.\" Nick Mathewson <nickm@torproject.org>, and Kazuki Yamaguchi <k@rhe.jp>.
+.\" Copyright (c) 2000, 2005, 2015, 2016 The OpenSSL Project.
+.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: December 3 2016 $
+.Dd $Mdocdate: February 26 2018 $
.Dt SSL_GET_CIPHERS 3
.Os
.Sh NAME
.Nm SSL_get_ciphers ,
+.Nm SSL_CTX_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 STACK_OF(SSL_CIPHER) *
+.Fn SSL_CTX_get_ciphers "const SSL_CTX *ctx"
.Ft const char *
.Fn SSL_get_cipher_list "const SSL *ssl" "int priority"
.Sh DESCRIPTION
.Dv NULL
is returned.
.Pp
+.Fn SSL_CTX_get_ciphers
+returns the stack of available
+.Vt SSL_CIPHER Ns s
+for
+.Fa ctx .
+.Pp
.Fn SSL_get_ciphers
-returns a pointer to an internal cipher stack, which will be freed
+and
+.Fn SSL_CTX_get_ciphers
+return pointers to internal cipher stacks, which will be freed
later on when the
.Vt SSL
+or
+.Vt SSL_CTX
object is freed.
Therefore, the calling code must not free the return value itself.
.Pp
The details of the ciphers obtained by
.Fn SSL_get_ciphers
+and
+.Fn SSL_CTX_get_ciphers
can be obtained using the
.Xr SSL_CIPHER_get_name 3
family of functions.