Nesta página

QCoapSecurityConfiguration Class

A classe QCoapSecurityConfiguration armazena opções de configuração durante o processo de autenticação. Mais...

Cabeçalho: #include <QCoapSecurityConfiguration>
CMake: find_package(Qt6 REQUIRED COMPONENTS Coap)
target_link_libraries(mytarget PRIVATE Qt6::Coap)
qmake: QT += coap

Funções públicas

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)

Descrição detalhada

Contém informações como identidade do cliente, chave pré-compartilhada, informações sobre certificados e assim por diante.

Documentação das funções de membro

QCoapSecurityConfiguration::QCoapSecurityConfiguration()

Cria uma nova instância de `QCoapSecurityConfiguration`.

QCoapSecurityConfiguration::QCoapSecurityConfiguration(const QCoapSecurityConfiguration &other)

Copia a configuração e o estado de other.

[noexcept] QCoapSecurityConfiguration::QCoapSecurityConfiguration(QCoapSecurityConfiguration &&other)

Move constrói um QCoapSecurityConfiguration, fazendo com que ele aponte para o mesmo objeto para o qual other estava apontando.

[noexcept] QCoapSecurityConfiguration::~QCoapSecurityConfiguration()

Libera todos os recursos retidos por ` QCoapSecurityConfiguration`.

QList<QSslCertificate> QCoapSecurityConfiguration::caCertificates() const

Retorna o banco de dados de certificados de autoridades certificadoras desta conexão.

Veja também setCaCertificates().

QString QCoapSecurityConfiguration::defaultCipherString() const

Retorna a string de criptografia padrão.

Veja também setDefaultCipherString().

QList<QSslCertificate> QCoapSecurityConfiguration::localCertificateChain() const

Retorna a cadeia de certificados a ser apresentada ao par durante o handshake.

Veja também setLocalCertificateChain().

QByteArray QCoapSecurityConfiguration::preSharedKey() const

Retorna a chave pré-compartilhada.

Veja também setPreSharedKey().

QByteArray QCoapSecurityConfiguration::preSharedKeyIdentity() const

Retorna a identidade do cliente PSK.

Veja também setPreSharedKeyIdentity().

QCoapPrivateKey QCoapSecurityConfiguration::privateKey() const

Retorna a chave privada atribuída à conexão.

Veja também setPrivateKey() e localCertificateChain().

void QCoapSecurityConfiguration::setCaCertificates(const QList<QSslCertificate> &certificates)

Define certificates como o banco de dados da autoridade certificadora para a conexão.

Veja também caCertificates().

void QCoapSecurityConfiguration::setDefaultCipherString(const QString &cipherString)

Define a string de criptografia SSL como cipherString.

O back-end de segurança (por exemplo, o OpenSSL) pode não incluir, por padrão, as cifras exigidas pela RFC 7252. Este método especifica quais cifras o back-end deve usar. Por exemplo, para habilitar as cifras CCM exigidas pela RFC, “AESCCM” pode ser passado como cipherString.

Consulte a documentação do OpenSSL para obter mais informações sobre strings de criptografia.

Consulte também defaultCipherString().

void QCoapSecurityConfiguration::setLocalCertificateChain(const QList<QSslCertificate> &localChain)

Define localChain como a cadeia de certificados a ser apresentada ao par durante o handshake.

Veja também localCertificateChain().

void QCoapSecurityConfiguration::setPreSharedKey(const QByteArray &preSharedKey)

Define a chave pré-compartilhada como preSharedKey.

Veja também preSharedKey().

void QCoapSecurityConfiguration::setPreSharedKeyIdentity(const QByteArray &identity)

Define a identidade do cliente PSK (a ser informada ao servidor) como identity.

Veja também preSharedKeyIdentity().

void QCoapSecurityConfiguration::setPrivateKey(const QCoapPrivateKey &key)

Define a chave privada da conexão como key.

Veja também privateKey() e setLocalCertificateChain().

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

Troca esta configuração de segurança por other. Essa operação é muito rápida e nunca falha.

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

Copia a configuração e o estado de 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.