summaryrefslogtreecommitdiff
path: root/doc/ssl/SSL_CIPHER_get_name.pod
blob: 7fea14ee68675403ad020f994ed855ebd7e2f147 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
=pod

=head1 NAME

SSL_CIPHER_get_name, SSL_CIPHER_get_bits, SSL_CIPHER_get_version,
SSL_CIPHER_description - get SSL_CIPHER properties

=head1 SYNOPSIS

 #include <openssl/ssl.h>

 const char *SSL_CIPHER_get_name(SSL_CIPHER *cipher);
 int SSL_CIPHER_get_bits(SSL_CIPHER *cipher, int *alg_bits);
 char *SSL_CIPHER_get_version(SSL_CIPHER *cipher);
 char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int size);

=head1 DESCRIPTION

SSL_CIPHER_get_name() returns a pointer to the name of B<cipher>. If the
argument is the NULL pointer, a pointer to the constant value "NONE" is
returned.

SSL_CIPHER_get_bits() returns the number of secret bits used for B<cipher>. If
B<alg_bits> is not NULL, it contains the number of bits processed by the
chosen algorithm. If B<cipher> is NULL, 0 is returned.

SSL_CIPHER_get_version() returns the protocol version for B<cipher>, currently
"SSLv2", "SSLv3", or "TLSv1". If B<cipher> is NULL, "(NONE)" is returned.

SSL_CIPHER_description() returns a textual description of the cipher used
into the buffer B<buf> of length B<len> provided. B<len> must be at least
128 bytes, otherwise the string "Buffer too small" is returned. If B<buf>
is NULL, a buffer of 128 bytes is allocated using OPENSSL_malloc(). If the
allocation fails, the string "OPENSSL_malloc Error" is returned.

=head1 NOTES

The number of bits processed can be different from the secret bits. An
export cipher like e.g. EXP-RC4-MD5 has only 40 secret bits. The algorithm
does use the full 128 bits (which would be returned for B<alg_bits>), of
which however 88bits are fixed. The search space is hence only 40 bits.

=head1 BUGS

If SSL_CIPHER_description() is called with B<cipher> being NULL, the
library crashes.

=head1 RETURN VALUES

See DESCRIPTION

=head1 SEE ALSO

L<ssl(3)|ssl(3)>, L<SSL_get_current_cipher(3)|SSL_get_current_cipher(3)>,
L<SSL_get_ciphers(3)|SSL_get_ciphers(3)>

=cut