From 75854016f04109986148169a6860171e4568f1eb Mon Sep 17 00:00:00 2001 From: schwarze Date: Sat, 24 Feb 2018 13:04:47 +0000 Subject: [PATCH] In rsa.h rev. 1.37 2018/02/20 17:42:32, tb@ provided RSA_clear_flags(3), RSA_test_flags(3), and RSA_set_flags(3). Merge the documentation, tweaked by me. --- lib/libcrypto/man/RSA_get0_key.3 | 52 ++++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/lib/libcrypto/man/RSA_get0_key.3 b/lib/libcrypto/man/RSA_get0_key.3 index 0da1c544629..f82534864fa 100644 --- a/lib/libcrypto/man/RSA_get0_key.3 +++ b/lib/libcrypto/man/RSA_get0_key.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: RSA_get0_key.3,v 1.2 2018/02/19 13:28:05 schwarze Exp $ +.\" $OpenBSD: RSA_get0_key.3,v 1.3 2018/02/24 13:04:47 schwarze Exp $ .\" selective merge up to: OpenSSL 665d899f Aug 2 02:19:43 2017 +0800 .\" .\" This file was written by Richard Levitte @@ -48,7 +48,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: February 19 2018 $ +.Dd $Mdocdate: February 24 2018 $ .Dt RSA_GET0_KEY 3 .Os .Sh NAME @@ -57,7 +57,10 @@ .Nm RSA_get0_factors , .Nm RSA_set0_factors , .Nm RSA_get0_crt_params , -.Nm RSA_set0_crt_params +.Nm RSA_set0_crt_params , +.Nm RSA_clear_flags , +.Nm RSA_test_flags , +.Nm RSA_set_flags .Nd get and set data in an RSA object .Sh SYNOPSIS .In openssl/rsa.h @@ -101,6 +104,21 @@ .Fa "BIGNUM *dmq1" .Fa "BIGNUM *iqmp" .Fc +.Ft void +.Fo RSA_clear_flags +.Fa "RSA *r" +.Fa "int flags" +.Fc +.Ft int +.Fo RSA_test_flags +.Fa "const RSA *r" +.Fa "int flags" +.Fc +.Ft void +.Fo RSA_set_flags +.Fa "RSA *r" +.Fa "int flags" +.Fc .Sh DESCRIPTION An .Vt RSA @@ -226,12 +244,40 @@ or If needed, duplicate the received value using .Xr BN_dup 3 and pass the duplicate. +.Pp +.Fn RSA_clear_flags +clears the specified +.Fa flags +in +.Fa r . +.Fn RSA_test_flags +tests the +.Fa flags +in +.Fa r . +.Fn RSA_set_flags +sets the +.Fa flags +in +.Fa r ; +any flags already set remain set. +For all three functions, multiple flags can be passed in one call, +OR'ed together bitwise. .Sh RETURN VALUES .Fn RSA_set0_key , .Fn RSA_set0_factors , and .Fn RSA_set0_crt_params return 1 on success or 0 on failure. +.Pp +.Fn RSA_test_flags +returns those of the given +.Fa flags +currently set in +.Fa r +or 0 if none of the given +.Fa flags +are set. .Sh SEE ALSO .Xr RSA_check_key 3 , .Xr RSA_generate_key 3 , -- 2.20.1