diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2016-04-10 13:18:50 +0900 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-04-11 09:59:04 -0400 |
commit | 9d5ac9532c58c8b2d10d5e8ee8029dcb40aecfbe (patch) | |
tree | 95112041d4a08b98e0f390c0d14d7e4f1a8aa021 /doc/ssl | |
parent | 3012e650398a83e72f3ce63c3803e06765dae735 (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 'doc/ssl')
-rw-r--r-- | doc/ssl/SSL_get_ciphers.pod | 15 | ||||
-rw-r--r-- | doc/ssl/ssl.pod | 2 |
2 files changed, 11 insertions, 6 deletions
diff --git a/doc/ssl/SSL_get_ciphers.pod b/doc/ssl/SSL_get_ciphers.pod index 5e4bc08dcd..a017392611 100644 --- a/doc/ssl/SSL_get_ciphers.pod +++ b/doc/ssl/SSL_get_ciphers.pod @@ -2,13 +2,14 @@ =head1 NAME -SSL_get_ciphers, SSL_get_cipher_list - get list of available SSL_CIPHERs +SSL_get_ciphers, SSL_CTX_get_ciphers, SSL_get_cipher_list - get list of available SSL_CIPHERs =head1 SYNOPSIS #include <openssl/ssl.h> STACK_OF(SSL_CIPHER) *SSL_get_ciphers(const SSL *ssl); + STACK_OF(SSL_CIPHER) *SSL_CTX_get_ciphers(const SSL_CTX *ctx); STACK_OF(SSL_CIPHER) *SSL_get1_supported_ciphers(SSL *s); STACK_OF(SSL_CIPHER) *SSL_get_client_ciphers(const SSL *ssl); const char *SSL_get_cipher_list(const SSL *ssl, int priority); @@ -19,6 +20,8 @@ SSL_get_ciphers() returns the stack of available SSL_CIPHERs for B<ssl>, sorted by preference. If B<ssl> is NULL or no ciphers are available, NULL is returned. +SSL_CTX_get_ciphers() returns the stack of available SSL_CIPHERs for B<ctx>. + SSL_get1_supported_ciphers() returns the stack of enabled SSL_CIPHERs for B<ssl>, sorted by preference. The list depends on settings like the cipher list, the supported protocol @@ -43,17 +46,17 @@ is returned. =head1 NOTES -The details of the ciphers obtained by SSL_get_ciphers(), +The details of the ciphers obtained by SSL_get_ciphers(), SSL_CTX_get_ciphers() SSL_get1_supported_ciphers() and SSL_get_client_ciphers() can be obtained using the L<SSL_CIPHER_get_name(3)> family of functions. Call SSL_get_cipher_list() with B<priority> starting from 0 to obtain the sorted list of available ciphers, until NULL is returned. -Note: SSL_get_ciphers() and SSL_get_client_ciphers() return a pointer -to an internal cipher stack, which will be freed later on when the SSL -or SSL_SESSION object is freed. Therefore, the calling code B<MUST -NOT> free the return value itself. +Note: SSL_get_ciphers(), SSL_CTX_get_ciphers() and SSL_get_client_ciphers() +return a pointer to an internal cipher stack, which will be freed later on when +the SSL or SSL_SESSION object is freed. Therefore, the calling code B<MUST NOT> +free the return value itself. The stack returned by SSL_get1_supported_ciphers() should be freed using sk_SSL_CIPHER_free(). diff --git a/doc/ssl/ssl.pod b/doc/ssl/ssl.pod index c875163248..7e2cd85ffe 100644 --- a/doc/ssl/ssl.pod +++ b/doc/ssl/ssl.pod @@ -239,6 +239,8 @@ protocol context defined in the B<SSL_CTX> structure. =item X509_STORE *B<SSL_CTX_get_cert_store>(SSL_CTX *ctx); +=item STACK *B<SSL_CTX_get_ciphers>(const SSL_CTX *ctx); + =item STACK *B<SSL_CTX_get_client_CA_list>(const SSL_CTX *ctx); =item int (*B<SSL_CTX_get_client_cert_cb>(SSL_CTX *ctx))(SSL *ssl, X509 **x509, EVP_PKEY **pkey); |