Standard preamble:
========================================================================
..
.... Set up some character translations and predefined strings. \*(-- will
give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
double quote, and \*(R" will give a right double quote. \*(C+ will
give a nicer C++. Capital omega is used to do unbreakable dashes and
therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
nothing in troff, for use with C<>.
.tr \(*W- . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\}
Escape single quotes in literal strings from groff's Unicode transform.
If the F register is >0, we'll generate index entries on stderr for
titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
entries marked with X<> in POD. Of course, you'll have to process the
output yourself in some meaningful fashion.
Avoid warning from groff about undefined register 'F'.
.. .nr rF 0 . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF
Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] .\} . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents . \" corrections for vroff . \" for low resolution devices (crt and lpr) \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} ========================================================================
Title "SSL_CIPHER_GET_NAME 3"
way too many mistakes in technical documents.
\fBSSL_CIPHER_standard_name() returns a pointer to the standard \s-1RFC\s0 name of \fBcipher. If the cipher is \s-1NULL,\s0 it returns \*(L"(\s-1NONE\s0)\*(R". If the cipher has no standard name, it returns \s-1NULL\s0. If cipher was defined in both SSLv3 and \s-1TLS,\s0 it returns the \s-1TLS\s0 name.
\fBOPENSSL_cipher_name() returns a pointer to the OpenSSL name of stdname. If the stdname is \s-1NULL,\s0 or stdname has no corresponding OpenSSL name, it returns \*(L"(\s-1NONE\s0)\*(R". Where both exist, stdname should be the \s-1TLS\s0 name rather than the SSLv3 name.
\fBSSL_CIPHER_get_bits() returns the number of secret bits used for cipher. If cipher is \s-1NULL, 0\s0 is returned.
\fBSSL_CIPHER_get_version() returns string which indicates the \s-1SSL/TLS\s0 protocol version that first defined the cipher. It returns \*(L"(\s-1NONE\s0)\*(R" if cipher is \s-1NULL.\s0
\fBSSL_CIPHER_get_cipher_nid() returns the cipher \s-1NID\s0 corresponding to c. If there is no cipher (e.g. for cipher suites with no encryption) then \fBNID_undef is returned.
\fBSSL_CIPHER_get_digest_nid() returns the digest \s-1NID\s0 corresponding to the \s-1MAC\s0 used by c during record encryption/decryption. If there is no digest (e.g. for \s-1AEAD\s0 cipher suites) then NID_undef is returned.
\fBSSL_CIPHER_get_handshake_digest() returns an \s-1EVP_MD\s0 for the digest used during the \s-1SSL/TLS\s0 handshake when using the \s-1SSL_CIPHER\s0 c. Note that this may be different to the digest used to calculate the \s-1MAC\s0 for encrypted records.
\fBSSL_CIPHER_get_kx_nid() returns the key exchange \s-1NID\s0 corresponding to the method used by c. If there is no key exchange, then NID_undef is returned. If any appropriate key exchange algorithm can be used (as in the case of \s-1TLS 1.3\s0 cipher suites) NID_kx_any is returned. Examples (not comprehensive):
.Vb 4 NID_kx_rsa NID_kx_ecdhe NID_kx_dhe NID_kx_psk .Ve
\fBSSL_CIPHER_get_auth_nid() returns the authentication \s-1NID\s0 corresponding to the method used by c. If there is no authentication, then NID_undef is returned. If any appropriate authentication algorithm can be used (as in the case of \s-1TLS 1.3\s0 cipher suites) NID_auth_any is returned. Examples (not comprehensive):
.Vb 3 NID_auth_rsa NID_auth_ecdsa NID_auth_psk .Ve
\fBSSL_CIPHER_is_aead() returns 1 if the cipher c is \s-1AEAD\s0 (e.g. \s-1GCM\s0 or ChaCha20/Poly1305), and 0 if it is not \s-1AEAD.\s0
\fBSSL_CIPHER_find() returns a \s-1SSL_CIPHER\s0 structure which has the cipher \s-1ID\s0 stored in ptr. The ptr parameter is a two element array of char, which stores the two-byte \s-1TLS\s0 cipher \s-1ID\s0 (as allocated by \s-1IANA\s0) in network byte order. This parameter is usually retrieved from a \s-1TLS\s0 packet by using functions like \fBSSL_client_hello_get0_ciphers\|(3). SSL_CIPHER_find() returns \s-1NULL\s0 if an error occurs or the indicated cipher is not found.
\fBSSL_CIPHER_get_id() returns the OpenSSL-specific \s-1ID\s0 of the given cipher c. That \s-1ID\s0 is not the same as the IANA-specific \s-1ID.\s0
\fBSSL_CIPHER_get_protocol_id() returns the two-byte \s-1ID\s0 used in the \s-1TLS\s0 protocol of the given cipher c.
\fBSSL_CIPHER_description() returns a textual description of the cipher used into the buffer buf of length len provided. If buf is provided, it must be at least 128 bytes, otherwise a buffer will be allocated using \fBOPENSSL_malloc(). If the provided buffer is too small, or the allocation fails, \fB\s-1NULL\s0 is returned.
The string returned by SSL_CIPHER_description() consists of several fields separated by whitespace:
Some examples for the output of SSL_CIPHER_description():
.Vb 2 ECDHE-RSA-AES256-GCM-SHA256 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(256) Mac=AEAD RSA-PSK-AES256-CBC-SHA384 TLSv1.0 Kx=RSAPSK Au=RSA Enc=AES(256) Mac=SHA384 .Ve
\fBSSL_CIPHER_get_bits() returns a positive integer representing the number of secret bits or 0 if an error occurred.
\fBSSL_CIPHER_get_cipher_nid(), SSL_CIPHER_get_digest_nid(), \fBSSL_CIPHER_get_kx_nid() and SSL_CIPHER_get_auth_nid() return the \s-1NID\s0 value or \fBNID_undef if an error occurred.
\fBSSL_CIPHER_get_handshake_digest() returns a valid \s-1EVP_MD\s0 structure or \s-1NULL\s0 if an error occurred.
\fBSSL_CIPHER_is_aead() returns 1 if the cipher is \s-1AEAD\s0 or 0 otherwise.
\fBSSL_CIPHER_find() returns a valid \s-1SSL_CIPHER\s0 structure or \s-1NULL\s0 if an error occurred.
\fBSSL_CIPHER_get_id() returns a 4-byte integer representing the OpenSSL-specific \s-1ID.\s0
\fBSSL_CIPHER_get_protocol_id() returns a 2-byte integer representing the \s-1TLS\s0 protocol-specific \s-1ID.\s0
The SSL_CIPHER_description() function was changed to return \s-1NULL\s0 on error, rather than a fixed string, in OpenSSL 1.1.0.
The SSL_CIPHER_get_handshake_digest() function was added in OpenSSL 1.1.1.
The SSL_CIPHER_standard_name() function was globally available in OpenSSL 1.1.1. Before OpenSSL 1.1.1, tracing (enable-ssl-trace argument to Configure) was required to enable this function.
The OPENSSL_cipher_name() function was added in OpenSSL 1.1.1.
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use this file except in compliance with the License. You can obtain a copy in the file \s-1LICENSE\s0 in the source distribution or at <https://www.openssl.org/source/license.html>.