Call RAND_cleanup in openssl application.
[openssl.git] / apps / apps.h
index e9d21d545a4983e442d024d5a37d517800db75f7..0a9d90bcb56d04ce3de719415531507a9a4ab6d1 100644 (file)
@@ -183,11 +183,13 @@ extern BIO *bio_err;
 #    define apps_startup() \
                        do { do_pipe_sig(); CRYPTO_malloc_init(); \
                        ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \
+                       RAND_cleanup(); \
                        ENGINE_load_builtin_engines(); setup_ui_method(); } while(0)
 #    define apps_shutdown() \
                        do { CONF_modules_unload(1); destroy_ui_method(); \
                        OBJ_cleanup(); EVP_cleanup(); ENGINE_cleanup(); \
                        CRYPTO_cleanup_all_ex_data(); ERR_remove_thread_state(NULL); \
+                       RAND_cleanup(); \
                        ERR_free_strings(); zlib_cleanup();} while(0)
 #  else
 #    define apps_startup() \
@@ -202,7 +204,7 @@ extern BIO *bio_err;
 #  endif
 #endif
 
-#ifdef OPENSSL_SYSNAME_WIN32
+#if defined(OPENSSL_SYSNAME_WIN32) || defined(OPENSSL_SYSNAME_WINCE)
 #  define openssl_fdset(a,b) FD_SET((unsigned int)a, b)
 #else
 #  define openssl_fdset(a,b) FD_SET(a, b)
@@ -245,7 +247,7 @@ int app_passwd(BIO *err, char *arg1, char *arg2, char **pass1, char **pass2);
 int add_oid_section(BIO *err, CONF *conf);
 X509 *load_cert(BIO *err, const char *file, int format,
        const char *pass, ENGINE *e, const char *cert_descrip);
-X509_CRL *load_crl(char *infile, int format);
+X509_CRL *load_crl(const char *infile, int format);
 int load_cert_crl_http(const char *url, BIO *err,
                                        X509 **pcert, X509_CRL **pcrl);
 EVP_PKEY *load_key(BIO *err, const char *file, int format, int maybe_stdin,
@@ -343,6 +345,8 @@ void print_cert_checks(BIO *bio, X509 *x,
                                const unsigned char *checkemail,
                                const char *checkip);
 
+void store_setup_crl_download(X509_STORE *st);
+
 #define FORMAT_UNDEF    0
 #define FORMAT_ASN1     1
 #define FORMAT_TEXT     2
@@ -357,7 +361,7 @@ void print_cert_checks(BIO *bio, X509 *x,
 #define FORMAT_ASN1RSA 10      /* DER RSAPubicKey format */
 #define FORMAT_MSBLOB  11      /* MS Key blob format */
 #define FORMAT_PVK     12      /* MS PVK file format */
-#define FORMAT_HTTP    13      /* Dowload using HTTP */
+#define FORMAT_HTTP    13      /* Download using HTTP */
 
 #define EXT_COPY_NONE  0
 #define EXT_COPY_ADD   1