aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_rand.c
Commit message (Collapse)AuthorAgeFilesLines
* Move libapps.a source to apps/libRichard Levitte2019-09-041-93/+0
| | | | | | | | This makes it clearer what's what. The 'openssl' application and its sub-commands remain in apps/ Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/9723)
* Following the license change, modify the boilerplates in apps/Richard Levitte2018-12-061-1/+1
| | | | | Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7765)
* Update copyright yearMatt Caswell2018-11-201-1/+1
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7668)
* Create the .rnd file it it does not existBernd Edlinger2018-09-231-1/+0
| | | | | | | | | | | | | | | | | | | It's a bit annoying, since some commands try to read a .rnd file, and print an error message if the file does not exist. But previously a .rnd file was created on exit, and that does no longer happen. Fixed by continuing in app_RAND_load_conf regardless of the error in RAND_load_file. If the random number generator is still not initalized on exit, the function RAND_write_file will fail and no .rnd file would be created. Remove RANDFILE from openssl.cnf Reviewed-by: Kurt Roeckx <kurt@roeckx.be> (Merged from https://github.com/openssl/openssl/pull/7217)
* Fix use-after-freeRich Salz2017-07-171-3/+6
| | | | | | | Also fix a RANDerr call. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3947)
* Fix some pedantic warnings.Pauli2017-07-171-2/+2
| | | | | | | Introduced by #3862 Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3944)
* Standardize apps use of -rand, etc.Rich Salz2017-07-161-78/+52
| | | | | | | | | | | | | | | | | | | | Standardized the -rand flag and added a new one: -rand file... Always reads the specified files -writerand file Always writes to the file on exit For apps that use a config file, the RANDFILE config parameter reads the file at startup (to seed the RNG) and write to it on exit if the -writerand flag isn't used. Ensured that every app that took -rand also took -writerand, and made sure all of that agreed with all the documentation. Fix error reporting in write_file and -rand Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/3862)
* Use randomness not entropyRich Salz2017-06-271-4/+5
| | | | | Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/3773)
* Clean up a bundle of codingstyle stuff in apps directoryPaul Yang2017-06-121-4/+5
| | | | | | | | | Mostly braces and NULL pointer check and also copyright year bump Signed-off-by: Paul Yang <paulyang.inf@gmail.com> Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3657)
* cherry pick pr-512 changesJoey Yandle2016-05-291-4/+0
| | | | | | Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1079)
* Copyright consolidation 01/10Rich Salz2016-05-171-107/+6
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Add a no-egd option to disable EGD-related codeBenjamin Kaduk2016-01-141-0/+6
| | | | | | | | The entropy-gathering daemon is used only on a small number of machines. Provide a configure knob so that EGD support can be disabled by default but re-enabled on those systems that do need it. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* GH345: Remove stderr outputRich Salz2015-08-161-3/+0
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Big apps cleanup (option-parsing, etc)Rich Salz2015-04-241-14/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is merges the old "rsalz-monolith" branch over to master. The biggest change is that option parsing switch from cascasding 'else if strcmp("-foo")' to a utility routine and somethin akin to getopt. Also, an error in the command line no longer prints the full summary; use -help (or --help :) for that. There have been many other changes and code-cleanup, see bullet list below. Special thanks to Matt for the long and detailed code review. TEMPORARY: For now, comment out CRYPTO_mem_leaks() at end of main Tickets closed: RT3515: Use 3DES in pkcs12 if built with no-rc2 RT1766: s_client -reconnect and -starttls broke RT2932: Catch write errors RT2604: port should be 'unsigned short' RT2983: total_bytes undeclared #ifdef RENEG RT1523: Add -nocert to fix output in x509 app RT3508: Remove unused variable introduced by b09eb24 RT3511: doc fix; req default serial is random RT1325,2973: Add more extensions to c_rehash RT2119,3407: Updated to dgst.pod RT2379: Additional typo fix RT2693: Extra include of string.h RT2880: HFS is case-insensitive filenames RT3246: req command prints version number wrong Other changes; incompatibilities marked with *: Add SCSV support Add -misalign to speed command Make dhparam, dsaparam, ecparam, x509 output C in proper style Make some internal ocsp.c functions void Only display cert usages with -help in verify Use global bio_err, remove "BIO*err" parameter from functions For filenames, - always means stdin (or stdout as appropriate) Add aliases for -des/aes "wrap" ciphers. *Remove support for IISSGC (server gated crypto) *The undocumented OCSP -header flag is now "-header name=value" *Documented the OCSP -header flag Reviewed-by: Matt Caswell <matt@openssl.org>
* Run util/openssl-format-source -v -c .Matt Caswell2015-01-221-93/+95
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Use new-style system-id macros everywhere possible. I hope I haven'tRichard Levitte2001-02-201-1/+1
| | | | | | | missed any. This compiles and runs on Linux, and external applications have no problems with it. The definite test will be to build this on VMS.
* If the source has already been succesfully queried, do not try to open itLutz Jänicke2001-02-031-2/+4
| | | | again as file.
* Don't ever set 'seeded' if RAND_status() returned 0Bodo Möller2000-10-231-7/+10
| | | | | (although maybe this static variable should be abolished totally, it was introduced before RAND_status existed).
* There's no reason why app_RAND_load_file() should return 0 whenRichard Levitte2000-10-211-1/+1
| | | | | RAND_status() hasn't. Reported by Dale Stimson <dale@accentre.com>.
* Read complete seed files given in -rand options.Bodo Möller2000-03-041-1/+1
|
* New '-dsaparam' option for 'openssl dhparam', and related fixes.Bodo Möller2000-03-031-1/+1
|
* Document the 'rand' application.Bodo Möller2000-03-011-1/+1
|
* 'rand' application for creating pseudo-random files.Bodo Möller2000-02-291-1/+1
|
* Fix for non-monolithic build.Ulf Möller2000-02-281-0/+2
| | | | Submitted by: Andrew Gray <agray@iconsinc.com>
* EGD bugfix.Ulf Möller2000-02-251-2/+4
| | | | Submitted by: Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE>
* Support EGD.Ulf Möller2000-02-241-3/+12
|
* ispell (and minor modifications)Ulf Möller2000-02-031-1/+1
|
* RAND_load_file(..., -1) now means "read the complete file";Bodo Möller2000-01-241-1/+1
| | | | | | | | | this is what we now use to read $RANDFILE / $HOME/.rnd. (Previously, after 'cat'ting lots of stuff into .rnd only the first MB would be looked at.) Bugfix for apps/enc.c: Continue if RAND_pseudo_bytes returns 0 (only -1 is an error).
* Fix to the -revoke option in ca. It was leaking memory, crashing and justDr. Stephen Henson1999-11-081-1/+1
| | | | | | | | | plain not working :-( Also fix some memory leaks in the new X509_NAME code. Fix so new app_rand code doesn't crash 'x509' and move #include so it compiles under Win32.
* Warn about RANDFILE being overwritten.Bodo Möller1999-10-261-1/+1
|
* New file app_rand.c with some functionality used in various opensslBodo Möller1999-10-261-0/+200
applications.