summaryrefslogtreecommitdiffstats
path: root/src/network/ssl/qasn1element.cpp
diff options
context:
space:
mode:
authorRichard J. Moore <rich@kde.org>2015-01-31 15:03:47 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2015-02-04 15:49:50 +0000
commit91a48160d62e6c2fd7e0e1d6739048a3401621b9 (patch)
tree4706c01555a9f41651b6df53d2b9034145fad711 /src/network/ssl/qasn1element.cpp
parent3bc5f8c08107bcf8b5c274411850a67aed92372d (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.cpp4
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());