Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 565244 | Differences between
and this patch

Collapse All | Expand All

(-)a/sslcls.c (-1 / +3 lines)
Lines 347-352 void sycSSL_free(SSL *ssl) { Link Here
347
   return;
347
   return;
348
}
348
}
349
349
350
#ifndef OPENSSL_NO_EGD
350
int sycRAND_egd(const char *path) {
351
int sycRAND_egd(const char *path) {
351
   int result;
352
   int result;
352
   Debug1("RAND_egd(\"%s\")", path);
353
   Debug1("RAND_egd(\"%s\")", path);
Lines 354-359 int sycRAND_egd(const char *path) { Link Here
354
   Debug1("RAND_egd() -> %d", result);
355
   Debug1("RAND_egd() -> %d", result);
355
   return result;
356
   return result;
356
}
357
}
358
#endif
357
359
358
DH *sycPEM_read_bio_DHparams(BIO *bp, DH **x, pem_password_cb *cb, void *u) {
360
DH *sycPEM_read_bio_DHparams(BIO *bp, DH **x, pem_password_cb *cb, void *u) {
359
   DH *result;
361
   DH *result;
Lines 391-397 int sycFIPS_mode_set(int onoff) { Link Here
391
}
393
}
392
#endif /* WITH_FIPS */
394
#endif /* WITH_FIPS */
393
395
394
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
396
#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
395
const COMP_METHOD *sycSSL_get_current_compression(SSL *ssl) {
397
const COMP_METHOD *sycSSL_get_current_compression(SSL *ssl) {
396
   const COMP_METHOD *result;
398
   const COMP_METHOD *result;
397
   Debug1("SSL_get_current_compression(%p)", ssl);
399
   Debug1("SSL_get_current_compression(%p)", ssl);
(-)a/sslcls.h (-1 / +3 lines)
Lines 49-55 X509 *sycSSL_get_peer_certificate(SSL *ssl); Link Here
49
int sycSSL_shutdown(SSL *ssl);
49
int sycSSL_shutdown(SSL *ssl);
50
void sycSSL_CTX_free(SSL_CTX *ctx);
50
void sycSSL_CTX_free(SSL_CTX *ctx);
51
void sycSSL_free(SSL *ssl);
51
void sycSSL_free(SSL *ssl);
52
#ifndef OPENSSL_NO_EGD
52
int sycRAND_egd(const char *path);
53
int sycRAND_egd(const char *path);
54
#endif
53
55
54
DH *sycPEM_read_bio_DHparams(BIO *bp, DH **x, pem_password_cb *cb, void *u);
56
DH *sycPEM_read_bio_DHparams(BIO *bp, DH **x, pem_password_cb *cb, void *u);
55
57
Lines 57-63 BIO *sycBIO_new_file(const char *filename, const char *mode); Link Here
57
59
58
int sycFIPS_mode_set(int onoff);
60
int sycFIPS_mode_set(int onoff);
59
61
60
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
62
#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
61
const COMP_METHOD *sycSSL_get_current_compression(SSL *ssl);
63
const COMP_METHOD *sycSSL_get_current_compression(SSL *ssl);
62
const COMP_METHOD *sycSSL_get_current_expansion(SSL *ssl);
64
const COMP_METHOD *sycSSL_get_current_expansion(SSL *ssl);
63
const char *sycSSL_COMP_get_name(const COMP_METHOD *comp);
65
const char *sycSSL_COMP_get_name(const COMP_METHOD *comp);
(-)a/xio-openssl.c (-6 / +18 lines)
Lines 181-189 const struct optdesc opt_openssl_key = { "openssl-key", "key", Link Here
181
const struct optdesc opt_openssl_dhparam     = { "openssl-dhparam",     "dh",    OPT_OPENSSL_DHPARAM,     GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
181
const struct optdesc opt_openssl_dhparam     = { "openssl-dhparam",     "dh",    OPT_OPENSSL_DHPARAM,     GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
182
const struct optdesc opt_openssl_cafile      = { "openssl-cafile",     "cafile", OPT_OPENSSL_CAFILE,      GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
182
const struct optdesc opt_openssl_cafile      = { "openssl-cafile",     "cafile", OPT_OPENSSL_CAFILE,      GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
183
const struct optdesc opt_openssl_capath      = { "openssl-capath",     "capath", OPT_OPENSSL_CAPATH,      GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
183
const struct optdesc opt_openssl_capath      = { "openssl-capath",     "capath", OPT_OPENSSL_CAPATH,      GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
184
#ifndef OPENSSL_NO_EGD
184
const struct optdesc opt_openssl_egd         = { "openssl-egd",        "egd",    OPT_OPENSSL_EGD,         GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
185
const struct optdesc opt_openssl_egd         = { "openssl-egd",        "egd",    OPT_OPENSSL_EGD,         GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
186
#endif
185
const struct optdesc opt_openssl_pseudo      = { "openssl-pseudo",     "pseudo", OPT_OPENSSL_PSEUDO,      GROUP_OPENSSL, PH_SPEC, TYPE_BOOL,     OFUNC_SPEC };
187
const struct optdesc opt_openssl_pseudo      = { "openssl-pseudo",     "pseudo", OPT_OPENSSL_PSEUDO,      GROUP_OPENSSL, PH_SPEC, TYPE_BOOL,     OFUNC_SPEC };
186
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
188
#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
187
const struct optdesc opt_openssl_compress    = { "openssl-compress",   "compress", OPT_OPENSSL_COMPRESS,  GROUP_OPENSSL, PH_SPEC, TYPE_STRING,   OFUNC_SPEC };
189
const struct optdesc opt_openssl_compress    = { "openssl-compress",   "compress", OPT_OPENSSL_COMPRESS,  GROUP_OPENSSL, PH_SPEC, TYPE_STRING,   OFUNC_SPEC };
188
#endif
190
#endif
189
#if WITH_FIPS
191
#if WITH_FIPS
Lines 220-226 int xio_reset_fips_mode(void) { Link Here
220
static void openssl_conn_loginfo(SSL *ssl) {
222
static void openssl_conn_loginfo(SSL *ssl) {
221
   Notice1("SSL connection using %s", SSL_get_cipher(ssl));
223
   Notice1("SSL connection using %s", SSL_get_cipher(ssl));
222
224
223
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
225
#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
224
   {
226
   {
225
      const COMP_METHOD *comp, *expansion;
227
      const COMP_METHOD *comp, *expansion;
226
228
Lines 786-792 int _xioopen_openssl_listen(struct single *xfd, Link Here
786
#endif /* WITH_LISTEN */
788
#endif /* WITH_LISTEN */
787
789
788
790
789
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
791
#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
790
/* In OpenSSL 0.9.7 compression methods could be added using
792
/* In OpenSSL 0.9.7 compression methods could be added using
791
 * SSL_COMP_add_compression_method(3), but the implemntation is not compatible
793
 * SSL_COMP_add_compression_method(3), but the implemntation is not compatible
792
 * with the standard (RFC3749).
794
 * with the standard (RFC3749).
Lines 857-864 int Link Here
857
   char *opt_dhparam = NULL;	/* file name of DH params */
859
   char *opt_dhparam = NULL;	/* file name of DH params */
858
   char *opt_cafile = NULL;	/* certificate authority file */
860
   char *opt_cafile = NULL;	/* certificate authority file */
859
   char *opt_capath = NULL;	/* certificate authority directory */
861
   char *opt_capath = NULL;	/* certificate authority directory */
862
#ifndef OPENSSL_NO_EGD
860
   char *opt_egd = NULL;	/* entropy gathering daemon socket path */
863
   char *opt_egd = NULL;	/* entropy gathering daemon socket path */
861
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
864
#endif
865
#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
862
   char *opt_compress = NULL;  /* compression method */
866
   char *opt_compress = NULL;  /* compression method */
863
#endif
867
#endif
864
   bool opt_pseudo = false;	/* use pseudo entropy if nothing else */
868
   bool opt_pseudo = false;	/* use pseudo entropy if nothing else */
Lines 875-883 int Link Here
875
   retropt_string(opts, OPT_OPENSSL_CAPATH, &opt_capath);
879
   retropt_string(opts, OPT_OPENSSL_CAPATH, &opt_capath);
876
   retropt_string(opts, OPT_OPENSSL_KEY, &opt_key);
880
   retropt_string(opts, OPT_OPENSSL_KEY, &opt_key);
877
   retropt_string(opts, OPT_OPENSSL_DHPARAM, &opt_dhparam);
881
   retropt_string(opts, OPT_OPENSSL_DHPARAM, &opt_dhparam);
882
#ifndef OPENSSL_NO_EGD
878
   retropt_string(opts, OPT_OPENSSL_EGD, &opt_egd);
883
   retropt_string(opts, OPT_OPENSSL_EGD, &opt_egd);
884
#endif
879
   retropt_bool(opts,OPT_OPENSSL_PSEUDO, &opt_pseudo);
885
   retropt_bool(opts,OPT_OPENSSL_PSEUDO, &opt_pseudo);
880
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
886
#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
881
   retropt_string(opts, OPT_OPENSSL_COMPRESS, &opt_compress);
887
   retropt_string(opts, OPT_OPENSSL_COMPRESS, &opt_compress);
882
#endif
888
#endif
883
#if WITH_FIPS
889
#if WITH_FIPS
Lines 1010-1018 int Link Here
1010
      }
1016
      }
1011
   }
1017
   }
1012
1018
1019
#ifndef OPENSSL_NO_EGD
1013
   if (opt_egd) {
1020
   if (opt_egd) {
1014
      sycRAND_egd(opt_egd);
1021
      sycRAND_egd(opt_egd);
1015
   }
1022
   }
1023
#endif
1016
1024
1017
   if (opt_pseudo) {
1025
   if (opt_pseudo) {
1018
      long int randdata;
1026
      long int randdata;
Lines 1117-1123 int Link Here
1117
   }
1125
   }
1118
#endif /* !defined(EC_KEY) */
1126
#endif /* !defined(EC_KEY) */
1119
1127
1120
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
1128
#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
1121
   if (opt_compress) {
1129
   if (opt_compress) {
1122
      int result;
1130
      int result;
1123
      result = openssl_setup_compression(*ctx, opt_compress);
1131
      result = openssl_setup_compression(*ctx, opt_compress);
Lines 1231-1237 static int openssl_SSL_ERROR_SSL(int level, const char *funcname) { Link Here
1231
      if (e == ((ERR_LIB_RAND<<24)|
1239
      if (e == ((ERR_LIB_RAND<<24)|
1232
		(RAND_F_SSLEAY_RAND_BYTES<<12)|
1240
		(RAND_F_SSLEAY_RAND_BYTES<<12)|
1233
		(RAND_R_PRNG_NOT_SEEDED)) /*0x24064064*/) {
1241
		(RAND_R_PRNG_NOT_SEEDED)) /*0x24064064*/) {
1242
#ifdef OPENSSL_NO_EGD
1243
	 Error("too few entropy; use option \"pseudo\"");
1244
#else
1234
	 Error("too few entropy; use options \"egd\" or \"pseudo\"");
1245
	 Error("too few entropy; use options \"egd\" or \"pseudo\"");
1246
#endif
1235
	 stat = STAT_NORETRY;
1247
	 stat = STAT_NORETRY;
1236
      } else {
1248
      } else {
1237
	 Msg2(level, "%s(): %s", funcname, ERR_error_string(e, buf));
1249
	 Msg2(level, "%s(): %s", funcname, ERR_error_string(e, buf));
(-)a/xio-openssl.h (-1 / +3 lines)
Lines 21-29 extern const struct optdesc opt_openssl_key; Link Here
21
extern const struct optdesc opt_openssl_dhparam;
21
extern const struct optdesc opt_openssl_dhparam;
22
extern const struct optdesc opt_openssl_cafile;
22
extern const struct optdesc opt_openssl_cafile;
23
extern const struct optdesc opt_openssl_capath;
23
extern const struct optdesc opt_openssl_capath;
24
#ifndef OPENSSL_NO_EGD
24
extern const struct optdesc opt_openssl_egd;
25
extern const struct optdesc opt_openssl_egd;
26
#endif
25
extern const struct optdesc opt_openssl_pseudo;
27
extern const struct optdesc opt_openssl_pseudo;
26
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
28
#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
27
extern const struct optdesc opt_openssl_compress;
29
extern const struct optdesc opt_openssl_compress;
28
#endif
30
#endif
29
#if WITH_FIPS
31
#if WITH_FIPS
(-)a/xioopts.c (-2 / +6 lines)
Lines 303-309 const struct optname optionnames[] = { Link Here
303
#if WITH_EXT2 && defined(EXT2_COMPR_FL)
303
#if WITH_EXT2 && defined(EXT2_COMPR_FL)
304
	IF_ANY    ("compr",	&opt_ext2_compr)
304
	IF_ANY    ("compr",	&opt_ext2_compr)
305
#endif
305
#endif
306
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
306
#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
307
	IF_OPENSSL("compress",  &opt_openssl_compress)
307
	IF_OPENSSL("compress",  &opt_openssl_compress)
308
#endif
308
#endif
309
#ifdef TCP_CONN_ABORT_THRESHOLD  /* HP_UX */
309
#ifdef TCP_CONN_ABORT_THRESHOLD  /* HP_UX */
Lines 419-425 const struct optname optionnames[] = { Link Here
419
#ifdef ECHOPRT
419
#ifdef ECHOPRT
420
	IF_TERMIOS("echoprt",	&opt_echoprt)
420
	IF_TERMIOS("echoprt",	&opt_echoprt)
421
#endif
421
#endif
422
#ifndef OPENSSL_NO_EGD
422
	IF_OPENSSL("egd",	&opt_openssl_egd)
423
	IF_OPENSSL("egd",	&opt_openssl_egd)
424
#endif
423
	IF_ANY    ("end-close",	&opt_end_close)
425
	IF_ANY    ("end-close",	&opt_end_close)
424
	IF_TERMIOS("eof",	&opt_veof)
426
	IF_TERMIOS("eof",	&opt_veof)
425
	IF_TERMIOS("eol",	&opt_veol)
427
	IF_TERMIOS("eol",	&opt_veol)
Lines 1062-1072 const struct optname optionnames[] = { Link Here
1062
	IF_OPENSSL("openssl-certificate",	&opt_openssl_certificate)
1064
	IF_OPENSSL("openssl-certificate",	&opt_openssl_certificate)
1063
	IF_OPENSSL("openssl-cipherlist",	&opt_openssl_cipherlist)
1065
	IF_OPENSSL("openssl-cipherlist",	&opt_openssl_cipherlist)
1064
	IF_OPENSSL("openssl-commonname",	&opt_openssl_commonname)
1066
	IF_OPENSSL("openssl-commonname",	&opt_openssl_commonname)
1065
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
1067
#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
1066
	IF_OPENSSL("openssl-compress",  &opt_openssl_compress)
1068
	IF_OPENSSL("openssl-compress",  &opt_openssl_compress)
1067
#endif
1069
#endif
1068
	IF_OPENSSL("openssl-dhparam",	&opt_openssl_dhparam)
1070
	IF_OPENSSL("openssl-dhparam",	&opt_openssl_dhparam)
1071
#ifndef OPENSSL_NO_EGD
1069
	IF_OPENSSL("openssl-egd",	&opt_openssl_egd)
1072
	IF_OPENSSL("openssl-egd",	&opt_openssl_egd)
1073
#endif
1070
#if WITH_FIPS
1074
#if WITH_FIPS
1071
	IF_OPENSSL("openssl-fips",	&opt_openssl_fips)
1075
	IF_OPENSSL("openssl-fips",	&opt_openssl_fips)
1072
#endif
1076
#endif
(-)a/xioopts.h (-2 / +3 lines)
Lines 478-488 enum e_optcode { Link Here
478
   OPT_OPENSSL_CERTIFICATE,
478
   OPT_OPENSSL_CERTIFICATE,
479
   OPT_OPENSSL_CIPHERLIST,
479
   OPT_OPENSSL_CIPHERLIST,
480
   OPT_OPENSSL_COMMONNAME,
480
   OPT_OPENSSL_COMMONNAME,
481
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
481
#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
482
   OPT_OPENSSL_COMPRESS,
482
   OPT_OPENSSL_COMPRESS,
483
#endif
483
#endif
484
   OPT_OPENSSL_DHPARAM,
484
   OPT_OPENSSL_DHPARAM,
485
#ifndef OPENSSL_NO_EGD
485
   OPT_OPENSSL_EGD,
486
   OPT_OPENSSL_EGD,
487
#endif
486
   OPT_OPENSSL_FIPS,
488
   OPT_OPENSSL_FIPS,
487
   OPT_OPENSSL_KEY,
489
   OPT_OPENSSL_KEY,
488
   OPT_OPENSSL_METHOD,
490
   OPT_OPENSSL_METHOD,
489
- 

Return to bug 565244