QSslCertificateExtension Class

QSslCertificateExtension クラスは、X509 証明書の拡張機能にアクセスするための API を提供します。詳細...

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

注意:このクラスの関数はすべてリエントラントです。

パブリック関数

QSslCertificateExtension()
QSslCertificateExtension(const QSslCertificateExtension &other)
~QSslCertificateExtension()
bool isCritical() const
bool isSupported() const
QString name() const
QString oid() const
void swap(QSslCertificateExtension &other)
QVariant value() const
QSslCertificateExtension &operator=(const QSslCertificateExtension &other)

詳細説明

QSslCertificateExtension は、X509 証明書に格納されている拡張機能へのアクセスを提供します。利用可能な情報は、アクセスされる拡張子のタイプによって異なります。

すべての X509 証明書エクステンションには、以下のプロパティがあります:

プロパティ説明
名前エクステンションの可読性のある名前。
criticality証明書を正しく解釈するために、その拡張機能が重要かどうかを示すブール値。
oidどの拡張であるかを示す ASN.1 オブジェクト識別子。
サポートされるこれが true の場合、拡張機能の値の構造は Qt のバージョン間で変わりません。
QVariant 拡張機能の種類に依存した構造を持つ。

このクラスはあらゆる種類の拡張機能へのアクセスを提供しますが、リリース間で変更されない形式で返されることが保証されているのは一部の拡張機能のみです。isSupported() メソッドはtrue を返します。

現在サポートされている拡張子と、返される値の構造は以下のとおりです:

名前OID詳細
基本制約2.5.29.19QVariantMap として返される。 キー 'ca' はブール値を含み、オプションのキー 'pathLenConstraint' は整数を含む。
authorityInfoAccess1.3.6.1.5.5.7.1.1QVariantMapアクセス方法ごとにキーがあり、値は URI である。
subjectKeyIdentifier2.5.29.14QVariant QString文字列はキー識別子である。
authorityKeyIdentifier2.5.29.35QVariantMap として返される。 オプションのキー 'keyid' には、QByteArray に格納された 16 進文字列としてのキー識別子が格納される。 オプションのキー 'serial' には、qlonglongとしての権威キーのシリアル番号が格納される。現在のところ、この拡張の一般名フィールドはサポートされていない。

上記のサポートされている拡張に加えて、他の多くの一般的な拡張も 合理的に構造化された形で返されます。SSL バックエンドが全くサポートしていない拡張子はQByteArray として返されます。

証明書に含まれる拡張子の種類についての詳しい情報は RFC 5280 にあります。

QSslCertificate::extensions()も参照

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

QSslCertificateExtension::QSslCertificateExtension()

QSslCertificateExtension を構築します。

QSslCertificateExtension::QSslCertificateExtension(const QSslCertificateExtension &other)

other のコピーを作成する。

[noexcept] QSslCertificateExtension::~QSslCertificateExtension()

エクステンションを破壊する。

bool QSslCertificateExtension::isCritical() const

拡張機能のクリティカリティを返します。

bool QSslCertificateExtension::isSupported() const

この拡張機能がサポートされている場合に真を返す。この場合、サポートされているとは、単にvalue() アクセサが返すQVariant の構造がバージョン間で変わらないことを意味します。サポートされていない拡張モジュールも自由に使用できますが、 返されるデータがバージョン間で同じ構造であるという保証はありません。

QString QSslCertificateExtension::name() const

拡張子の名前を返す。拡張子の名前がわからない場合は OID を返します。

QString QSslCertificateExtension::oid() const

この拡張機能の ASN.1 OID を返します。

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

この証明書エクステンションのインスタンスをother と交換する。この操作は非常に高速で、失敗することはない。

QVariant QSslCertificateExtension::value() const

拡張機能の値を返す。返される値の構造は、拡張子の種類によって異なります。

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

この拡張子にother を割り当て、この拡張子への参照を返します。

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