-.\" $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 <levitte@openssl.org>
.\" 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
.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
.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
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 ,