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)

상세 설명

이 클래스는 클라이언트 인증서를 인메모리 저장소에 저장할 수 있습니다. 웹 사이트에서 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)

certificate 를 인메모리 클라이언트 인증서 저장소에 privateKey 로 추가합니다.

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.