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

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