summaryrefslogtreecommitdiffstats
path: root/src/network/ssl/qsslcertificate_p.h
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@digia.com>2014-08-08 17:30:19 +0300
committerOliver Wolff <oliver.wolff@digia.com>2014-08-09 08:28:56 +0200
commit6f1299c0b44c969137d28da346fc6539aac20f3b (patch)
treec00f78242c68905f52bfa888b7c328801ea6453b /src/network/ssl/qsslcertificate_p.h
parent9aaa61562675ddcdbf835e5acaf044db2a08f155 (diff)
SSL: split ssl files into general and "_openssl" implementation
In order to prepare the addition of WinRT and iOS (SecureTransport) implementations of SSL the structure of some SSL files has to be redone. Parts of certificate that probably can be reused by other ports stayed in qsslcertificate.cpp while other parts were moved to qsslcertificate_openssl.cpp. qsslcontext, qsslkey and qsslsocket were suffixed by _openssl to show that these are pure openssl implementations. Change-Id: I7b022dec49759f882274999c0991bf95788f2a3a Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'src/network/ssl/qsslcertificate_p.h')
-rw-r--r--src/network/ssl/qsslcertificate_p.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/network/ssl/qsslcertificate_p.h b/src/network/ssl/qsslcertificate_p.h
index 6cf6974543..4bee9edcb9 100644
--- a/src/network/ssl/qsslcertificate_p.h
+++ b/src/network/ssl/qsslcertificate_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtNetwork module of the Qt Toolkit.
@@ -40,8 +40,8 @@
****************************************************************************/
-#ifndef QSSLCERTIFICATE_P_H
-#define QSSLCERTIFICATE_P_H
+#ifndef QSSLCERTIFICATE_OPENSSL_P_H
+#define QSSLCERTIFICATE_OPENSSL_P_H
#include "qsslcertificate.h"
@@ -61,10 +61,18 @@
#include <QtCore/qdatetime.h>
#include <QtCore/qmap.h>
+#ifndef QT_NO_OPENSSL
#include <openssl/x509.h>
+#else
+struct X509;
+struct X509_EXTENSION;
+struct ASN1_OBJECT;
+#endif
QT_BEGIN_NAMESPACE
+// forward declaration
+
class QSslCertificatePrivate
{
public:
@@ -76,8 +84,10 @@ public:
~QSslCertificatePrivate()
{
+#ifndef QT_NO_OPENSSL
if (x509)
q_X509_free(x509);
+#endif
}
bool null;
@@ -102,6 +112,7 @@ public:
static QList<QSslCertificate> certificatesFromDer(const QByteArray &der, int count = -1);
static bool isBlacklisted(const QSslCertificate &certificate);
static QSslCertificateExtension convertExtension(X509_EXTENSION *ext);
+ static QByteArray subjectInfoToString(QSslCertificate::SubjectInfo info);
friend class QSslSocketBackendPrivate;
@@ -110,4 +121,4 @@ public:
QT_END_NAMESPACE
-#endif
+#endif // QSSLCERTIFICATE_OPENSSL_P_H