-.\" $OpenBSD: DSA_get0_pqg.3,v 1.5 2022/07/13 21:51:35 schwarze Exp $
+.\" $OpenBSD: DSA_get0_pqg.3,v 1.6 2023/03/06 13:18:38 tb Exp $
.\" full merge up to: OpenSSL e90fc053 Jul 15 09:39:45 2017 -0400
.\"
.\" This file was written by Matt Caswell <matt@openssl.org>.
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: July 13 2022 $
+.Dd $Mdocdate: March 6 2023 $
.Dt DSA_GET0_PQG 3
.Os
.Sh NAME
.Nm DSA_get0_pqg ,
+.Nm DSA_get0_p ,
+.Nm DSA_get0_q ,
+.Nm DSA_get0_g ,
.Nm DSA_set0_pqg ,
.Nm DSA_get0_key ,
+.Nm DSA_get0_pub_key ,
+.Nm DSA_get0_priv_key ,
.Nm DSA_set0_key ,
.Nm DSA_clear_flags ,
.Nm DSA_test_flags ,
.Fa "const BIGNUM **q"
.Fa "const BIGNUM **g"
.Fc
+.Ft "const BIGNUM *"
+.Fo DSA_get0_p
+.Fa "const DSA *d"
+.Fc
+.Ft "const BIGNUM *"
+.Fo DSA_get0_q
+.Fa "const DSA *d"
+.Fc
+.Ft "const BIGNUM *"
+.Fo DSA_get0_g
+.Fa "const DSA *d"
+.Fc
.Ft int
.Fo DSA_set0_pqg
.Fa "DSA *d"
.Fa "const BIGNUM **pub_key"
.Fa "const BIGNUM **priv_key"
.Fc
+.Ft "const BIGNUM *"
+.Fo DSA_get0_pub_key
+.Fa "const DSA *d"
+.Fc
+.Ft "const BIGNUM *"
+.Fo DSA_get0_priv_key
+.Fa "const DSA *d"
+.Fc
.Ft int
.Fo DSA_set0_key
.Fa "DSA *d"
.Xr BN_dup 3
and pass the duplicates.
.Pp
+Any of the values
+.Fa p ,
+.Fa q ,
+.Fa g ,
+.Fa priv_key ,
+and
+.Fa pub_key
+can also be retrieved separately by the corresponding functions
+.Fn DSA_get0_p ,
+.Fn DSA_get0_q ,
+.Fn DSA_get0_g ,
+.Fn DSA_get0_priv_key ,
+and
+.Fn DSA_get0_pub_key ,
+respectively.
+The pointers are owned by the
+.Vt DSA
+object.
+.Pp
.Fn DSA_clear_flags
clears the specified
.Fa flags
For all three functions, multiple flags can be passed in one call,
OR'ed together bitwise.
.Sh RETURN VALUES
+.Fn DSA_get0_p ,
+.Fn DSA_get0_q ,
+.Fn DSA_get0_g ,
+.Fn DSA_get0_pub_key ,
+and
+.Fn DSA_get0_priv_key
+return a pointer owned by the
+.Vt DSA
+object if the corresponding value has been set,
+otherwise they return
+.Dv NULL .
.Fn DSA_set0_pqg
and
.Fn DSA_set0_key
.Xr DSA_sign 3 ,
.Xr DSA_size 3
.Sh HISTORY
-These functions first appeared in OpenSSL 1.1.0
+.Fn DSA_get0_pqg ,
+.Fn DSA_set0_pqg ,
+.Fn DSA_get0_key ,
+.Fn DSA_set0_key ,
+.Fn DSA_clear_flags ,
+.Fn DSA_test_flags ,
+.Fn DSA_set_flags ,
+and
+.Fn DSA_get0_engine
+first appeared in OpenSSL 1.1.0
and have been available since
.Ox 6.3 .
+.Pp
+.Fn DSA_get0_p ,
+.Fn DSA_get0_q ,
+.Fn DSA_get0_g ,
+.Fn DSA_get0_pub_key ,
+and
+.Fn DSA_get0_priv_key
+first appeared in OpenSSL 1.1.1
+and have been available since
+.Ox 7.1 .