diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2020-05-20 15:59:45 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2022-03-29 22:21:57 +0200 |
commit | 299186602a3ad5c7cec0879170901ffcda673414 (patch) | |
tree | 5bd4a2e67b4350e21d8adfb5f8e34cb2ddce7cad /src/plugins/tls | |
parent | 1b6874034aec21ada0a5ddba46ac3c03c4ad0fcb (diff) |
Add a test and remove a work-around for a fixed bug
The ASN.1 parser for a date-time had to check the date-time string was
all digits to catch the case of a sign in the month field, which used
to be accepted when it should not be. That bug has now been fixed, so
remove the work-around and add a second date-time test-case, renaming
(and modernising) the existing one for consistency.
Task-number: QTBUG-84349
Change-Id: I649c5129312b6865af08b22ba6893cb4e29243f8
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/plugins/tls')
-rw-r--r-- | src/plugins/tls/shared/qasn1element.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/plugins/tls/shared/qasn1element.cpp b/src/plugins/tls/shared/qasn1element.cpp index 3df76c3774..de5f70a585 100644 --- a/src/plugins/tls/shared/qasn1element.cpp +++ b/src/plugins/tls/shared/qasn1element.cpp @@ -261,13 +261,6 @@ QDateTime QAsn1Element::toDateTime() const if (mValue.back() != 'Z') return result; - // In addition, check that we only have digits representing the - // date/time. This should not really be necessary (there's no such - // thing as negative months/days/etc.); it's a workaround for - // QTBUG-84349. - if (!std::all_of(mValue.begin(), mValue.end() - 1, isAsciiDigit)) - return result; - if (mType == UtcTimeType && mValue.size() == 13) { result = QDateTime::fromString(QString::fromLatin1(mValue), QStringLiteral("yyMMddHHmmsst")); |