rand.c (194206) | rand.c (215697) |
---|---|
1/* apps/rand.c */ 2/* ==================================================================== 3 * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * --- 63 unchanged lines hidden (view full) --- 72 * -hex - hex encode output 73 * num - write 'num' bytes 74 */ 75 76int MAIN(int, char **); 77 78int MAIN(int argc, char **argv) 79 { | 1/* apps/rand.c */ 2/* ==================================================================== 3 * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * --- 63 unchanged lines hidden (view full) --- 72 * -hex - hex encode output 73 * num - write 'num' bytes 74 */ 75 76int MAIN(int, char **); 77 78int MAIN(int argc, char **argv) 79 { |
80#ifndef OPENSSL_NO_ENGINE 81 ENGINE *e = NULL; 82#endif | |
83 int i, r, ret = 1; 84 int badopt; 85 char *outfile = NULL; 86 char *inrand = NULL; 87 int base64 = 0; 88 int hex = 0; 89 BIO *out = NULL; 90 int num = -1; --- 82 unchanged lines hidden (view full) --- 173#endif 174 BIO_printf(bio_err, "-rand file%cfile%c... - seed PRNG from files\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); 175 BIO_printf(bio_err, "-base64 - base64 encode output\n"); 176 BIO_printf(bio_err, "-hex - hex encode output\n"); 177 goto err; 178 } 179 180#ifndef OPENSSL_NO_ENGINE | 80 int i, r, ret = 1; 81 int badopt; 82 char *outfile = NULL; 83 char *inrand = NULL; 84 int base64 = 0; 85 int hex = 0; 86 BIO *out = NULL; 87 int num = -1; --- 82 unchanged lines hidden (view full) --- 170#endif 171 BIO_printf(bio_err, "-rand file%cfile%c... - seed PRNG from files\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); 172 BIO_printf(bio_err, "-base64 - base64 encode output\n"); 173 BIO_printf(bio_err, "-hex - hex encode output\n"); 174 goto err; 175 } 176 177#ifndef OPENSSL_NO_ENGINE |
181 e = setup_engine(bio_err, engine, 0); | 178 setup_engine(bio_err, engine, 0); |
182#endif 183 184 app_RAND_load_file(NULL, bio_err, (inrand != NULL)); 185 if (inrand != NULL) 186 BIO_printf(bio_err,"%ld semi-random bytes loaded\n", 187 app_RAND_load_files(inrand)); 188 189 out = BIO_new(BIO_s_file()); --- 59 unchanged lines hidden --- | 179#endif 180 181 app_RAND_load_file(NULL, bio_err, (inrand != NULL)); 182 if (inrand != NULL) 183 BIO_printf(bio_err,"%ld semi-random bytes loaded\n", 184 app_RAND_load_files(inrand)); 185 186 out = BIO_new(BIO_s_file()); --- 59 unchanged lines hidden --- |