GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
SSL_GET_SHARED_CIPHERS(3) FreeBSD Library Functions Manual SSL_GET_SHARED_CIPHERS(3)

SSL_get_shared_ciphersciphers supported by both client and server

#include <openssl/ssl.h>

char *
SSL_get_shared_ciphers(const SSL *ssl, char *buf, int len);

If ssl contains a session in server mode, () puts as many names of ciphers that are supported by both the client and the server into the buffer buf as the buffer is long enough to contain. Names are separated by colons. At most len bytes are written to buf including the terminating NUL character.

SSL_get_shared_ciphers() returns buf on success or NULL on failure. The following situations cause failure:

  • SSL_is_server(3) is false, i.e., ssl is not set to server mode.
  • SSL_get_ciphers(3) is NULL or empty, i.e., no ciphers are available for use by the server.
  • SSL_get_session(3) is NULL, i.e., ssl contains no session.
  • SSL_get_client_ciphers(3) is NULL or empty, i.e., ssl contains no information about ciphers supported by the client, or the client does not support any ciphers.
  • The len argument is less than 2.

ssl(3), SSL_get_ciphers(3)

SSL_get_shared_ciphers() first appeared in SSLeay 0.4.5b and has been available since OpenBSD 2.4.

If the list is too long to fit into len bytes, it is silently truncated after the last cipher name that fits, and all following ciphers are skipped. If the buffer is very short such that even the first cipher name does not fit, an empty string is returned even when some shared ciphers are actually available.

There is no easy way to find out how much space is required for buf or whether the supplied space was sufficient.

January 9, 2021 FreeBSD 14.3-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.