class QOpcUaPkiConfiguration

QOpcUaPkiConfiguration defines the PKI configuration of the application. More

Synopsis

Methods

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description

This info must be configured using 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);
__init__()

Default constructs a PKI configuration with no parameters set.

__init__(other)
Parameters:

otherQOpcUaPkiConfiguration

Constructs a QOpcUaPkiConfiguration from other.

applicationIdentity()
Return type:

QOpcUaApplicationIdentity

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.

clientCertificateFile()
Return type:

str

Returns the file path of the application’s client certificate.

isKeyAndCertificateFileSet()
Return type:

bool

Returns true if the private key file and client certificate file are set.

isPkiValid()
Return type:

bool

Return true if the public key information required to validate the server certificate is set.

issuerListDirectory()
Return type:

str

Returns the path of the intermediate issuer list directory.

These issuers will not be trusted.

issuerRevocationListDirectory()
Return type:

str

Returns the path of the intermediate issuer revocation list directory.

privateKeyFile()
Return type:

str

Returns the file path of the application’s private key.

revocationListDirectory()
Return type:

str

Returns the path of the certificate revocation list directory.

setClientCertificateFile(value)
Parameters:

value – str

Sets the file path of the application’s client certificate to value.

This file has to be in X509 DER format.

setIssuerListDirectory(value)
Parameters:

value – str

Sets the path of the intermediate issuer list directory to value.

setIssuerRevocationListDirectory(value)
Parameters:

value – str

Sets the path of the intermediate issuer revocation list directory to value.

setPrivateKeyFile(value)
Parameters:

value – str

Sets the file path of the application’s private key to value.

This file has to be in X509 PEM format.

See also

privateKeyFile()

setRevocationListDirectory(value)
Parameters:

value – str

Sets the path of the certificate revocation list directory to value.

setTrustListDirectory(value)
Parameters:

value – str

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.

trustListDirectory()
Return type:

str

Returns the folder of the certificate trust list.