QOpcUaPkiConfiguration defines the PKI configuration of the application. More...
Header: | #include <QOpcUaPkiConfiguration> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS OpcUa) target_link_libraries(mytarget PRIVATE Qt6::OpcUa) |
qmake: | QT += opcua |
Since: | QtOpcUa 5.13 |
QOpcUaPkiConfiguration(const QOpcUaPkiConfiguration &other) | |
QOpcUaPkiConfiguration & | operator=(const QOpcUaPkiConfiguration &rhs) |
QOpcUaApplicationIdentity | applicationIdentity() const |
QString | clientCertificateFile() const |
bool | isKeyAndCertificateFileSet() const |
bool | isPkiValid() const |
QString | issuerListDirectory() const |
QString | issuerRevocationListDirectory() const |
QString | privateKeyFile() const |
QString | revocationListDirectory() const |
void | setClientCertificateFile(const QString &value) |
void | setIssuerListDirectory(const QString &value) |
void | setIssuerRevocationListDirectory(const QString &value) |
void | setPrivateKeyFile(const QString &value) |
void | setRevocationListDirectory(const QString &value) |
void | setTrustListDirectory(const QString &value) |
QString | trustListDirectory() const |
This info must be configured using QOpcUaClient::setPkiConfiguration. The used paths and files must be created beforehand.
QOpcUaPkiConfiguration pkiConfig; const QString pkiDir = QCoreApplication::applicationDirPath() + "/pki"; pkiConfig.setClientCertificateFile(pkiDir + "/own/certs/application.der"); pkiConfig.setPrivateKeyFile(pkiDir + "/own/private/application.pem"); pkiConfig.setTrustListDirectory(pkiDir + "/trusted/certs"); pkiConfig.setRevocationListDirectory(pkiDir + "/trusted/crl"); pkiConfig.setIssuerListDirectory(pkiDir + "/issuers/certs"); pkiConfig.setIssuerRevocationListDirectory(pkiDir + "/issuers/crl"); client->setPkiConfiguration(pkiConfig);
Constructs a QOpcUaPkiConfiguration from other.
Sets the values of rhs in this PKI configuration.
Returns an application identity based on the application's client certificate.
The application's identity has to match the used certificate. The returned application identity is prefilled by using information of the configured client certificate.
Returns the file path of the application's client certificate.
See also setClientCertificateFile().
Returns true if the private key file and client certificate file are set.
Return true if the public key information required to validate the server certificate is set.
Returns the path of the intermediate issuer list directory.
These issuers will not be trusted.
See also setIssuerListDirectory().
Returns the path of the intermediate issuer revocation list directory.
See also setIssuerRevocationListDirectory().
Returns the file path of the application's private key.
See also setPrivateKeyFile().
Returns the path of the certificate revocation list directory.
See also setRevocationListDirectory().
Sets the file path of the application's client certificate to value.
This file has to be in X509 DER format.
See also clientCertificateFile().
Sets the path of the intermediate issuer list directory to value.
See also issuerListDirectory().
Sets the path of the intermediate issuer revocation list directory to value.
See also issuerRevocationListDirectory().
Sets the file path of the application's private key to value.
This file has to be in X509 PEM format.
See also privateKeyFile().
Sets the path of the certificate revocation list directory to value.
See also revocationListDirectory().
Sets the path of the certificate trust list directory to value.
All certificates in this directory will be trusted. Certificates have to be in X509 DER format.
See also trustListDirectory().
Returns the folder of the certificate trust list.
See also setTrustListDirectory().