diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/man/BN_generate_prime.3 | 59 |
1 files changed, 54 insertions, 5 deletions
diff --git a/src/lib/libcrypto/man/BN_generate_prime.3 b/src/lib/libcrypto/man/BN_generate_prime.3 index 5d4f931a04..b3926afaa9 100644 --- a/src/lib/libcrypto/man/BN_generate_prime.3 +++ b/src/lib/libcrypto/man/BN_generate_prime.3 | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | .\" $OpenBSD: BN_generate_prime.3,v 1.6 2017/01/07 05:06:22 schwarze Exp $ | 1 | .\" $OpenBSD: BN_generate_prime.3,v 1.7 2018/02/23 12:16:08 schwarze Exp $ |
| 2 | .\" OpenSSL 2afb29b4 Aug 14 16:47:13 2014 -0400 | 2 | .\" full merge up to: OpenSSL b3696a55 Sep 2 09:35:50 2017 -0400 |
| 3 | .\" | 3 | .\" |
| 4 | .\" This file was written by Ulf Moeller <ulf@openssl.org> | 4 | .\" This file was written by Ulf Moeller <ulf@openssl.org> |
| 5 | .\" Bodo Moeller <bodo@openssl.org>, and Matt Caswell <matt@openssl.org>. | 5 | .\" Bodo Moeller <bodo@openssl.org>, and Matt Caswell <matt@openssl.org>. |
| @@ -50,7 +50,7 @@ | |||
| 50 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 50 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
| 51 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 51 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
| 52 | .\" | 52 | .\" |
| 53 | .Dd $Mdocdate: January 7 2017 $ | 53 | .Dd $Mdocdate: February 23 2018 $ |
| 54 | .Dt BN_GENERATE_PRIME 3 | 54 | .Dt BN_GENERATE_PRIME 3 |
| 55 | .Os | 55 | .Os |
| 56 | .Sh NAME | 56 | .Sh NAME |
| @@ -58,8 +58,11 @@ | |||
| 58 | .Nm BN_is_prime_ex , | 58 | .Nm BN_is_prime_ex , |
| 59 | .Nm BN_is_prime_fasttest_ex , | 59 | .Nm BN_is_prime_fasttest_ex , |
| 60 | .Nm BN_GENCB_call , | 60 | .Nm BN_GENCB_call , |
| 61 | .Nm BN_GENCB_new , | ||
| 62 | .Nm BN_GENCB_free , | ||
| 61 | .Nm BN_GENCB_set_old , | 63 | .Nm BN_GENCB_set_old , |
| 62 | .Nm BN_GENCB_set , | 64 | .Nm BN_GENCB_set , |
| 65 | .Nm BN_GENCB_get_arg , | ||
| 63 | .Nm BN_generate_prime , | 66 | .Nm BN_generate_prime , |
| 64 | .Nm BN_is_prime , | 67 | .Nm BN_is_prime , |
| 65 | .Nm BN_is_prime_fasttest | 68 | .Nm BN_is_prime_fasttest |
| @@ -96,6 +99,12 @@ | |||
| 96 | .Fa "int a" | 99 | .Fa "int a" |
| 97 | .Fa "int b" | 100 | .Fa "int b" |
| 98 | .Fc | 101 | .Fc |
| 102 | .Ft BN_GENCB * | ||
| 103 | .Fn BN_GENCB_new void | ||
| 104 | .Ft void | ||
| 105 | .Fo BN_GENCB_free | ||
| 106 | .Fa "BN_GENCB *cb" | ||
| 107 | .Fc | ||
| 99 | .Ft void | 108 | .Ft void |
| 100 | .Fo BN_GENCB_set_old | 109 | .Fo BN_GENCB_set_old |
| 101 | .Fa "BN_GENCB *gencb" | 110 | .Fa "BN_GENCB *gencb" |
| @@ -108,6 +117,10 @@ | |||
| 108 | .Fa "int (*callback)(int, int, BN_GENCB *)" | 117 | .Fa "int (*callback)(int, int, BN_GENCB *)" |
| 109 | .Fa "void *cb_arg" | 118 | .Fa "void *cb_arg" |
| 110 | .Fc | 119 | .Fc |
| 120 | .Ft void * | ||
| 121 | .Fo BN_GENCB_get_arg | ||
| 122 | .Fa "BN_GENCB *cb" | ||
| 123 | .Fc | ||
| 111 | .Pp | 124 | .Pp |
| 112 | Deprecated: | 125 | Deprecated: |
| 113 | .Pp | 126 | .Pp |
| @@ -260,9 +273,16 @@ structures that are supported: "new" style and "old" style. | |||
| 260 | New programs should prefer the "new" style, whilst the "old" style is | 273 | New programs should prefer the "new" style, whilst the "old" style is |
| 261 | provided for backwards compatibility purposes. | 274 | provided for backwards compatibility purposes. |
| 262 | .Pp | 275 | .Pp |
| 276 | A | ||
| 277 | .Vt BN_GENCB | ||
| 278 | structure should be created through a call to | ||
| 279 | .Fn BN_GENCB_new | ||
| 280 | and freed through a call to | ||
| 281 | .Fn BN_GENCB_free . | ||
| 282 | .Pp | ||
| 263 | For "new" style callbacks a | 283 | For "new" style callbacks a |
| 264 | .Vt BN_GENCB | 284 | .Vt BN_GENCB |
| 265 | structure should be initialised with a call to the macro | 285 | structure should be initialised with a call to |
| 266 | .Fn BN_GENCB_set , | 286 | .Fn BN_GENCB_set , |
| 267 | where | 287 | where |
| 268 | .Fa gencb | 288 | .Fa gencb |
| @@ -276,7 +296,7 @@ and | |||
| 276 | is a | 296 | is a |
| 277 | .Vt void * . | 297 | .Vt void * . |
| 278 | "Old" style callbacks are the same except they are initialised with a | 298 | "Old" style callbacks are the same except they are initialised with a |
| 279 | call to the macro | 299 | call to |
| 280 | .Fn BN_GENCB_set_old | 300 | .Fn BN_GENCB_set_old |
| 281 | and | 301 | and |
| 282 | .Fa callback | 302 | .Fa callback |
| @@ -291,6 +311,15 @@ for new style callbacks or | |||
| 291 | .Fn callback a b cb_arg | 311 | .Fn callback a b cb_arg |
| 292 | for old style. | 312 | for old style. |
| 293 | .Pp | 313 | .Pp |
| 314 | It is possible to obtain the argument associated with a | ||
| 315 | .Vt BN_GENCB | ||
| 316 | structure (set via a call to | ||
| 317 | .Fn BN_GENCB_set | ||
| 318 | or | ||
| 319 | .Fn BN_GENCB_set_old ) | ||
| 320 | using | ||
| 321 | .Fn BN_GENCB_get_arg . | ||
| 322 | .Pp | ||
| 294 | .Fn BN_generate_prime | 323 | .Fn BN_generate_prime |
| 295 | (deprecated) works in the same way as | 324 | (deprecated) works in the same way as |
| 296 | .Fn BN_generate_prime_ex | 325 | .Fn BN_generate_prime_ex |
| @@ -326,6 +355,18 @@ returns the prime number on success, | |||
| 326 | .Dv NULL | 355 | .Dv NULL |
| 327 | otherwise. | 356 | otherwise. |
| 328 | .Pp | 357 | .Pp |
| 358 | .Fn BN_GENCB_new | ||
| 359 | returns a pointer to a | ||
| 360 | .Vt BN_GENCB | ||
| 361 | structure on success, or | ||
| 362 | .Dv NULL | ||
| 363 | otherwise. | ||
| 364 | .Pp | ||
| 365 | .Fn BN_GENCB_get_arg | ||
| 366 | returns the argument previously associated with a | ||
| 367 | .Vt BN_GENCB | ||
| 368 | structure. | ||
| 369 | .Pp | ||
| 329 | Callback functions should return 1 on success or 0 on error. | 370 | Callback functions should return 1 on success or 0 on error. |
| 330 | .Pp | 371 | .Pp |
| 331 | The error codes can be obtained by | 372 | The error codes can be obtained by |
| @@ -342,10 +383,18 @@ arguments to | |||
| 342 | and to | 383 | and to |
| 343 | .Fn BN_is_prime | 384 | .Fn BN_is_prime |
| 344 | were added in SSLeay 0.9.0. | 385 | were added in SSLeay 0.9.0. |
| 386 | .Pp | ||
| 345 | The | 387 | The |
| 346 | .Fa ret | 388 | .Fa ret |
| 347 | argument to | 389 | argument to |
| 348 | .Fn BN_generate_prime | 390 | .Fn BN_generate_prime |
| 349 | was added in SSLeay 0.9.1. | 391 | was added in SSLeay 0.9.1. |
| 392 | .Pp | ||
| 350 | .Fn BN_is_prime_fasttest | 393 | .Fn BN_is_prime_fasttest |
| 351 | was added in OpenSSL 0.9.5. | 394 | was added in OpenSSL 0.9.5. |
| 395 | .Pp | ||
| 396 | .Fn BN_GENCB_new , | ||
| 397 | .Fn BN_GENCB_free , | ||
| 398 | and | ||
| 399 | .Fn BN_GENCB_get_arg | ||
| 400 | were added in OpenSSL 1.1.0 . | ||
