QWebEngineClientCertificateStore Class
La clase QWebEngineClientCertificateStore provee un almacen en memoria para certificados de clientes. Más...
| Cabecera: | #include <QWebEngineClientCertificateStore> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS WebEngineCore)target_link_libraries(mytarget PRIVATE Qt6::WebEngineCore) |
| qmake: | QT += webenginecore |
Funciones públicas
| void | add(const QSslCertificate &certificate, const QSslKey &privateKey) |
| QList<QSslCertificate> | certificates() const |
| void | clear() |
| void | remove(const QSslCertificate &certificate) |
Descripción detallada
Esta clase permite almacenar certificados de cliente en un almacén en memoria. Cuando un sitio web solicita un certificado SSL de cliente, se emite la señal QWebEnginePage::selectClientCertificate con los certificados correspondientes del almacén de certificados nativo o del almacén en memoria.
La instancia de la clase puede obtenerse con el método QWebEngineProfile::clientCertificateStore().
QFile certFile(":/resources/certificate.crt"); certFile.open(QIODevice::ReadOnly); const QSslCertificate cert(certFile.readAll(), QSsl::Pem); QFile keyFile(":/resources/privatekey.key"); keyFile.open(QIODevice::ReadOnly); const QSslKey sslKey(keyFile.readAll(), QSsl::Rsa, QSsl::Pem, QSsl::PrivateKey, ""); QWebEngineProfile profile; profile.clientCertificateStore()->add(cert, sslKey);
Documentación de funciones miembro
void QWebEngineClientCertificateStore::add(const QSslCertificate &certificate, const QSslKey &privateKey)
Añade un certificate con el privateKey al almacén de certificados de cliente en memoria.
QList<QSslCertificate> QWebEngineClientCertificateStore::certificates() const
Devuelve una lista de los certificados de cliente en el almacén en memoria. Devuelve una lista vacía si el almacén no contiene ningún certificado.
void QWebEngineClientCertificateStore::clear()
Borra todos los certificados de cliente del almacén en memoria.
void QWebEngineClientCertificateStore::remove(const QSslCertificate &certificate)
Elimina todas las instancias del certificado de cliente en el almacén de certificados de cliente en memoria que coincidan con el certificado certificate.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.