Blame SOURCES/openssl-1.1.1-no-weak-verify.patch

9b88be
diff -up openssl-1.1.1b/crypto/asn1/a_verify.c.no-weak-verify openssl-1.1.1b/crypto/asn1/a_verify.c
9b88be
--- openssl-1.1.1b/crypto/asn1/a_verify.c.no-weak-verify	2019-02-26 15:15:30.000000000 +0100
9b88be
+++ openssl-1.1.1b/crypto/asn1/a_verify.c	2019-02-28 11:25:31.531862873 +0100
9b88be
@@ -7,6 +7,9 @@
9b88be
  * https://www.openssl.org/source/license.html
9b88be
  */
9b88be
 
9b88be
+/* for secure_getenv */
9b88be
+#define _GNU_SOURCE
9b88be
+
9b88be
 #include <stdio.h>
9b88be
 #include <time.h>
9b88be
 #include <sys/types.h>
9b88be
@@ -130,6 +133,12 @@ int ASN1_item_verify(const ASN1_ITEM *it
9b88be
         if (ret != 2)
9b88be
             goto err;
9b88be
         ret = -1;
9b88be
+    } else if ((mdnid == NID_md5
9b88be
+               && secure_getenv("OPENSSL_ENABLE_MD5_VERIFY") == NULL) ||
9b88be
+               mdnid == NID_md4 || mdnid == NID_md2 || mdnid == NID_sha) {
9b88be
+        ASN1err(ASN1_F_ASN1_ITEM_VERIFY,
9b88be
+                ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM);
9b88be
+        goto err;
9b88be
     } else {
9b88be
         const EVP_MD *type = EVP_get_digestbynid(mdnid);
9b88be