Obsolete Members for QSslCertificate

以下成員源於類 QSslCertificate 已過時。 提供它們是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它們。

公共函數

(obsolete) QMultiMap<QSsl::AlternateNameEntryType, QString> alternateSubjectNames () const
(obsolete) bool isValid () const

靜態公共成員

(obsolete) QList<QSslCertificate> fromPath (const QString & path , QSsl::EncodingFormat format , QRegExp::PatternSyntax syntax )

成員函數文檔編製

QMultiMap < QSsl::AlternateNameEntryType , QString > QSslCertificate:: alternateSubjectNames () const

此函數已過時。提供它是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它。

使用 QSslCertificate::subjectAlternativeNames ();

[static] QList < QSslCertificate > QSslCertificate:: fromPath (const QString & path , QSsl::EncodingFormat format , QRegExp::PatternSyntax syntax )

此函數已過時。提供它是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它。

Searches all files in the path for certificates encoded in the specified format and returns them in a list. path must be a file or a pattern matching one or more files, as specified by syntax .

範例:

const auto certs = QSslCertificate::fromPath("C:/ssl/certificate.*.pem",
                                             QSsl::Pem, QRegExp::Wildcard);
for (const QSslCertificate &cert : certs) {
    qDebug() << cert.issuerInfo(QSslCertificate::Organization);
}
					

另請參閱 fromData ().

bool QSslCertificate:: isValid () const

此函數已過時。提供它是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它。

To verify a certificate, use verify (). To check if a certificate is blacklisted, use isBlacklisted (). To check if a certificate has expired or is not yet valid, compare expiryDate () 和 effectiveDate () 采用 QDateTime::currentDateTime ()

This function checks that the current date-time is within the date-time range during which the certificate is considered valid, and checks that the certificate is not in a blacklist of fraudulent certificates.

另請參閱 isNull (), verify (), isBlacklisted (), expiryDate (),和 effectiveDate ().