summaryrefslogtreecommitdiffstats
path: root/src/network/ssl/qsslsocket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/ssl/qsslsocket.cpp')
-rw-r--r--src/network/ssl/qsslsocket.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index 04c0fb0487..1c77fac769 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -1456,6 +1456,26 @@ QList<QSslCertificate> QSslSocket::systemCaCertificates()
}
/*!
+ \since 5.4
+
+ Imports a PKCS#12 (pfx) file from the specified \a device. A PKCS#12
+ file is a bundle that can contain a number of certificates and keys.
+ This method reads a single \a key, it's \a certificate and any
+ associated \a caCertificates from the bundle. If a \a passPhrase is
+ specified then this will be used to decrypt the bundle. Returns
+ \c true if the PKCS#12 file was successfully loaded.
+
+ \note The \a device must be open and ready to be read from.
+ */
+bool QSslSocket::importPKCS12(QIODevice *device,
+ QSslKey *key, QSslCertificate *certificate,
+ QList<QSslCertificate> *caCertificates,
+ const QByteArray &passPhrase)
+{
+ return QSslSocketBackendPrivate::importPKCS12(device, key, certificate, caCertificates, passPhrase);
+}
+
+/*!
Waits until the socket is connected, or \a msecs milliseconds,
whichever happens first. If the connection has been established,
this function returns \c true; otherwise it returns \c false.