The QSslError class provides an SSL error. 更多...
头: | #include <QSslError> |
CMake: |
find_package(Qt6 COMPONENTS Network REQUIRED)
target_link_libraries(mytarget PRIVATE Qt6::Network) |
qmake: | QT += network |
注意: 此类的所有函数 可重入 .
enum | SslError { NoError, UnableToGetIssuerCertificate, UnableToDecryptCertificateSignature, UnableToDecodeIssuerPublicKey, CertificateSignatureFailed, …, OcspStatusUnknown } |
QSslError (const QSslError & other ) | |
QSslError (QSslError::SslError error , const QSslCertificate & certificate ) | |
QSslError (QSslError::SslError error ) | |
QSslError () | |
QSslError & | operator= (const QSslError & other ) |
~QSslError () | |
QSslCertificate | certificate () const |
QSslError::SslError | error () const |
QString | errorString () const |
void | swap (QSslError & other ) |
bool | operator!= (const QSslError & other ) const |
bool | operator== (const QSslError & other ) const |
QSslError provides a simple API for managing errors during QSslSocket 's SSL handshake.
另请参阅 QSslSocket , QSslCertificate ,和 QSslCipher .
Describes all recognized errors that can occur during an SSL handshake.
常量 | 值 |
---|---|
QSslError::NoError
|
0
|
QSslError::UnableToGetIssuerCertificate
|
1
|
QSslError::UnableToDecryptCertificateSignature
|
2
|
QSslError::UnableToDecodeIssuerPublicKey
|
3
|
QSslError::CertificateSignatureFailed
|
4
|
QSslError::CertificateNotYetValid
|
5
|
QSslError::CertificateExpired
|
6
|
QSslError::InvalidNotBeforeField
|
7
|
QSslError::InvalidNotAfterField
|
8
|
QSslError::SelfSignedCertificate
|
9
|
QSslError::SelfSignedCertificateInChain
|
10
|
QSslError::UnableToGetLocalIssuerCertificate
|
11
|
QSslError::UnableToVerifyFirstCertificate
|
12
|
QSslError::CertificateRevoked
|
13
|
QSslError::InvalidCaCertificate
|
14
|
QSslError::PathLengthExceeded
|
15
|
QSslError::InvalidPurpose
|
16
|
QSslError::CertificateUntrusted
|
17
|
QSslError::CertificateRejected
|
18
|
QSslError::SubjectIssuerMismatch
|
19
|
QSslError::AuthorityIssuerSerialNumberMismatch
|
20
|
QSslError::NoPeerCertificate
|
21
|
QSslError::HostNameMismatch
|
22
|
QSslError::UnspecifiedError
|
-1
|
QSslError::NoSslSupport
|
23
|
QSslError::CertificateBlacklisted
|
24
|
QSslError::CertificateStatusUnknown
|
25
|
QSslError::OcspNoResponseFound
|
26
|
QSslError::OcspMalformedRequest
|
27
|
QSslError::OcspMalformedResponse
|
28
|
QSslError::OcspInternalError
|
29
|
QSslError::OcspTryLater
|
30
|
QSslError::OcspSigRequred
|
31
|
QSslError::OcspUnauthorized
|
32
|
QSslError::OcspResponseCannotBeTrusted
|
33
|
QSslError::OcspResponseCertIdUnknown
|
34
|
QSslError::OcspResponseExpired
|
35
|
QSslError::OcspStatusUnknown
|
36
|
另请参阅 QSslError::errorString ().
Constructs an identical copy of other .
Constructs a QSslError object. The two arguments specify the error that occurred, and which certificate the error relates to.
另请参阅 QSslCertificate .
Constructs a QSslError object. The argument specifies the error that occurred.
Constructs a QSslError object with no error and default certificate.
Assigns the contents of other to this error.
销毁 QSslError 对象。
Returns the certificate associated with this error, or a null certificate if the error does not relate to any certificate.
另请参阅 error () 和 errorString ().
Returns the type of the error.
另请参阅 errorString () 和 certificate ().
Returns a short localized human-readable description of the error.
另请参阅 error () 和 certificate ().
[since 5.0]
void
QSslError::
swap
(
QSslError
&
other
)
Swaps this error instance with other 。此函数非常快且从不失败。
该函数在 Qt 5.0 引入。
返回
true
if this error is not equal to
other
;否则返回 false。
返回
true
if this error is equal to
other
;否则返回
false
.