Skip to content

Commit

Permalink
Include CertificateSigning as allowed KeyUsage for the self-signed cert
Browse files Browse the repository at this point in the history
The certificate verification in open62541 1.4 checks for a self-signed certificate
by calling X509_check_issued(). This fails with X509_V_ERR_KEYUSAGE_NO_CERTSIGN
if a self-signed certificate without CertificateSigning is encountered.
  • Loading branch information
basyskom-jvoe committed Jul 10, 2024
1 parent de5d24b commit 4d3d329
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/x509certificate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ bool X509Certificate::createCertificate(const QString &pkiDir)
ku->setKeyUsage(QOpcUaX509ExtensionKeyUsage::KeyUsage::NonRepudiation);
ku->setKeyUsage(QOpcUaX509ExtensionKeyUsage::KeyUsage::KeyEncipherment);
ku->setKeyUsage(QOpcUaX509ExtensionKeyUsage::KeyUsage::DataEncipherment);
ku->setKeyUsage(QOpcUaX509ExtensionKeyUsage::KeyUsage::CertificateSigning);
csr.addExtension(ku);

// Set the extended key usage constraints
Expand Down

0 comments on commit 4d3d329

Please sign in to comment.