1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
From bc94cc08e1d3ea733946861d90a21681d58665ab Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Fri, 5 Feb 2021 16:39:11 +0100
Subject: [PATCH] openssl 1.1.1i made verification of empty messages always
succeed
BUGS: 432519
---
unittest/cms/cms.cpp | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/unittest/cms/cms.cpp b/unittest/cms/cms.cpp
index 37e188d0..4901221e 100644
--- a/unittest/cms/cms.cpp
+++ b/unittest/cms/cms.cpp
@@ -30,6 +30,8 @@
#include "import_plugins.h"
#endif
+#include <openssl/opensslv.h>
+
class CMSut : public QObject
{
Q_OBJECT
@@ -252,7 +254,9 @@ void CMSut::signverify()
msg.waitForFinished(-1);
QVERIFY(msg.wasSigned());
QVERIFY(msg.success());
+#if OPENSSL_VERSION_NUMBER < 0x1010109fL
QEXPECT_FAIL("empty", "We don't seem to be able to verify signature of a zero length message", Continue);
+#endif
QVERIFY(msg.verifySuccess());
msg.reset();
@@ -264,7 +268,9 @@ void CMSut::signverify()
msg.waitForFinished(-1);
QVERIFY(msg.wasSigned());
QVERIFY(msg.success());
+#if OPENSSL_VERSION_NUMBER < 0x1010109fL
QEXPECT_FAIL("empty", "We don't seem to be able to verify signature of a zero length message", Continue);
+#endif
QVERIFY(msg.verifySuccess());
msg.reset();
@@ -277,6 +283,9 @@ void CMSut::signverify()
msg.waitForFinished(-1);
QVERIFY(msg.wasSigned());
QVERIFY(msg.success());
+#if OPENSSL_VERSION_NUMBER >= 0x1010109fL
+ QEXPECT_FAIL("empty", "On newer openssl verifaction of zero length message always succeeds", Continue);
+#endif
QCOMPARE(msg.verifySuccess(), false);
msg.reset();
--
GitLab
|