From: Doug MacEachern Date: Wed, 27 Mar 2002 03:27:13 +0000 (+0000) Subject: sslc does not currently support RAND_egd or RAND_status X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d04b4412bc042031299da5c3077f81c098037fc6;p=thirdparty%2Fapache%2Fhttpd.git sslc does not currently support RAND_egd or RAND_status git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/ssl@94207 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/ssl_engine_config.c b/ssl_engine_config.c index ef8ecd86a83..389ffda136c 100644 --- a/ssl_engine_config.c +++ b/ssl_engine_config.c @@ -462,8 +462,12 @@ const char *ssl_cmd_SSLRandomSeed(cmd_parms *cmd, void *ctx, seed->cpPath = ap_server_root_relative(mc->pPool, arg2+5); } else if ((arg2len > 4) && strEQn(arg2, "egd:", 4)) { +#ifdef HAVE_SSL_RAND_EGD seed->nSrc = SSL_RSSRC_EGD; seed->cpPath = ap_server_root_relative(mc->pPool, arg2+4); +#else + return "egd not supported with this SSL toolkit"; +#endif } else if (strcEQ(arg2, "builtin")) { seed->nSrc = SSL_RSSRC_BUILTIN; diff --git a/ssl_engine_rand.c b/ssl_engine_rand.c index 6acb2d627f5..f90bf114e8a 100644 --- a/ssl_engine_rand.c +++ b/ssl_engine_rand.c @@ -116,6 +116,7 @@ int ssl_rand_seed(server_rec *s, apr_pool_t *p, ssl_rsctx_t nCtx, char *prefix) nDone += ssl_rand_feedfp(p, fp, pRandSeed->nBytes); ssl_util_ppclose(s, p, fp); } +#if HAVE_SSL_RAND_EDG else if (pRandSeed->nSrc == SSL_RSSRC_EGD) { /* * seed in contents provided by the external @@ -125,6 +126,7 @@ int ssl_rand_seed(server_rec *s, apr_pool_t *p, ssl_rsctx_t nCtx, char *prefix) continue; nDone += n; } +#endif else if (pRandSeed->nSrc == SSL_RSSRC_BUILTIN) { struct { time_t t; diff --git a/ssl_toolkit_compat.h b/ssl_toolkit_compat.h index 1e5278ba938..1db46bbb8a9 100644 --- a/ssl_toolkit_compat.h +++ b/ssl_toolkit_compat.h @@ -47,6 +47,8 @@ #define modssl_X509_verify_cert(c) X509_verify_cert(c) +#define HAVE_SSL_RAND_EDG /* since 9.5.1 */ + #else /* RSA sslc */ #ifndef STACK_OF @@ -116,4 +118,7 @@ SSL_set_verify(ssl, verify, cb) #endif +/* sslc does not support this function, OpenSSL has since 9.5.1 */ +#define RAND_status() 1 + #endif /* SSL_TOOLKIT_COMPAT_H */