From 7c6c7e25139423fa5cb3cc43215c93eabb67c0d1 Mon Sep 17 00:00:00 2001 From: schwarze <> Date: Sat, 3 Dec 2016 09:07:56 +0000 Subject: Add Copyright and license. Fix the prototype of SSL_get_current_cipher(3). In the SYNOPSIS, show prototypes rather than #defines. Some minor improvements from OpenSSL. --- src/lib/libssl/man/SSL_get_current_cipher.3 | 97 +++++++++++++++++++++++------ 1 file changed, 77 insertions(+), 20 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libssl/man/SSL_get_current_cipher.3 b/src/lib/libssl/man/SSL_get_current_cipher.3 index de46f3d21c..e61ea2280c 100644 --- a/src/lib/libssl/man/SSL_get_current_cipher.3 +++ b/src/lib/libssl/man/SSL_get_current_cipher.3 @@ -1,7 +1,54 @@ +.\" $OpenBSD: SSL_get_current_cipher.3,v 1.2 2016/12/03 09:07:56 schwarze Exp $ +.\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 .\" -.\" $OpenBSD: SSL_get_current_cipher.3,v 1.1 2016/11/05 15:32:20 schwarze Exp $ +.\" This file was written by Lutz Jaenicke . +.\" Copyright (c) 2000, 2005, 2016 The OpenSSL Project. All rights reserved. .\" -.Dd $Mdocdate: November 5 2016 $ +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in +.\" the documentation and/or other materials provided with the +.\" distribution. +.\" +.\" 3. All advertising materials mentioning features or use of this +.\" software must display the following acknowledgment: +.\" "This product includes software developed by the OpenSSL Project +.\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" +.\" +.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to +.\" endorse or promote products derived from this software without +.\" prior written permission. For written permission, please contact +.\" openssl-core@openssl.org. +.\" +.\" 5. Products derived from this software may not be called "OpenSSL" +.\" nor may "OpenSSL" appear in their names without prior written +.\" permission of the OpenSSL Project. +.\" +.\" 6. Redistributions of any form whatsoever must retain the following +.\" acknowledgment: +.\" "This product includes software developed by the OpenSSL Project +.\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY +.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR +.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +.\" OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd $Mdocdate: December 3 2016 $ .Dt SSL_GET_CURRENT_CIPHER 3 .Os .Sh NAME @@ -13,15 +60,16 @@ .Nd get SSL_CIPHER of a connection .Sh SYNOPSIS .In openssl/ssl.h -.Ft SSL_CIPHER * +.Ft const SSL_CIPHER * .Fn SSL_get_current_cipher "const SSL *ssl" -.Fd #define SSL_get_cipher(s) SSL_CIPHER_get_name(SSL_get_current_cipher(s)) -.Fd #define SSL_get_cipher_name(s) \ -SSL_CIPHER_get_name(SSL_get_current_cipher(s)) -.Fd #define SSL_get_cipher_bits(s,np) \ -SSL_CIPHER_get_bits(SSL_get_current_cipher(s),np) -.Fd #define SSL_get_cipher_version(s) \ -SSL_CIPHER_get_version(SSL_get_current_cipher(s)) +.Ft const char * +.Fn SSL_get_cipher "const SSL *ssl" +.Ft const char * +.Fn SSL_get_cipher_name "const SSL *ssl" +.Ft int +.Fn SSL_get_cipher_bits "const SSL *ssl" "int *np" +.Ft char * +.Fn SSL_get_cipher_version "const SSL *ssl" .Sh DESCRIPTION .Fn SSL_get_current_cipher returns a pointer to an @@ -30,23 +78,32 @@ object containing the description of the actually used cipher of a connection established with the .Fa ssl object. +See +.Xr SSL_CIPHER_get_name 3 +for more details. .Pp -.Fn SSL_get_cipher -and .Fn SSL_get_cipher_name -are identical macros to obtain the name of the currently used cipher. +obtains the name of the currently used cipher. +.Fn SSL_get_cipher +is identical to +.Fn SSL_get_cipher_name . +.Pp .Fn SSL_get_cipher_bits -is a macro to obtain the number of secret/algorithm bits used and +obtains the number of secret/algorithm bits used and .Fn SSL_get_cipher_version returns the protocol name. -See -.Xr SSL_CIPHER_get_name 3 -for more details. +.Pp +.Fn SSL_get_cipher , +.Fn SSL_get_cipher_name , +.Fn SSL_get_cipher_bits , +and +.Fn SSL_get_cipher_version +are implemented as macros. .Sh RETURN VALUES .Fn SSL_get_current_cipher -returns the cipher actually used or -.Dv NULL , -when no session has been established. +returns the cipher actually used, or +.Dv NULL +if no session has been established. .Sh SEE ALSO .Xr ssl 3 , .Xr SSL_CIPHER_get_name 3 -- cgit v1.2.3-55-g6feb