Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt OpcUa X509 certificate error - ExtendedKeyUsage
Forum Update on Monday, May 27th 2025

Qt OpcUa X509 certificate error - ExtendedKeyUsage

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 109 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sylver
    wrote on last edited by
    #1

    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.html

    Or 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

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved