From ef242e0b34df0111a6f1306550acef9fde0ec1c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Wed, 2 May 2018 15:44:40 +0200 Subject: OpenSSL 1.1.1: Fix tst_QSslCertificate::toText The formatting of the output from QSslCertificate::toText has changed slightly from before, so it no longer matches the test's data. From what I can tell we just do a manual sanity check and create a new file with the new output and then augment the test. Task-number: QTBUG-67463 Change-Id: I751e5a3f9a28015f97c895cea47384704fd68e38 Reviewed-by: Timur Pocheptsov --- tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp') diff --git a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp index 1477fd212e..7f8580ddd6 100644 --- a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp +++ b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp @@ -922,6 +922,10 @@ void tst_QSslCertificate::toText() QVERIFY(f101c.open(QIODevice::ReadOnly | QFile::Text)); QByteArray txt101c = f101c.readAll(); + QFile f111(testDataDir + "more-certificates/cert-large-expiration-date.txt.1.1.1"); + QVERIFY(f111.open(QIODevice::ReadOnly | QFile::Text)); + QByteArray txt111 = f111.readAll(); + QString txtcert = cert.toText(); #ifdef QT_NO_OPENSSL @@ -930,7 +934,8 @@ void tst_QSslCertificate::toText() QVERIFY(QString::fromLatin1(txt098) == txtcert || QString::fromLatin1(txt100) == txtcert || QString::fromLatin1(txt101) == txtcert || - QString::fromLatin1(txt101c) == txtcert ); + QString::fromLatin1(txt101c) == txtcert || + QString::fromLatin1(txt111) == txtcert ); } void tst_QSslCertificate::multipleCommonNames() -- cgit v1.2.3