Skip to content

Conversation

gojimmypi
Copy link
Contributor

Description

This PR is an extension of #6825 which should be merged first. This change is separate in order to not complicate the other PR.

The conversion of server-sm2-cert.pem to DER format is corrected with a server-sm2-cert.der output name,

This is particularly important as the DER files have only one cert. (specifically server-sm2.der)

The naming convention is a bit misleading, as server-sm2.pem actually contains TWO certs:

cat   server-sm2-cert.pem    ca-sm2.pem    >    server-sm2.pem

Adding the separate server-sm2-cert.der file in this PR allows embedded targets to load both the leaf and CA separately:

    ret = wolfSSL_CTX_load_verify_buffer(ctx,
                                         server_sm2_cert_der,
                                         sizeof_server_sm2_cert_der,
                                         WOLFSSL_FILETYPE_ASN1);

    ret = wolfSSL_CTX_load_verify_buffer(ctx,
                                        ca_sm2_der, sizeof_ca_sm2_der,
                                        WOLFSSL_FILETYPE_ASN1);

Fixes zd#

Testing

How did you test?

Tested manually on embedded targets only.

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@gojimmypi gojimmypi self-assigned this Sep 18, 2025
gojimmypi added a commit to gojimmypi/wolfssl that referenced this pull request Sep 19, 2025
@gojimmypi
Copy link
Contributor Author

Jenkins retest this please

For: Cannot contact wolf-linux-cloud-node-[n]: java.lang.InterruptedException
java.io.StreamCorruptedException: invalid stream header: 636F7272

@SparkiDev
Copy link
Contributor

retest this please

@SparkiDev SparkiDev assigned SparkiDev and unassigned gojimmypi Sep 23, 2025
@SparkiDev SparkiDev removed the request for review from wolfSSL-Bot September 23, 2025 23:47
@SparkiDev SparkiDev merged commit 9cf91e1 into wolfSSL:master Sep 23, 2025
252 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants