diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2015-04-21 16:48:02 +0200 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2015-04-22 16:00:53 +0200 |
commit | 98c9ce2f55609d00a06c2106df03a5a7e9dbfa75 (patch) | |
tree | 95c18933603dd8059c2442c279819d551464946c /doc | |
parent | Avoid "no config file" warning message (diff) | |
download | openssl-98c9ce2f55609d00a06c2106df03a5a7e9dbfa75.tar.xz openssl-98c9ce2f55609d00a06c2106df03a5a7e9dbfa75.zip |
SSL_CIPHER lookup functions.
Add tables to convert between SSL_CIPHER fields and indices for ciphers
and MACs.
Reorganise ssl_ciph.c to use tables to lookup values and load them.
New functions SSL_CIPHER_get_cipher_nid and SSL_CIPHER_get_digest_nid.
Add documentation.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ssl/SSL_CIPHER_get_name.pod | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/ssl/SSL_CIPHER_get_name.pod b/doc/ssl/SSL_CIPHER_get_name.pod index ec7011efe9..baac900bc4 100644 --- a/doc/ssl/SSL_CIPHER_get_name.pod +++ b/doc/ssl/SSL_CIPHER_get_name.pod @@ -12,6 +12,8 @@ SSL_CIPHER_get_name, SSL_CIPHER_get_bits, SSL_CIPHER_get_version, SSL_CIPHER_des int SSL_CIPHER_get_bits(const SSL_CIPHER *cipher, int *alg_bits); char *SSL_CIPHER_get_version(const SSL_CIPHER *cipher); char *SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int size); + int SSL_CIPHER_get_cipher_nid(const SSL_CIPHER *c); + int SSL_CIPHER_get_digest_nid(const SSL_CIPHER *c); =head1 DESCRIPTION @@ -37,6 +39,14 @@ returned. If B<buf> is NULL, a buffer of 128 bytes is allocated using OPENSSL_malloc(). If the allocation fails, a pointer to the string "OPENSSL_malloc Error" is returned. +SSL_CIPHER_get_cipher_nid() returns the cipher NID corresponding to B<c>. +If there is no cipher (e.g. for ciphersuites with no encryption) then +B<NID_undef> is returned. + +SSL_CIPHER_get_digest_nid() returns the digest NID corresponding to the MAC +used by B<c>. If there is no digest (e.g. for AEAD ciphersuites) then +B<NID_undef> is returned. + =head1 NOTES The number of bits processed can be different from the secret bits. An |