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 / +7 lines)
Lines 55-60 const SSL_METHOD *sycSSLv2_server_method(void) { Link Here
55
}
55
}
56
#endif
56
#endif
57
57
58
#if HAVE_SSLv3_client_method
58
const SSL_METHOD *sycSSLv3_client_method(void) {
59
const SSL_METHOD *sycSSLv3_client_method(void) {
59
   const SSL_METHOD *result;
60
   const SSL_METHOD *result;
60
   Debug("SSLv3_client_method()");
61
   Debug("SSLv3_client_method()");
Lines 62-68 const SSL_METHOD *sycSSLv3_client_method(void) { Link Here
62
   Debug1("SSLv3_client_method() -> %p", result);
63
   Debug1("SSLv3_client_method() -> %p", result);
63
   return result;
64
   return result;
64
}
65
}
66
#endif
65
67
68
#if HAVE_SSLv3_server_method
66
const SSL_METHOD *sycSSLv3_server_method(void) {
69
const SSL_METHOD *sycSSLv3_server_method(void) {
67
   const SSL_METHOD *result;
70
   const SSL_METHOD *result;
68
   Debug("SSLv3_server_method()");
71
   Debug("SSLv3_server_method()");
Lines 70-75 const SSL_METHOD *sycSSLv3_server_method(void) { Link Here
70
   Debug1("SSLv3_server_method() -> %p", result);
73
   Debug1("SSLv3_server_method() -> %p", result);
71
   return result;
74
   return result;
72
}
75
}
76
#endif
73
77
74
const SSL_METHOD *sycSSLv23_client_method(void) {
78
const SSL_METHOD *sycSSLv23_client_method(void) {
75
   const SSL_METHOD *result;
79
   const SSL_METHOD *result;
Lines 331-336 void sycSSL_free(SSL *ssl) { Link Here
331
   return;
335
   return;
332
}
336
}
333
337
338
#ifndef OPENSSL_NO_EGD
334
int sycRAND_egd(const char *path) {
339
int sycRAND_egd(const char *path) {
335
   int result;
340
   int result;
336
   Debug1("RAND_egd(\"%s\")", path);
341
   Debug1("RAND_egd(\"%s\")", path);
Lines 338-343 int sycRAND_egd(const char *path) { Link Here
338
   Debug1("RAND_egd() -> %d", result);
343
   Debug1("RAND_egd() -> %d", result);
339
   return result;
344
   return result;
340
}
345
}
346
#endif
341
347
342
DH *sycPEM_read_bio_DHparams(BIO *bp, DH **x, pem_password_cb *cb, void *u) {
348
DH *sycPEM_read_bio_DHparams(BIO *bp, DH **x, pem_password_cb *cb, void *u) {
343
   DH *result;
349
   DH *result;
Lines 375-381 int sycFIPS_mode_set(int onoff) { Link Here
375
}
381
}
376
#endif /* WITH_FIPS */
382
#endif /* WITH_FIPS */
377
383
378
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
384
#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
379
const COMP_METHOD *sycSSL_get_current_compression(SSL *ssl) {
385
const COMP_METHOD *sycSSL_get_current_compression(SSL *ssl) {
380
   const COMP_METHOD *result;
386
   const COMP_METHOD *result;
381
   Debug1("SSL_get_current_compression(%p)", ssl);
387
   Debug1("SSL_get_current_compression(%p)", ssl);
(-)a/sslcls.h (-1 / +5 lines)
Lines 47-53 X509 *sycSSL_get_peer_certificate(SSL *ssl); Link Here
47
int sycSSL_shutdown(SSL *ssl);
47
int sycSSL_shutdown(SSL *ssl);
48
void sycSSL_CTX_free(SSL_CTX *ctx);
48
void sycSSL_CTX_free(SSL_CTX *ctx);
49
void sycSSL_free(SSL *ssl);
49
void sycSSL_free(SSL *ssl);
50
#ifndef OPENSSL_NO_EGD
50
int sycRAND_egd(const char *path);
51
int sycRAND_egd(const char *path);
52
#endif
51
53
52
DH *sycPEM_read_bio_DHparams(BIO *bp, DH **x, pem_password_cb *cb, void *u);
54
DH *sycPEM_read_bio_DHparams(BIO *bp, DH **x, pem_password_cb *cb, void *u);
53
55
Lines 55-61 BIO *sycBIO_new_file(const char *filename, const char *mode); Link Here
55
57
56
int sycFIPS_mode_set(int onoff);
58
int sycFIPS_mode_set(int onoff);
57
59
58
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
60
#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
59
const COMP_METHOD *sycSSL_get_current_compression(SSL *ssl);
61
const COMP_METHOD *sycSSL_get_current_compression(SSL *ssl);
60
const COMP_METHOD *sycSSL_get_current_expansion(SSL *ssl);
62
const COMP_METHOD *sycSSL_get_current_expansion(SSL *ssl);
61
const char *sycSSL_COMP_get_name(const COMP_METHOD *comp);
63
const char *sycSSL_COMP_get_name(const COMP_METHOD *comp);
Lines 98-104 const char *sycSSL_COMP_get_name(const COMP_METHOD *comp); Link Here
98
#define sycSSL_shutdown(s) SSL_shutdown(s)
100
#define sycSSL_shutdown(s) SSL_shutdown(s)
99
#define sycSSL_CTX_free(c) SSL_CTX_free(c)
101
#define sycSSL_CTX_free(c) SSL_CTX_free(c)
100
#define sycSSL_free(s) SSL_free(s)
102
#define sycSSL_free(s) SSL_free(s)
103
#ifndef OPENSSL_NO_EGD
101
#define sycRAND_egd(p) RAND_egd(p)
104
#define sycRAND_egd(p) RAND_egd(p)
105
#endif
102
106
103
#define sycPEM_read_bio_DHparams(b,x,p,u) PEM_read_bio_DHparams(b,x,p,u)
107
#define sycPEM_read_bio_DHparams(b,x,p,u) PEM_read_bio_DHparams(b,x,p,u)
104
108
(-)a/xio-openssl.c (-6 / +18 lines)
Lines 108-116 const struct optdesc opt_openssl_key = { "openssl-key", "key", Link Here
108
const struct optdesc opt_openssl_dhparam     = { "openssl-dhparam",     "dh",    OPT_OPENSSL_DHPARAM,     GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
108
const struct optdesc opt_openssl_dhparam     = { "openssl-dhparam",     "dh",    OPT_OPENSSL_DHPARAM,     GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
109
const struct optdesc opt_openssl_cafile      = { "openssl-cafile",     "cafile", OPT_OPENSSL_CAFILE,      GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
109
const struct optdesc opt_openssl_cafile      = { "openssl-cafile",     "cafile", OPT_OPENSSL_CAFILE,      GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
110
const struct optdesc opt_openssl_capath      = { "openssl-capath",     "capath", OPT_OPENSSL_CAPATH,      GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
110
const struct optdesc opt_openssl_capath      = { "openssl-capath",     "capath", OPT_OPENSSL_CAPATH,      GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
111
#ifndef OPENSSL_NO_EGD
111
const struct optdesc opt_openssl_egd         = { "openssl-egd",        "egd",    OPT_OPENSSL_EGD,         GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
112
const struct optdesc opt_openssl_egd         = { "openssl-egd",        "egd",    OPT_OPENSSL_EGD,         GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
113
#endif
112
const struct optdesc opt_openssl_pseudo      = { "openssl-pseudo",     "pseudo", OPT_OPENSSL_PSEUDO,      GROUP_OPENSSL, PH_SPEC, TYPE_BOOL,     OFUNC_SPEC };
114
const struct optdesc opt_openssl_pseudo      = { "openssl-pseudo",     "pseudo", OPT_OPENSSL_PSEUDO,      GROUP_OPENSSL, PH_SPEC, TYPE_BOOL,     OFUNC_SPEC };
113
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
115
#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
114
const struct optdesc opt_openssl_compress    = { "openssl-compress",   "compress", OPT_OPENSSL_COMPRESS,  GROUP_OPENSSL, PH_SPEC, TYPE_STRING,   OFUNC_SPEC };
116
const struct optdesc opt_openssl_compress    = { "openssl-compress",   "compress", OPT_OPENSSL_COMPRESS,  GROUP_OPENSSL, PH_SPEC, TYPE_STRING,   OFUNC_SPEC };
115
#endif
117
#endif
116
#if WITH_FIPS
118
#if WITH_FIPS
Lines 147-153 int xio_reset_fips_mode(void) { Link Here
147
static void openssl_conn_loginfo(SSL *ssl) {
149
static void openssl_conn_loginfo(SSL *ssl) {
148
   Notice1("SSL connection using %s", SSL_get_cipher(ssl));
150
   Notice1("SSL connection using %s", SSL_get_cipher(ssl));
149
151
150
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
152
#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
151
   {
153
   {
152
      const COMP_METHOD *comp, *expansion;
154
      const COMP_METHOD *comp, *expansion;
153
155
Lines 651-657 int _xioopen_openssl_listen(struct single *xfd, Link Here
651
#endif /* WITH_LISTEN */
653
#endif /* WITH_LISTEN */
652
654
653
655
654
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
656
#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
655
/* In OpenSSL 0.9.7 compression methods could be added using
657
/* In OpenSSL 0.9.7 compression methods could be added using
656
 * SSL_COMP_add_compression_method(3), but the implemntation is not compatible
658
 * SSL_COMP_add_compression_method(3), but the implemntation is not compatible
657
 * with the standard (RFC3749).
659
 * with the standard (RFC3749).
Lines 722-729 int Link Here
722
   char *opt_dhparam = NULL;	/* file name of DH params */
724
   char *opt_dhparam = NULL;	/* file name of DH params */
723
   char *opt_cafile = NULL;	/* certificate authority file */
725
   char *opt_cafile = NULL;	/* certificate authority file */
724
   char *opt_capath = NULL;	/* certificate authority directory */
726
   char *opt_capath = NULL;	/* certificate authority directory */
727
#ifndef OPENSSL_NO_EGD
725
   char *opt_egd = NULL;	/* entropy gathering daemon socket path */
728
   char *opt_egd = NULL;	/* entropy gathering daemon socket path */
726
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
729
#endif
730
#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
727
   char *opt_compress = NULL;	/* compression method */
731
   char *opt_compress = NULL;	/* compression method */
728
#endif
732
#endif
729
   bool opt_pseudo = false;	/* use pseudo entropy if nothing else */
733
   bool opt_pseudo = false;	/* use pseudo entropy if nothing else */
Lines 741-749 int Link Here
741
   retropt_string(opts, OPT_OPENSSL_CAPATH, &opt_capath);
745
   retropt_string(opts, OPT_OPENSSL_CAPATH, &opt_capath);
742
   retropt_string(opts, OPT_OPENSSL_KEY, &opt_key);
746
   retropt_string(opts, OPT_OPENSSL_KEY, &opt_key);
743
   retropt_string(opts, OPT_OPENSSL_DHPARAM, &opt_dhparam);
747
   retropt_string(opts, OPT_OPENSSL_DHPARAM, &opt_dhparam);
748
#ifndef OPENSSL_NO_EGD
744
   retropt_string(opts, OPT_OPENSSL_EGD, &opt_egd);
749
   retropt_string(opts, OPT_OPENSSL_EGD, &opt_egd);
750
#endif
745
   retropt_bool(opts,OPT_OPENSSL_PSEUDO, &opt_pseudo);
751
   retropt_bool(opts,OPT_OPENSSL_PSEUDO, &opt_pseudo);
746
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
752
#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
747
   retropt_string(opts, OPT_OPENSSL_COMPRESS, &opt_compress);
753
   retropt_string(opts, OPT_OPENSSL_COMPRESS, &opt_compress);
748
#endif
754
#endif
749
#if WITH_FIPS
755
#if WITH_FIPS
Lines 877-885 int Link Here
877
      }
883
      }
878
   }
884
   }
879
885
886
#ifndef OPENSSL_NO_EGD
880
   if (opt_egd) {
887
   if (opt_egd) {
881
      sycRAND_egd(opt_egd);
888
      sycRAND_egd(opt_egd);
882
   }
889
   }
890
#endif
883
891
884
   if (opt_pseudo) {
892
   if (opt_pseudo) {
885
      long int randdata;
893
      long int randdata;
Lines 991-997 int Link Here
991
   }
999
   }
992
#endif /* !defined(EC_KEY) */
1000
#endif /* !defined(EC_KEY) */
993
1001
994
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
1002
#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
995
   if (opt_compress) {
1003
   if (opt_compress) {
996
      int result;
1004
      int result;
997
      result = openssl_setup_compression(*ctx, opt_compress);
1005
      result = openssl_setup_compression(*ctx, opt_compress);
Lines 1105-1111 static int openssl_SSL_ERROR_SSL(int level, const char *funcname) { Link Here
1105
      if (e == ((ERR_LIB_RAND<<24)|
1113
      if (e == ((ERR_LIB_RAND<<24)|
1106
		(RAND_F_SSLEAY_RAND_BYTES<<12)|
1114
		(RAND_F_SSLEAY_RAND_BYTES<<12)|
1107
		(RAND_R_PRNG_NOT_SEEDED)) /*0x24064064*/) {
1115
		(RAND_R_PRNG_NOT_SEEDED)) /*0x24064064*/) {
1116
#ifdef OPENSSL_NO_EGD
1117
	 Error("too few entropy; use option \"pseudo\"");
1118
#else
1108
	 Error("too few entropy; use options \"egd\" or \"pseudo\"");
1119
	 Error("too few entropy; use options \"egd\" or \"pseudo\"");
1120
#endif
1109
	 stat = STAT_NORETRY;
1121
	 stat = STAT_NORETRY;
1110
      } else {
1122
      } else {
1111
	 Msg2(level, "%s(): %s", funcname, ERR_error_string(e, buf));
1123
	 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 296-302 const struct optname optionnames[] = { Link Here
296
#if WITH_EXT2 && defined(EXT2_COMPR_FL)
296
#if WITH_EXT2 && defined(EXT2_COMPR_FL)
297
	IF_ANY    ("compr",	&opt_ext2_compr)
297
	IF_ANY    ("compr",	&opt_ext2_compr)
298
#endif
298
#endif
299
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
299
#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
300
	IF_OPENSSL("compress",	&opt_openssl_compress)
300
	IF_OPENSSL("compress",	&opt_openssl_compress)
301
#endif
301
#endif
302
#ifdef TCP_CONN_ABORT_THRESHOLD  /* HP_UX */
302
#ifdef TCP_CONN_ABORT_THRESHOLD  /* HP_UX */
Lines 412-418 const struct optname optionnames[] = { Link Here
412
#ifdef ECHOPRT
412
#ifdef ECHOPRT
413
	IF_TERMIOS("echoprt",	&opt_echoprt)
413
	IF_TERMIOS("echoprt",	&opt_echoprt)
414
#endif
414
#endif
415
#ifndef OPENSSL_NO_EGD
415
	IF_OPENSSL("egd",	&opt_openssl_egd)
416
	IF_OPENSSL("egd",	&opt_openssl_egd)
417
#endif
416
	IF_ANY    ("end-close",	&opt_end_close)
418
	IF_ANY    ("end-close",	&opt_end_close)
417
	IF_TERMIOS("eof",	&opt_veof)
419
	IF_TERMIOS("eof",	&opt_veof)
418
	IF_TERMIOS("eol",	&opt_veol)
420
	IF_TERMIOS("eol",	&opt_veol)
Lines 1098-1108 const struct optname optionnames[] = { Link Here
1098
	IF_OPENSSL("openssl-certificate",	&opt_openssl_certificate)
1100
	IF_OPENSSL("openssl-certificate",	&opt_openssl_certificate)
1099
	IF_OPENSSL("openssl-cipherlist",	&opt_openssl_cipherlist)
1101
	IF_OPENSSL("openssl-cipherlist",	&opt_openssl_cipherlist)
1100
	IF_OPENSSL("openssl-commonname",	&opt_openssl_commonname)
1102
	IF_OPENSSL("openssl-commonname",	&opt_openssl_commonname)
1101
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
1103
#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
1102
	IF_OPENSSL("openssl-compress",	&opt_openssl_compress)
1104
	IF_OPENSSL("openssl-compress",	&opt_openssl_compress)
1103
#endif
1105
#endif
1104
	IF_OPENSSL("openssl-dhparam",	&opt_openssl_dhparam)
1106
	IF_OPENSSL("openssl-dhparam",	&opt_openssl_dhparam)
1107
#ifndef OPENSSL_NO_EGD
1105
	IF_OPENSSL("openssl-egd",	&opt_openssl_egd)
1108
	IF_OPENSSL("openssl-egd",	&opt_openssl_egd)
1109
#endif
1106
#if WITH_FIPS
1110
#if WITH_FIPS
1107
	IF_OPENSSL("openssl-fips",	&opt_openssl_fips)
1111
	IF_OPENSSL("openssl-fips",	&opt_openssl_fips)
1108
#endif
1112
#endif
(-)a/xioopts.h (-2 / +3 lines)
Lines 474-484 enum e_optcode { Link Here
474
   OPT_OPENSSL_CERTIFICATE,
474
   OPT_OPENSSL_CERTIFICATE,
475
   OPT_OPENSSL_CIPHERLIST,
475
   OPT_OPENSSL_CIPHERLIST,
476
   OPT_OPENSSL_COMMONNAME,
476
   OPT_OPENSSL_COMMONNAME,
477
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
477
#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
478
   OPT_OPENSSL_COMPRESS,
478
   OPT_OPENSSL_COMPRESS,
479
#endif
479
#endif
480
   OPT_OPENSSL_DHPARAM,
480
   OPT_OPENSSL_DHPARAM,
481
#ifndef OPENSSL_NO_EGD
481
   OPT_OPENSSL_EGD,
482
   OPT_OPENSSL_EGD,
483
#endif
482
   OPT_OPENSSL_FIPS,
484
   OPT_OPENSSL_FIPS,
483
   OPT_OPENSSL_KEY,
485
   OPT_OPENSSL_KEY,
484
   OPT_OPENSSL_METHOD,
486
   OPT_OPENSSL_METHOD,
485
- 

Return to bug 565244