200-OPENSSL_config-restore-error-agnosticism.patch 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. From 9933d4a06bd0a0b5b757f072944e8cd54d4bddd3 Mon Sep 17 00:00:00 2001
  2. From: Richard Levitte <[email protected]>
  3. Date: Wed, 20 Mar 2019 10:18:13 +0100
  4. Subject: [PATCH] OPENSSL_config(): restore error agnosticism
  5. Great effort has been made to make initialization more configurable.
  6. However, the behavior of OPENSSL_config() was lost in the process,
  7. having it suddenly generate errors it didn't previously, which is not
  8. how it's documented to behave.
  9. A simple setting of default flags fixes this problem.
  10. Fixes #8528
  11. Reviewed-by: Matt Caswell <[email protected]>
  12. (Merged from https://github.com/openssl/openssl/pull/8533)
  13. (cherry picked from commit 905c9a72a708701597891527b422c7f374125c52)
  14. diff --git a/crypto/conf/conf_sap.c b/crypto/conf/conf_sap.c
  15. index 2ce42f0c67..3805c426d8 100644
  16. --- a/crypto/conf/conf_sap.c
  17. +++ b/crypto/conf/conf_sap.c
  18. @@ -35,6 +35,7 @@ void OPENSSL_config(const char *appname)
  19. memset(&settings, 0, sizeof(settings));
  20. if (appname != NULL)
  21. settings.appname = strdup(appname);
  22. + settings.flags = DEFAULT_CONF_MFLAGS;
  23. OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, &settings);
  24. }
  25. #endif