67 #define PROG rand_main
76 int MAIN(
int,
char **);
78 int MAIN(
int argc,
char **argv)
88 #ifndef OPENSSL_NO_ENGINE
103 while (!badopt && argv[++i] != NULL)
105 if (strcmp(argv[i],
"-out") == 0)
107 if ((argv[i+1] != NULL) && (outfile == NULL))
112 #ifndef OPENSSL_NO_ENGINE
113 else if (strcmp(argv[i],
"-engine") == 0)
115 if ((argv[i+1] != NULL) && (engine == NULL))
121 else if (strcmp(argv[i],
"-rand") == 0)
123 if ((argv[i+1] != NULL) && (inrand == NULL))
128 else if (strcmp(argv[i],
"-base64") == 0)
135 else if (strcmp(argv[i],
"-hex") == 0)
142 else if (isdigit((
unsigned char)argv[i][0]))
146 r = sscanf(argv[i],
"%d", &num);
147 if (r == 0 || num < 0)
168 #ifndef OPENSSL_NO_ENGINE
177 #ifndef OPENSSL_NO_ENGINE
194 #ifdef OPENSSL_SYS_VMS
214 unsigned char buf[4096];
218 if (chunk > (
int)
sizeof(buf))
227 for (i = 0; i < chunk; i++)