QOpcUaPkiConfiguration Class

QOpcUaPkiConfiguration defines the PKI configuration of the application. 更多...

头: #include <QOpcUaPkiConfiguration>
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

详细描述

此信息必须被配置使用 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);
					

成员函数文档编制

QOpcUaPkiConfiguration:: QOpcUaPkiConfiguration (const QOpcUaPkiConfiguration & other )

构造 QOpcUaPkiConfiguration from other .

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

Sets the values of rhs in this PKI configuration.

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.

另请参阅 setClientCertificateFile ().

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.

另请参阅 setIssuerListDirectory ().

QString QOpcUaPkiConfiguration:: issuerRevocationListDirectory () const

Returns the path of the intermediate issuer revocation list directory.

另请参阅 setIssuerRevocationListDirectory ().

QString QOpcUaPkiConfiguration:: privateKeyFile () const

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

另请参阅 setPrivateKeyFile ().

QString QOpcUaPkiConfiguration:: revocationListDirectory () const

Returns the path of the certificate revocation list directory.

另请参阅 setRevocationListDirectory ().

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.

另请参阅 clientCertificateFile ().

void QOpcUaPkiConfiguration:: setIssuerListDirectory (const QString & value )

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

另请参阅 issuerListDirectory ().

void QOpcUaPkiConfiguration:: setIssuerRevocationListDirectory (const QString & value )

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

另请参阅 issuerRevocationListDirectory ().

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.

另请参阅 privateKeyFile ().

void QOpcUaPkiConfiguration:: setRevocationListDirectory (const QString & value )

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

另请参阅 revocationListDirectory ().

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.

另请参阅 trustListDirectory ().

QString QOpcUaPkiConfiguration:: trustListDirectory () const

Returns the folder of the certificate trust list.

另请参阅 setTrustListDirectory ().