QWebEngineClientCertificateStore Class
QWebEngineClientCertificateStore クラスは、クライアント証明書のメモリ内ストアを提供します。詳細...
ヘッダー | #include <QWebEngineClientCertificateStore> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS WebEngineCore) target_link_libraries(mytarget PRIVATE Qt6::WebEngineCore) |
qmake: | QT += webenginecore |
パブリック関数
void | add(const QSslCertificate &certificate, const QSslKey &privateKey) |
QList<QSslCertificate> | certificates() const |
void | clear() |
void | remove(const QSslCertificate &certificate) |
詳細説明
このクラスは、クライアント証明書をインメモリストアに格納することができます。Web サイトが SSL クライアント証明書を要求すると、QWebEnginePage::selectClientCertificate シグナルが、ネイティブ証明書ストアまたはインメモリストアから一致する証明書とともに発行されます。
このクラスのインスタンスはQWebEngineProfile::clientCertificateStore() メソッドで取得できます。
QFile certFile(":/resouces/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);
メンバー関数ドキュメント
void QWebEngineClientCertificateStore::add(const QSslCertificate &certificate, const QSslKey &privateKey)
privateKey のcertificate をメモリ内のクライアント証明書ストアに追加する。
QList<QSslCertificate> QWebEngineClientCertificateStore::certificates() const
インメモリ・ストア内のクライアント証明書のリストを返します。ストアに証明書がない場合は空のリストを返します。
void QWebEngineClientCertificateStore::clear()
インメモリストアからすべてのクライアント証明書をクリアする。
void QWebEngineClientCertificateStore::remove(const QSslCertificate &certificate)
certificate に一致する、インメモリ・クライアント証明書ストアにあるクライアント証明書のすべてのインスタンスを削除する。
© 2025 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.