summaryrefslogtreecommitdiff
path: root/usr.bin/openssl/rand.c
AgeCommit message (Collapse)Author
2019-07-14Mark the initialized struct options arrays as both static and const.Philip Guenther
This moves them from .data to .data.rel.ro ok deraadt@ inoguchi@
2018-02-07Indent labels with a single space so that diff prototypes are more useful.Joel Sing
2018-02-07Remove guards around *_free() calls since these functions handle NULL.Joel Sing
2017-01-20rearrange pledge promises into the canonical order; easier to eyeballTheo de Raadt
2015-10-17Exit if a pledge call fails in non-interactive mode.Doug Hogan
ok semarie@
2015-10-10Initial support for pledges in openssl(1) commands.Doug Hogan
openssl(1) has two mechanisms for operating: either a single execution of one command (looking at argv[0] or argv[1]) or as an interactive session than may execute any number of commands. We already have a top level pledge that should cover all commands and that's what interactive mode must continue using. However, we can tighten up the pledges when only executing one command. This is an initial stab at support and may contain regressions. Most commands only need "stdio rpath wpath cpath". The pledges could be further restricted by evaluating the situation after parsing options. deraadt@ and beck@ are roughly fine with this approach.
2015-09-11Remove engine command and parameters from openssl(1).Brent Cook
We do not have any builtin or dynamic engines, meaning openssl(1) has no way to use the engine command or parameters at all. ok jsing@
2015-08-22Remove all duplicate prototypes for *_main functions (these are alreadyJoel Sing
provided by progs.h). Also, move the FUNCTION type (and flags) into openssl.c since that is the only place of use. Lastly, remove pointless 'extern' from the prototypes and use char **argv instead of char *argv[] (the former is used elsewhere). ok deraadt@ doug@
2014-12-28Provide a mechanism for option parsing to return the number of argumentsJoel Sing
that it has consumed. This allows for the handling of multiple unnamed arguments, including lists of filenames.
2014-10-22Use arc4random_buf() instead of RAND(_pseudo)?_bytes().Joel Sing
ok bcook@
2014-10-13prefer C99 array initialization syntax.Brent Cook
use C99 array initialization syntax for strict C compilers. from kinichiro, found building with HP/UX compiler ok deraadt@, guenther@
2014-08-27Reset the config struct before calling options_parse(), otherwise configJoel Sing
options from the previous run stick in interactive mode.
2014-08-27Implement table-driven option parsing that allows an application toJoel Sing
specify what its valid options are and where it wants them to be stored. This also allows for usage to be generated, almost for free, ensuring that the options and usage are automatically kept in sync. This will allow for a single option parsing implementation, rather than the current one-hand-rolled-option-parsing-and-random-usage-implementation per application. As a starting point, port the openssl(1) rand application to the new option parsing and usage (along with associated code clean up). With input from doug@. ok bcook@ doug@
2014-08-26Move openssl(1) from /usr/sbin/openssl to /usr/bin/openssl, since it is notJoel Sing
a system/superuser binary. At the same time, move the source code from its current lib/libssl/src/apps location to a more appropriate home under usr.bin/openssl. ok deraadt@ miod@