diff options
author | Richard J. Moore <rich@kde.org> | 2015-01-31 15:03:47 +0000 |
---|---|---|
committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2015-02-04 15:49:50 +0000 |
commit | 91a48160d62e6c2fd7e0e1d6739048a3401621b9 (patch) | |
tree | 4706c01555a9f41651b6df53d2b9034145fad711 /src/network/ssl/qasn1element.cpp | |
parent | 3bc5f8c08107bcf8b5c274411850a67aed92372d (diff) |
Move Rfc822NameType, DnsNameType and UniformResourceIdentifierType.
Move these types to QAsn1Element so that they can use the toString()
method which guards against malicious ASN.1.
Change-Id: I7d6155147a6fc2d41da6f3ae87551b6cb75aa9ce
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Daniel Molkentin <daniel@molkentin.de>
Diffstat (limited to 'src/network/ssl/qasn1element.cpp')
-rw-r--r-- | src/network/ssl/qasn1element.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/network/ssl/qasn1element.cpp b/src/network/ssl/qasn1element.cpp index 88f0ffb625..62e1bb0bee 100644 --- a/src/network/ssl/qasn1element.cpp +++ b/src/network/ssl/qasn1element.cpp @@ -340,7 +340,9 @@ QString QAsn1Element::toString() const if (qstrlen(mValue) < uint(mValue.size())) return QString(); - if (mType == PrintableStringType || mType == TeletexStringType) + if (mType == PrintableStringType || mType == TeletexStringType + || mType == Rfc822NameType || mType == DnsNameType + || mType == UniformResourceIdentifierType) return QString::fromLatin1(mValue, mValue.size()); if (mType == Utf8StringType) return QString::fromUtf8(mValue, mValue.size()); |