QCoapSecurityConfiguration Class
Die Klasse „QCoapSecurityConfiguration“ enthält Konfigurationsoptionen für den Authentifizierungsprozess. Mehr...
| Header: | #include <QCoapSecurityConfiguration> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Coap) target_link_libraries(mytarget PRIVATE Qt6::Coap) |
| qmake: | QT += coap |
Öffentliche Funktionen
| QCoapSecurityConfiguration() | |
| QCoapSecurityConfiguration(const QCoapSecurityConfiguration &other) | |
| QCoapSecurityConfiguration(QCoapSecurityConfiguration &&other) | |
| ~QCoapSecurityConfiguration() | |
| QList<QSslCertificate> | caCertificates() const |
| QString | defaultCipherString() const |
| QList<QSslCertificate> | localCertificateChain() const |
| QByteArray | preSharedKey() const |
| QByteArray | preSharedKeyIdentity() const |
| QCoapPrivateKey | privateKey() const |
| void | setCaCertificates(const QList<QSslCertificate> &certificates) |
| void | setDefaultCipherString(const QString &cipherString) |
| void | setLocalCertificateChain(const QList<QSslCertificate> &localChain) |
| void | setPreSharedKey(const QByteArray &preSharedKey) |
| void | setPreSharedKeyIdentity(const QByteArray &identity) |
| void | setPrivateKey(const QCoapPrivateKey &key) |
| void | swap(QCoapSecurityConfiguration &other) |
| QCoapSecurityConfiguration & | operator=(const QCoapSecurityConfiguration &other) |
Ausführliche Beschreibung
Es enthält Informationen wie die Client-Identität, den vorab geteilten Schlüssel, Informationen zu Zertifikaten und so weiter.
Dokumentation der Mitgliedsfunktionen
QCoapSecurityConfiguration::QCoapSecurityConfiguration()
Erstellt eine neue `QCoapSecurityConfiguration`.
QCoapSecurityConfiguration::QCoapSecurityConfiguration(const QCoapSecurityConfiguration &other)
Kopiert die Konfiguration und den Status von „ other “.
[noexcept] QCoapSecurityConfiguration::QCoapSecurityConfiguration(QCoapSecurityConfiguration &&other)
Erstellt eine `QCoapSecurityConfiguration` und sorgt dafür, dass sie auf dasselbe Objekt verweist, auf das zuvor ` other ` verwiesen hat.
[noexcept] QCoapSecurityConfiguration::~QCoapSecurityConfiguration()
Gibt alle von „ QCoapSecurityConfiguration “ belegten Ressourcen frei.
QList<QSslCertificate> QCoapSecurityConfiguration::caCertificates() const
Gibt die Zertifizierungsstellen-Zertifikatsdatenbank dieser Verbindung zurück.
Siehe auch „ setCaCertificates()“.
QString QCoapSecurityConfiguration::defaultCipherString() const
Gibt die Standard-Verschlüsselungszeichenfolge zurück.
Siehe auch „ setDefaultCipherString()“.
QList<QSslCertificate> QCoapSecurityConfiguration::localCertificateChain() const
Gibt die Zertifikatskette zurück, die dem Gegenüber während des Handshakes vorgelegt werden soll.
Siehe auch „ setLocalCertificateChain()“.
QByteArray QCoapSecurityConfiguration::preSharedKey() const
Gibt den vorab vereinbarten Schlüssel zurück.
Siehe auch ` setPreSharedKey()`.
QByteArray QCoapSecurityConfiguration::preSharedKeyIdentity() const
Gibt die PSK-Client-ID zurück.
Siehe auch „ setPreSharedKeyIdentity()“.
QCoapPrivateKey QCoapSecurityConfiguration::privateKey() const
Gibt den der Verbindung zugewiesenen privaten Schlüssel zurück.
Siehe auch setPrivateKey() und localCertificateChain().
void QCoapSecurityConfiguration::setCaCertificates(const QList<QSslCertificate> &certificates)
Legt „ certificates “ als Zertifizierungsstellen-Datenbank für die Verbindung fest.
Siehe auch caCertificates().
void QCoapSecurityConfiguration::setDefaultCipherString(const QString &cipherString)
Legt die SSL-Verschlüsselungszeichenfolge auf „ cipherString “ fest.
Das Sicherheits-Backend (z. B. OpenSSL) enthält möglicherweise standardmäßig nicht alle für RFC 7252 erforderlichen Verschlüsselungsalgorithmen. Diese Methode legt fest, welche Verschlüsselungsalgorithmen das Backend verwenden soll. Um beispielsweise die von RFC geforderten CCM-Verschlüsselungsalgorithmen zu aktivieren, kann „AESCCM“ als „ cipherString “ übergeben werden.
Weitere Informationen zu Verschlüsselungszeichenfolgen finden Sie in der OpenSSL-Dokumentation.
Siehe auch defaultCipherString().
void QCoapSecurityConfiguration::setLocalCertificateChain(const QList<QSslCertificate> &localChain)
Legt „ localChain “ als Zertifikatskette fest, die dem Gegenüber während des Handshakes vorgelegt werden soll.
Siehe auch localCertificateChain().
void QCoapSecurityConfiguration::setPreSharedKey(const QByteArray &preSharedKey)
Setzt den vorab vereinbarten Schlüssel auf „ preSharedKey “.
Siehe auch preSharedKey().
void QCoapSecurityConfiguration::setPreSharedKeyIdentity(const QByteArray &identity)
Legt die PSK-Client-Identität (die dem Server mitgeteilt werden soll) auf „ identity “ fest.
Siehe auch preSharedKeyIdentity().
void QCoapSecurityConfiguration::setPrivateKey(const QCoapPrivateKey &key)
Setzt den privaten Schlüssel der Verbindung auf „ key “.
Siehe auch „ privateKey()“ und „ setLocalCertificateChain()“.
[noexcept] void QCoapSecurityConfiguration::swap(QCoapSecurityConfiguration &other)
Ersetzt diese Sicherheitskonfiguration durch „ other “. Dieser Vorgang ist sehr schnell und schlägt niemals fehl.
QCoapSecurityConfiguration &QCoapSecurityConfiguration::operator=(const QCoapSecurityConfiguration &other)
Kopiert die Konfiguration und den Status von other.
© 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.