-int MAIN(int, char **);
-
-int MAIN(int argc, char **argv)
-{
- BN_GENCB *cb = NULL;
-# ifndef OPENSSL_NO_ENGINE
- ENGINE *e = NULL;
-# endif
- int ret = 1;
- int non_fips_allow = 0;
- int num = DEFBITS;
- const EVP_CIPHER *enc = NULL;
- unsigned long f4 = RSA_F4;
- char *outfile = NULL;
- char *passargout = NULL, *passout = NULL;
- char *hexe, *dece;
+typedef enum OPTION_choice {
+ OPT_ERR = -1, OPT_EOF = 0, OPT_HELP,
+ OPT_3, OPT_F4, OPT_ENGINE,
+ OPT_OUT, OPT_RAND, OPT_PASSOUT, OPT_CIPHER
+} OPTION_CHOICE;
+
+OPTIONS genrsa_options[] = {
+ {"help", OPT_HELP, '-', "Display this summary"},
+ {"3", OPT_3, '-', "Use 3 for the E value"},
+ {"F4", OPT_F4, '-', "Use F4 (0x10001) for the E value"},
+ {"f4", OPT_F4, '-', "Use F4 (0x10001) for the E value"},
+ {"out", OPT_OUT, 's', "Output the key to specified file"},
+ {"rand", OPT_RAND, 's',
+ "Load the file(s) into the random number generator"},
+ {"passout", OPT_PASSOUT, 's', "Output file pass phrase source"},
+ {"", OPT_CIPHER, '-', "Encrypt the output with any supported cipher"},