IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QOpcUaPkiConfiguration Class

QOpcUaPkiConfiguration defines the PKI configuration of the application.

This class was introduced in QtOpcUa 5.13.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QOpcUaPkiConfiguration Class

  • Header: QOpcUaPkiConfiguration

  • Since: QtOpcUa 5.13

  • qmake: QT += opcua

Detailed Description

This info must be configured using QOpcUaClient::setPkiConfiguration. The used paths and files must be created beforehand.

 
Sélectionnez
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);

Member Function Documentation

 

QOpcUaPkiConfiguration::QOpcUaPkiConfiguration(const QOpcUaPkiConfiguration &other)

Constructs a QOpcUaPkiConfiguration from other.

QOpcUaApplicationIdentity QOpcUaPkiConfiguration::applicationIdentity() const

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.

QString QOpcUaPkiConfiguration::clientCertificateFile() const

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

See Also

bool QOpcUaPkiConfiguration::isKeyAndCertificateFileSet() const

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

bool QOpcUaPkiConfiguration::isPkiValid() const

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

QString QOpcUaPkiConfiguration::issuerListDirectory() const

Returns the path of the intermediate issuer list directory.

These issuers will not be trusted.

See Also

QString QOpcUaPkiConfiguration::issuerRevocationListDirectory() const

Returns the path of the intermediate issuer revocation list directory.

See Also

QString QOpcUaPkiConfiguration::privateKeyFile() const

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

See Also

See also setPrivateKeyFile()

QString QOpcUaPkiConfiguration::revocationListDirectory() const

Returns the path of the certificate revocation list directory.

See Also

void QOpcUaPkiConfiguration::setClientCertificateFile(const QString &value)

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

This file has to be in X509 DER format.

See Also

void QOpcUaPkiConfiguration::setIssuerListDirectory(const QString &value)

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

See Also

See also issuerListDirectory()

void QOpcUaPkiConfiguration::setIssuerRevocationListDirectory(const QString &value)

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

See Also

void QOpcUaPkiConfiguration::setPrivateKeyFile(const QString &value)

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

This file has to be in X509 PEM format.

See Also

See also privateKeyFile()

void QOpcUaPkiConfiguration::setRevocationListDirectory(const QString &value)

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

See Also

void QOpcUaPkiConfiguration::setTrustListDirectory(const QString &value)

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

See also trustListDirectory()

QString QOpcUaPkiConfiguration::trustListDirectory() const

Returns the folder of the certificate trust list.

See Also

QOpcUaPkiConfiguration &QOpcUaPkiConfiguration::operator=(const QOpcUaPkiConfiguration &rhs)

Sets the values of rhs in this PKI configuration.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+