Qt OpcUa X509 certificate error - ExtendedKeyUsage
Unsolved
General and Desktop
-
Hello,
I try to generate a X509 certificate and got the same failure like in the thread from @leonardoMB (OPCUA x509 certificate creation with errors) with no solution.I can generate a certificate with all needed parameters.
Except when I add the following code:
QOpcUaX509ExtensionExtendedKeyUsage *eku = new QOpcUaX509ExtensionExtendedKeyUsage; eku->setCritical(true); eku->setKeyUsage(QOpcUaX509ExtensionExtendedKeyUsage::KeyUsage::EmailProtection); eku->setKeyUsage(QOpcUaX509ExtensionExtendedKeyUsage::KeyUsage::TlsWebClientAuthentication); csr.addExtension(eku);
I get this failure in my log when I start using the certificate.
qt.opcua.ssl: Failed to create X509 extension QList("SSL Client", "S/MIME") qt.opcua.ssl: Invalid extension qt.opcua.ssl: Failed to create X509 extension QList("SSL Client", "S/MIME") qt.opcua.ssl: Invalid extension
Any help?
At the moment I create a working certificate manually using OpenSSL like suggested in the documentation:
https://doc.qt.io/qt-6/qtopcua-security.htmlOr is this line in the documentation my solution -> not working at the moment:
Because at the moment Qt OPC UA does not support certificate generation or GDS, this tutorial describes how to generate a self-signed OPC UA certificate on the command line using OpenSSL.
Thank you in advance.
Regards Roman