patch-xio-openssl_c 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. $OpenBSD: patch-xio-openssl_c,v 1.4 2016/02/02 10:40:32 sthen Exp $
  2. --- xio-openssl.c.orig Fri Jan 29 10:28:38 2016
  3. +++ xio-openssl.c Mon Feb 1 16:30:57 2016
  4. @@ -108,7 +108,6 @@ const struct optdesc opt_openssl_key = { "open
  5. const struct optdesc opt_openssl_dhparam = { "openssl-dhparam", "dh", OPT_OPENSSL_DHPARAM, GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
  6. const struct optdesc opt_openssl_cafile = { "openssl-cafile", "cafile", OPT_OPENSSL_CAFILE, GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
  7. const struct optdesc opt_openssl_capath = { "openssl-capath", "capath", OPT_OPENSSL_CAPATH, GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
  8. -const struct optdesc opt_openssl_egd = { "openssl-egd", "egd", OPT_OPENSSL_EGD, GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
  9. const struct optdesc opt_openssl_pseudo = { "openssl-pseudo", "pseudo", OPT_OPENSSL_PSEUDO, GROUP_OPENSSL, PH_SPEC, TYPE_BOOL, OFUNC_SPEC };
  10. #if OPENSSL_VERSION_NUMBER >= 0x00908000L
  11. const struct optdesc opt_openssl_compress = { "openssl-compress", "compress", OPT_OPENSSL_COMPRESS, GROUP_OPENSSL, PH_SPEC, TYPE_STRING, OFUNC_SPEC };
  12. @@ -147,7 +146,7 @@ int xio_reset_fips_mode(void) {
  13. static void openssl_conn_loginfo(SSL *ssl) {
  14. Notice1("SSL connection using %s", SSL_get_cipher(ssl));
  15. -#if OPENSSL_VERSION_NUMBER >= 0x00908000L
  16. +#if (OPENSSL_VERSION_NUMBER >= 0x00908000L) && !defined(OPENSSL_NO_COMP)
  17. {
  18. const COMP_METHOD *comp, *expansion;
  19. @@ -722,7 +721,6 @@ int
  20. char *opt_dhparam = NULL; /* file name of DH params */
  21. char *opt_cafile = NULL; /* certificate authority file */
  22. char *opt_capath = NULL; /* certificate authority directory */
  23. - char *opt_egd = NULL; /* entropy gathering daemon socket path */
  24. #if OPENSSL_VERSION_NUMBER >= 0x00908000L
  25. char *opt_compress = NULL; /* compression method */
  26. #endif
  27. @@ -741,7 +739,6 @@ int
  28. retropt_string(opts, OPT_OPENSSL_CAPATH, &opt_capath);
  29. retropt_string(opts, OPT_OPENSSL_KEY, &opt_key);
  30. retropt_string(opts, OPT_OPENSSL_DHPARAM, &opt_dhparam);
  31. - retropt_string(opts, OPT_OPENSSL_EGD, &opt_egd);
  32. retropt_bool(opts,OPT_OPENSSL_PSEUDO, &opt_pseudo);
  33. #if OPENSSL_VERSION_NUMBER >= 0x00908000L
  34. retropt_string(opts, OPT_OPENSSL_COMPRESS, &opt_compress);
  35. @@ -877,10 +874,6 @@ int
  36. }
  37. }
  38. - if (opt_egd) {
  39. - sycRAND_egd(opt_egd);
  40. - }
  41. -
  42. if (opt_pseudo) {
  43. long int randdata;
  44. /* initialize libc random from actual microseconds */
  45. @@ -1105,7 +1098,7 @@ static int openssl_SSL_ERROR_SSL(int level, const char
  46. if (e == ((ERR_LIB_RAND<<24)|
  47. (RAND_F_SSLEAY_RAND_BYTES<<12)|
  48. (RAND_R_PRNG_NOT_SEEDED)) /*0x24064064*/) {
  49. - Error("too few entropy; use options \"egd\" or \"pseudo\"");
  50. + Error("too few entropy; use option \"pseudo\"");
  51. stat = STAT_NORETRY;
  52. } else {
  53. Msg2(level, "%s(): %s", funcname, ERR_error_string(e, buf));