diff options
Diffstat (limited to 'src/lib/libcrypto/man')
| -rw-r--r-- | src/lib/libcrypto/man/DSA_get0_pqg.3 | 72 |
1 files changed, 68 insertions, 4 deletions
diff --git a/src/lib/libcrypto/man/DSA_get0_pqg.3 b/src/lib/libcrypto/man/DSA_get0_pqg.3 index f3dbe0ce8d..5b8ef9f52a 100644 --- a/src/lib/libcrypto/man/DSA_get0_pqg.3 +++ b/src/lib/libcrypto/man/DSA_get0_pqg.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: DSA_get0_pqg.3,v 1.1 2018/02/17 16:59:48 schwarze Exp $ | 1 | .\" $OpenBSD: DSA_get0_pqg.3,v 1.2 2018/02/19 10:40:00 schwarze Exp $ |
| 2 | .\" selective merge up to: OpenSSL e90fc053 Jul 15 09:39:45 2017 -0400 | 2 | .\" selective merge up to: OpenSSL e90fc053 Jul 15 09:39:45 2017 -0400 |
| 3 | .\" | 3 | .\" |
| 4 | .\" This file was written by Matt Caswell <matt@openssl.org>. | 4 | .\" This file was written by Matt Caswell <matt@openssl.org>. |
| @@ -48,13 +48,15 @@ | |||
| 48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
| 49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
| 50 | .\" | 50 | .\" |
| 51 | .Dd $Mdocdate: February 17 2018 $ | 51 | .Dd $Mdocdate: February 19 2018 $ |
| 52 | .Dt DSA_GET0_PQG 3 | 52 | .Dt DSA_GET0_PQG 3 |
| 53 | .Os | 53 | .Os |
| 54 | .Sh NAME | 54 | .Sh NAME |
| 55 | .Nm DSA_get0_pqg , | 55 | .Nm DSA_get0_pqg , |
| 56 | .Nm DSA_get0_key | 56 | .Nm DSA_set0_pqg , |
| 57 | .Nd get data from a DSA object | 57 | .Nm DSA_get0_key , |
| 58 | .Nm DSA_set0_key | ||
| 59 | .Nd get data from and set data in a DSA object | ||
| 58 | .Sh SYNOPSIS | 60 | .Sh SYNOPSIS |
| 59 | .In openssl/dsa.h | 61 | .In openssl/dsa.h |
| 60 | .Ft void | 62 | .Ft void |
| @@ -64,12 +66,25 @@ | |||
| 64 | .Fa "const BIGNUM **q" | 66 | .Fa "const BIGNUM **q" |
| 65 | .Fa "const BIGNUM **g" | 67 | .Fa "const BIGNUM **g" |
| 66 | .Fc | 68 | .Fc |
| 69 | .Ft int | ||
| 70 | .Fo DSA_set0_pqg | ||
| 71 | .Fa "DSA *d" | ||
| 72 | .Fa "BIGNUM *p" | ||
| 73 | .Fa "BIGNUM *q" | ||
| 74 | .Fa "BIGNUM *g" | ||
| 75 | .Fc | ||
| 67 | .Ft void | 76 | .Ft void |
| 68 | .Fo DSA_get0_key | 77 | .Fo DSA_get0_key |
| 69 | .Fa "const DSA *d" | 78 | .Fa "const DSA *d" |
| 70 | .Fa "const BIGNUM **pub_key" | 79 | .Fa "const BIGNUM **pub_key" |
| 71 | .Fa "const BIGNUM **priv_key" | 80 | .Fa "const BIGNUM **priv_key" |
| 72 | .Fc | 81 | .Fc |
| 82 | .Ft int | ||
| 83 | .Fo DSA_set0_key | ||
| 84 | .Fa "DSA *d" | ||
| 85 | .Fa "BIGNUM *pub_key" | ||
| 86 | .Fa "BIGNUM *priv_key" | ||
| 87 | .Fc | ||
| 73 | .Sh DESCRIPTION | 88 | .Sh DESCRIPTION |
| 74 | A | 89 | A |
| 75 | .Vt DSA | 90 | .Vt DSA |
| @@ -101,6 +116,17 @@ Otherwise, they are set to pointers to the internal representations | |||
| 101 | of the values that should not be freed by the application. | 116 | of the values that should not be freed by the application. |
| 102 | .Pp | 117 | .Pp |
| 103 | The | 118 | The |
| 119 | .Fa p , | ||
| 120 | .Fa q , | ||
| 121 | and | ||
| 122 | .Fa g | ||
| 123 | values can be set by calling | ||
| 124 | .Fn DSA_set0_pqg . | ||
| 125 | Calling this function transfers the memory management of the values to | ||
| 126 | .Fa d , | ||
| 127 | and therefore they should not be freed by the caller. | ||
| 128 | .Pp | ||
| 129 | The | ||
| 104 | .Fn DSA_get0_key | 130 | .Fn DSA_get0_key |
| 105 | function stores pointers to the internal representations | 131 | function stores pointers to the internal representations |
| 106 | of the public key in | 132 | of the public key in |
| @@ -111,6 +137,44 @@ Either may be | |||
| 111 | .Dv NULL | 137 | .Dv NULL |
| 112 | if it has not yet been set. | 138 | if it has not yet been set. |
| 113 | If the private key has been set, then the public key must be. | 139 | If the private key has been set, then the public key must be. |
| 140 | .Pp | ||
| 141 | The public and private key values can be set using | ||
| 142 | .Fn DSA_set0_key . | ||
| 143 | The public key must be | ||
| 144 | .Pf non- Dv NULL | ||
| 145 | the first time this function is called on a given | ||
| 146 | .Vt DSA | ||
| 147 | object. | ||
| 148 | The private key may be | ||
| 149 | .Dv NULL . | ||
| 150 | On subsequent calls, either may be | ||
| 151 | .Dv NULL , | ||
| 152 | which means the corresponding | ||
| 153 | .Vt DSA | ||
| 154 | field is left untouched. | ||
| 155 | .Fn DSA_set0_key | ||
| 156 | transfers the memory management of the key values to | ||
| 157 | .Fa d , | ||
| 158 | and therefore they should not be freed by the caller. | ||
| 159 | .Pp | ||
| 160 | Values retrieved with | ||
| 161 | .Fn DSA_get0_pqg | ||
| 162 | and | ||
| 163 | .Fn DSA_get0_key | ||
| 164 | are owned by the | ||
| 165 | .Vt DSA | ||
| 166 | object and may therefore not be passed to | ||
| 167 | .Fn DSA_set0_pqg | ||
| 168 | or | ||
| 169 | .Fn DSA_set0_key . | ||
| 170 | If needed, duplicate the received values using | ||
| 171 | .Xr BN_dup 3 | ||
| 172 | and pass the duplicates. | ||
| 173 | .Sh RETURN VALUES | ||
| 174 | .Fn DSA_set0_pqg | ||
| 175 | and | ||
| 176 | .Fn DSA_set0_key | ||
| 177 | return 1 on success or 0 on failure. | ||
| 114 | .Sh SEE ALSO | 178 | .Sh SEE ALSO |
| 115 | .Xr DSA_do_sign 3 , | 179 | .Xr DSA_do_sign 3 , |
| 116 | .Xr DSA_dup_DH 3 , | 180 | .Xr DSA_dup_DH 3 , |
