このページでは

QSslError Class

QSslError クラスは、SSL エラーを表します。詳細...

ヘッダー: #include <QSslError>
CMake: find_package(Qt6 REQUIRED COMPONENTS Network)
target_link_libraries(mytarget PRIVATE Qt6::Network)
qmake: QT += network

注:このクラスのすべての関数は再入可能です。

パブリック型

enum SslError { NoError, UnableToGetIssuerCertificate, UnableToDecryptCertificateSignature, UnableToDecodeIssuerPublicKey, CertificateSignatureFailed, …, OcspStatusUnknown }

パブリック関数

QSslError()
QSslError(QSslError::SslError error)
QSslError(QSslError::SslError error, const QSslCertificate &certificate)
QSslError(const QSslError &other)
~QSslError()
QSslCertificate certificate() const
QSslError::SslError error() const
QString errorString() const
void swap(QSslError &other)
bool operator!=(const QSslError &other) const
QSslError &operator=(const QSslError &other)
bool operator==(const QSslError &other) const

詳細な説明

QSslError は、QSslSocket の SSL ハンドシェイク中に発生するエラーを管理するためのシンプルな API を提供します。

QSslSocket 、QSslCertificate 、およびQSslCipherも参照してください 。

メンバ型のドキュメント

enum QSslError::SslError

SSLハンドシェイク中に発生する可能性のある、認識されているすべてのエラーについて説明します。

定数値
QSslError::NoError0
QSslError::UnableToGetIssuerCertificate1
QSslError::UnableToDecryptCertificateSignature2
QSslError::UnableToDecodeIssuerPublicKey3
QSslError::CertificateSignatureFailed4
QSslError::CertificateNotYetValid5
QSslError::CertificateExpired6
QSslError::InvalidNotBeforeField7
QSslError::InvalidNotAfterField8
QSslError::SelfSignedCertificate9
QSslError::SelfSignedCertificateInChain10
QSslError::UnableToGetLocalIssuerCertificate11
QSslError::UnableToVerifyFirstCertificate12
QSslError::CertificateRevoked13
QSslError::InvalidCaCertificate14
QSslError::PathLengthExceeded15
QSslError::InvalidPurpose16
QSslError::CertificateUntrusted17
QSslError::CertificateRejected18
QSslError::SubjectIssuerMismatch19
QSslError::AuthorityIssuerSerialNumberMismatch20
QSslError::NoPeerCertificate21
QSslError::HostNameMismatch22
QSslError::UnspecifiedError-1
QSslError::NoSslSupport23
QSslError::CertificateBlacklisted24
QSslError::CertificateStatusUnknown25
QSslError::OcspNoResponseFound26
QSslError::OcspMalformedRequest27
QSslError::OcspMalformedResponse28
QSslError::OcspInternalError29
QSslError::OcspTryLater30
QSslError::OcspSigRequred31
QSslError::OcspUnauthorized32
QSslError::OcspResponseCannotBeTrusted33
QSslError::OcspResponseCertIdUnknown34
QSslError::OcspResponseExpired35
QSslError::OcspStatusUnknown36

関連項目: QSslError::errorString()。

メンバ関数のドキュメント

QSslError::QSslError()

エラーを指定せず、デフォルトの証明書を使用して QSslError オブジェクトを作成します。

[explicit] QSslError::QSslError(QSslError::SslError error)

QSslError オブジェクトを生成します。引数には、発生したerror が指定されます。

QSslError::QSslError(QSslError::SslError error, const QSslCertificate &certificate)

QSslError オブジェクトを生成します。2 つの引数には、発生したerror と、そのエラーが関連するcertificate を指定します。

QSslCertificateも参照してください 。

QSslError::QSslError(const QSslError &other)

other の完全なコピーを作成します。

[noexcept] QSslError::~QSslError()

QSslError オブジェクトを破棄します。

QSslCertificate QSslError::certificate() const

このエラーに関連付けられた証明書を返します。エラーがどの証明書にも関連していない場合は、nullの証明書を返します。

error() およびerrorString()も参照してください 。

QSslError::SslError QSslError::error() const

エラーの型を返します。

errorString() およびcertificate()も参照してください 。

QString QSslError::errorString() const

エラーに関する、ローカライズされた人間が読みやすい短い説明を返します。

error() およびcertificate()も参照してください 。

[noexcept] void QSslError::swap(QSslError &other)

このエラーインスタンスをother と交換します。この操作は非常に高速で、失敗することはありません。

bool QSslError::operator!=(const QSslError &other) const

このエラーが `other` と等しくない場合、true を返します。それ以外の場合は false を返します。

QSslError &QSslError::operator=(const QSslError &other)

other の内容をこのエラーに割り当てます。

bool QSslError::operator==(const QSslError &other) const

このエラーが `other` と等しい場合は `true ` を返し、そうでない場合は `false` を返します。

© 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.