From b55a697c676bec213476fdf1525e9291c5d4aaf6 Mon Sep 17 00:00:00 2001 From: schwarze <> Date: Thu, 3 Nov 2016 15:48:22 +0000 Subject: convert RAND manuals from pod to mdoc --- src/lib/libcrypto/doc/RAND_add.pod | 30 ------------ src/lib/libcrypto/doc/RAND_bytes.pod | 43 ---------------- src/lib/libcrypto/doc/RAND_cleanup.pod | 25 ---------- src/lib/libcrypto/doc/RAND_load_file.pod | 52 -------------------- src/lib/libcrypto/doc/RAND_set_rand_method.pod | 40 --------------- src/lib/libcrypto/man/Makefile | 12 ++--- src/lib/libcrypto/man/RAND_add.3 | 32 ++++++++++++ src/lib/libcrypto/man/RAND_bytes.3 | 52 ++++++++++++++++++++ src/lib/libcrypto/man/RAND_cleanup.3 | 16 ++++++ src/lib/libcrypto/man/RAND_load_file.3 | 68 ++++++++++++++++++++++++++ src/lib/libcrypto/man/RAND_set_rand_method.3 | 30 ++++++++++++ 11 files changed, 204 insertions(+), 196 deletions(-) delete mode 100644 src/lib/libcrypto/doc/RAND_add.pod delete mode 100644 src/lib/libcrypto/doc/RAND_bytes.pod delete mode 100644 src/lib/libcrypto/doc/RAND_cleanup.pod delete mode 100644 src/lib/libcrypto/doc/RAND_load_file.pod delete mode 100644 src/lib/libcrypto/doc/RAND_set_rand_method.pod create mode 100644 src/lib/libcrypto/man/RAND_add.3 create mode 100644 src/lib/libcrypto/man/RAND_bytes.3 create mode 100644 src/lib/libcrypto/man/RAND_cleanup.3 create mode 100644 src/lib/libcrypto/man/RAND_load_file.3 create mode 100644 src/lib/libcrypto/man/RAND_set_rand_method.3 (limited to 'src') diff --git a/src/lib/libcrypto/doc/RAND_add.pod b/src/lib/libcrypto/doc/RAND_add.pod deleted file mode 100644 index 3ffd4910c4..0000000000 --- a/src/lib/libcrypto/doc/RAND_add.pod +++ /dev/null @@ -1,30 +0,0 @@ -=pod - -=head1 NAME - -RAND_add, RAND_seed, RAND_status - add entropy to the PRNG (DEPRECATED) - -=head1 SYNOPSIS - - #include - - void RAND_seed(const void *buf, int num); - - void RAND_add(const void *buf, int num, double entropy); - - int RAND_status(void); - -=head1 DESCRIPTION - -These functions used to allow for the state of the random number generator -to be controlled by external sources. - -They are kept for ABI compatibility but are no longer functional, and -should not be used in new programs. - -=head1 SEE ALSO - -L, -L, L - -=cut diff --git a/src/lib/libcrypto/doc/RAND_bytes.pod b/src/lib/libcrypto/doc/RAND_bytes.pod deleted file mode 100644 index c89961ada3..0000000000 --- a/src/lib/libcrypto/doc/RAND_bytes.pod +++ /dev/null @@ -1,43 +0,0 @@ -=pod - -=head1 NAME - -RAND_bytes, RAND_pseudo_bytes - generate random data - -=head1 SYNOPSIS - - #include - - int RAND_bytes(unsigned char *buf, int num); - - int RAND_pseudo_bytes(unsigned char *buf, int num); - -=head1 DESCRIPTION - -RAND_bytes() puts B cryptographically strong pseudo-random bytes -into B. - -RAND_pseudo_bytes() puts B pseudo-random bytes into B. -Pseudo-random byte sequences generated by RAND_pseudo_bytes() will be -unique if they are of sufficient length, but are not necessarily -unpredictable. They can be used for non-cryptographic purposes and for -certain purposes in cryptographic protocols, but usually not for key -generation etc. - -=head1 RETURN VALUES - -RAND_bytes() returns 1. -RAND_pseudo_bytes() returns 1. - -=head1 SEE ALSO - -L, L, -L - -=head1 HISTORY - -RAND_bytes() is available in all versions of SSLeay and OpenSSL. It -has a return value since OpenSSL 0.9.5. RAND_pseudo_bytes() was added -in OpenSSL 0.9.5. - -=cut diff --git a/src/lib/libcrypto/doc/RAND_cleanup.pod b/src/lib/libcrypto/doc/RAND_cleanup.pod deleted file mode 100644 index 10cb39ce7a..0000000000 --- a/src/lib/libcrypto/doc/RAND_cleanup.pod +++ /dev/null @@ -1,25 +0,0 @@ -=pod - -=head1 NAME - -RAND_cleanup - erase the PRNG state - -=head1 SYNOPSIS - - #include - - void RAND_cleanup(void); - -=head1 DESCRIPTION - -RAND_cleanup() erases the memory used by the PRNG. - -=head1 SEE ALSO - -L - -=head1 HISTORY - -RAND_cleanup() is available in all versions of SSLeay and OpenSSL. - -=cut diff --git a/src/lib/libcrypto/doc/RAND_load_file.pod b/src/lib/libcrypto/doc/RAND_load_file.pod deleted file mode 100644 index 5e4c2481d8..0000000000 --- a/src/lib/libcrypto/doc/RAND_load_file.pod +++ /dev/null @@ -1,52 +0,0 @@ -=pod - -=head1 NAME - -RAND_load_file, RAND_write_file, RAND_file_name - PRNG seed file - -=head1 SYNOPSIS - - #include - - const char *RAND_file_name(char *buf, size_t num); - - int RAND_load_file(const char *filename, long max_bytes); - - int RAND_write_file(const char *filename); - -=head1 DESCRIPTION - -RAND_file_name() returns a default path for the random seed file. -B points to a buffer of size B in which to store the -filename. If B is too small for the path name, an error occurs. - -RAND_load_file() used to allow for the state of the random number generator -to be controlled by external sources. - -It is kept for ABI compatibility but is no longer functional, and -should not used in new programs. - -RAND_write_file() writes a number of random bytes (currently 1024) to -file B. - -=head1 RETURN VALUES - -RAND_load_file() always returns 0. - -RAND_write_file() returns the number of bytes written, and -1 if the -bytes written were generated without appropriate seed. - -RAND_file_name() returns a pointer to B on success, and NULL on -error. - -=head1 SEE ALSO - -L, L, -L - -=head1 HISTORY - -RAND_load_file(), RAND_write_file() and RAND_file_name() are available in -all versions of SSLeay and OpenSSL. - -=cut diff --git a/src/lib/libcrypto/doc/RAND_set_rand_method.pod b/src/lib/libcrypto/doc/RAND_set_rand_method.pod deleted file mode 100644 index c02068bf76..0000000000 --- a/src/lib/libcrypto/doc/RAND_set_rand_method.pod +++ /dev/null @@ -1,40 +0,0 @@ -=pod - -=head1 NAME - -RAND_set_rand_method, RAND_get_rand_method, RAND_SSLeay - select RAND method - -=head1 SYNOPSIS - - #include - - void RAND_set_rand_method(const RAND_METHOD *meth); - - const RAND_METHOD *RAND_get_rand_method(void); - - RAND_METHOD *RAND_SSLeay(void); - -=head1 DESCRIPTION - -These functions used to allow for the random number generator functions -to be replaced by arbitrary code. - -They are kept for ABI compatibility but are no longer functional, and -should not be used in new programs. - -=head1 SEE ALSO - -L - -=head1 HISTORY - -RAND_set_rand_method(), RAND_get_rand_method() and RAND_SSLeay() are -available in all versions of OpenSSL. - -In the engine version of version 0.9.6, RAND_set_rand_method() was altered to -take an ENGINE pointer as its argument. As of version 0.9.7, that has been -reverted as the ENGINE API transparently overrides RAND defaults if used, -otherwise RAND API functions work as before. RAND_set_rand_engine() was also -introduced in version 0.9.7. - -=cut diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index 4312bdc341..0b3a08a7d3 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.43 2016/11/03 15:31:29 schwarze Exp $ +# $OpenBSD: Makefile,v 1.44 2016/11/03 15:48:22 schwarze Exp $ .include # for NOMAN @@ -132,6 +132,11 @@ MAN= \ PKCS7_sign.3 \ PKCS7_sign_add_signer.3 \ PKCS7_verify.3 \ + RAND_add.3 \ + RAND_bytes.3 \ + RAND_cleanup.3 \ + RAND_load_file.3 \ + RAND_set_rand_method.3 \ SMIME_read_PKCS7.3 \ SMIME_write_PKCS7.3 \ UI_new.3 \ @@ -145,11 +150,6 @@ MAN= \ lh_new.3 \ GENMAN= \ - RAND_add.3 \ - RAND_bytes.3 \ - RAND_cleanup.3 \ - RAND_load_file.3 \ - RAND_set_rand_method.3 \ RC4.3 \ RIPEMD160.3 \ RSA_blinding_on.3 \ diff --git a/src/lib/libcrypto/man/RAND_add.3 b/src/lib/libcrypto/man/RAND_add.3 new file mode 100644 index 0000000000..31b61a6386 --- /dev/null +++ b/src/lib/libcrypto/man/RAND_add.3 @@ -0,0 +1,32 @@ +.Dd $Mdocdate: November 3 2016 $ +.Dt RAND_ADD 3 +.Os +.Sh NAME +.Nm RAND_add , +.Nm RAND_seed , +.Nm RAND_status +.Nd add entropy to the PRNG (DEPRECATED) +.Sh SYNOPSIS +.In openssl/rand.h +.Ft void +.Fo RAND_seed +.Fa "const void *buf" +.Fa "int num" +.Fc +.Ft void +.Fo RAND_add +.Fa "const void *buf" +.Fa "int num" +.Fa "double entropy" +.Fc +.Ft int +.Fn RAND_status void +.Sh DESCRIPTION +These functions used to allow for the state of the random number +generator to be controlled by external sources. +.Pp +They are kept for ABI compatibility but are no longer functional, and +should not be used in new programs. +.Sh SEE ALSO +.Xr RAND_cleanup 3 , +.Xr RAND_load_file 3 diff --git a/src/lib/libcrypto/man/RAND_bytes.3 b/src/lib/libcrypto/man/RAND_bytes.3 new file mode 100644 index 0000000000..41f0950fe3 --- /dev/null +++ b/src/lib/libcrypto/man/RAND_bytes.3 @@ -0,0 +1,52 @@ +.Dd $Mdocdate: November 3 2016 $ +.Dt RAND_BYTES 3 +.Os +.Sh NAME +.Nm RAND_bytes , +.Nm RAND_pseudo_bytes +.Nd generate random data +.Sh SYNOPSIS +.In openssl/rand.h +.Ft int +.Fo RAND_bytes +.Fa "unsigned char *buf" +.Fa "int num" +.Fc +.Ft int +.Fo RAND_pseudo_bytes +.Fa "unsigned char *buf" +.Fa "int num" +.Fc +.Sh DESCRIPTION +.Fn RAND_bytes +puts +.Fa num +cryptographically strong pseudo-random bytes into +.Fa buf . +.Pp +.Fn RAND_pseudo_bytes +puts +.Fa num +pseudo-random bytes into +.Fa buf . +Pseudo-random byte sequences generated by +.Fn RAND_pseudo_bytes +will be unique if they are of sufficient length, but are not necessarily +unpredictable. +They can be used for non-cryptographic purposes and for certain purposes +in cryptographic protocols, but usually not for key generation etc. +.Sh RETURN VALUES +.Fn RAND_bytes +returns 1. +.Fn RAND_pseudo_bytes +returns 1. +.Sh SEE ALSO +.Xr ERR_get_error 3 , +.Xr RAND_add 3 +.Sh HISTORY +.Fn RAND_bytes +is available in all versions of SSLeay and OpenSSL. +It has a return +value since OpenSSL 0.9.5. +.Fn RAND_pseudo_bytes +was added in OpenSSL 0.9.5. diff --git a/src/lib/libcrypto/man/RAND_cleanup.3 b/src/lib/libcrypto/man/RAND_cleanup.3 new file mode 100644 index 0000000000..00ee14b371 --- /dev/null +++ b/src/lib/libcrypto/man/RAND_cleanup.3 @@ -0,0 +1,16 @@ +.Dd $Mdocdate: November 3 2016 $ +.Dt RAND_CLEANUP 3 +.Os +.Sh NAME +.Nm RAND_cleanup +.Nd erase the PRNG state +.Sh SYNOPSIS +.In openssl/rand.h +.Ft void +.Fn RAND_cleanup void +.Sh DESCRIPTION +.Fn RAND_cleanup +erases the memory used by the PRNG. +.Sh HISTORY +.Fn RAND_cleanup +is available in all versions of SSLeay and OpenSSL. diff --git a/src/lib/libcrypto/man/RAND_load_file.3 b/src/lib/libcrypto/man/RAND_load_file.3 new file mode 100644 index 0000000000..fb521a8e9c --- /dev/null +++ b/src/lib/libcrypto/man/RAND_load_file.3 @@ -0,0 +1,68 @@ +.Dd $Mdocdate: November 3 2016 $ +.Dt RAND_LOAD_FILE 3 +.Os +.Sh NAME +.Nm RAND_load_file , +.Nm RAND_write_file , +.Nm RAND_file_name +.Nd PRNG seed file +.Sh SYNOPSIS +.In openssl/rand.h +.Ft const char * +.Fo RAND_file_name +.Fa "char *buf" +.Fa "size_t num" +.Fc +.Ft int +.Fo RAND_load_file +.Fa "const char *filename" +.Fa "long max_bytes" +.Fc +.Ft int +.Fo RAND_write_file +.Fa "const char *filename" +.Fc +.Sh DESCRIPTION +.Fn RAND_file_name +returns a default path for the random seed file. +.Fa buf +points to a buffer of size +.Fa num +in which to store the filename. +If +.Fa num +is too small for the path name, an error occurs. +.Pp +.Fn RAND_load_file +used to allow for the state of the random number generator to be +controlled by external sources. +.Pp +It is kept for ABI compatibility but is no longer functional, and should +not used in new programs. +.Pp +.Fn RAND_write_file +writes a number of random bytes (currently 1024) to file +.Fa filename . +.Sh RETURN VALUES +.Fn RAND_load_file +always returns 0. +.Pp +.Fn RAND_write_file +returns the number of bytes written, and -1 if the bytes written were +generated without appropriate seed. +.Pp +.Fn RAND_file_name +returns a pointer to +.Fa buf +on success, and +.Dv NULL +on error. +.Sh SEE ALSO +.Xr RAND_add 3 , +.Xr RAND_cleanup 3 +.Sh HISTORY +.Fn RAND_load_file , +.Fn RAND_write_file , +and +.Fn RAND_file_name +are available in all versions of SSLeay and OpenSSL. diff --git a/src/lib/libcrypto/man/RAND_set_rand_method.3 b/src/lib/libcrypto/man/RAND_set_rand_method.3 new file mode 100644 index 0000000000..7efdeefd41 --- /dev/null +++ b/src/lib/libcrypto/man/RAND_set_rand_method.3 @@ -0,0 +1,30 @@ +.Dd $Mdocdate: November 3 2016 $ +.Dt RAND_SET_RAND_METHOD 3 +.Os +.Sh NAME +.Nm RAND_set_rand_method , +.Nm RAND_get_rand_method , +.Nm RAND_SSLeay +.Nd select RAND method +.Sh SYNOPSIS +.In openssl/rand.h +.Ft void +.Fo RAND_set_rand_method +.Fa "const RAND_METHOD *meth" +.Fc +.Ft const RAND_METHOD * +.Fn RAND_get_rand_method void +.Ft RAND_METHOD * +.Fn RAND_SSLeay void +.Sh DESCRIPTION +These functions used to allow for the random number generator functions +to be replaced by arbitrary code. +.Pp +They are kept for ABI compatibility but are no longer functional, and +should not be used in new programs. +.Sh HISTORY +.Fn RAND_set_rand_method , +.Fn RAND_get_rand_method , +and +.Fn RAND_SSLeay +are available in all versions of OpenSSL. -- cgit v1.2.3-55-g6feb