summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2016-04-10 13:18:50 +0900
committerRich Salz <rsalz@openssl.org>2016-04-11 09:59:04 -0400
commit9d5ac9532c58c8b2d10d5e8ee8029dcb40aecfbe (patch)
tree95112041d4a08b98e0f390c0d14d7e4f1a8aa021 /ssl
parent3012e650398a83e72f3ce63c3803e06765dae735 (diff)
Add SSL_CTX_get_ciphers()
Add an accessor for SSL_CTX. Since libssl was made opaque, there is no way for users to access the cipher_list, while users can set the cipher_list by SSL_CTX_set_cipher_list(). Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'ssl')
-rw-r--r--ssl/ssl_lib.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index 68fe4965cf..06d972349a 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -1999,6 +1999,15 @@ const char *SSL_get_cipher_list(const SSL *s, int n)
return (c->name);
}
+/** return a STACK of the ciphers available for the SSL_CTX and in order of
+ * preference */
+STACK_OF(SSL_CIPHER) *SSL_CTX_get_ciphers(const SSL_CTX *ctx)
+{
+ if (ctx != NULL)
+ return ctx->cipher_list;
+ return NULL;
+}
+
/** specify the ciphers to be used by default by the SSL_CTX */
int SSL_CTX_set_cipher_list(SSL_CTX *ctx, const char *str)
{