Skip to content

OpenSSL compatibility layer extension#10160

Merged
dgarske merged 7 commits into
wolfSSL:masterfrom
Roy-Carter:feature/integrate_openssl_comp_fixes
May 26, 2026
Merged

OpenSSL compatibility layer extension#10160
dgarske merged 7 commits into
wolfSSL:masterfrom
Roy-Carter:feature/integrate_openssl_comp_fixes

Conversation

@Roy-Carter

Copy link
Copy Markdown
Contributor

Description

As part of integarting to WolfSSL using the compatibility layer i've had some missing functionalities which were pretty straight forward to implement .

  1. SSL_alert_type_string / SSL_alert_desc_string: Short-form alert string functions that return 1-2 character codes for TLS alert types and descriptions (e.g., "W" for warning, "F" for fatal, "CN" for close_notify). The macros were defined but pointed to non-existent wolfSSL_alert_type_string and wolfSSL_alert_desc_string functions, causing linker errors.
  2. EVP_DigestSign / EVP_DigestVerify: One-shot convenience wrappers that combine Init+Update+Final operations into a single call. The multi-step variants (Init/Update/Final) existed, but the one-shot functions were missing.
    All functions follow OpenSSL semantics and include proper error handling.
    Please describe the scope of the fix or feature addition.

Testing

  • Unit tests added:
    • test_wolfSSL_alert_type_string: Tests all alert level codes (warning, fatal, unknown)
    • test_wolfSSL_alert_desc_string: Tests all 30 TLS alert description codes
    • test_wolfSSL_EVP_DigestSign: Tests RSA one-shot sign/verify with size query
    • test_wolfSSL_EVP_DigestSign_ecc: Tests ECC one-shot sign/verify
  • Compilation verified: All modified files compile cleanly with existing build configuration
  • Symbol verification: Confirmed all four new functions are exported in object files

Checklist

  • [* ] added tests

@wolfSSL-Bot

Copy link
Copy Markdown

Can one of the admins verify this patch?

@embhorn embhorn requested a review from julek-wolfssl April 8, 2026 12:35
@embhorn embhorn self-assigned this Apr 8, 2026
@embhorn

embhorn commented Apr 8, 2026

Copy link
Copy Markdown
Member

@Roy-Carter - I sent you a contributor agreement form in our support portal. We can proceed with this PR after it has been accepted.

@embhorn

embhorn commented Apr 8, 2026

Copy link
Copy Markdown
Member

@Roy-Carter is an approved contributor.

@embhorn embhorn assigned Roy-Carter and unassigned embhorn Apr 8, 2026
@Roy-Carter

Copy link
Copy Markdown
Contributor Author

hey @julek-wolfssl would you be able to re-run tests? I fixed the build error I had for Mac platform :)

@Roy-Carter

Copy link
Copy Markdown
Contributor Author

hey @julek-wolfssl I see a failed test on https://github.com/wolfSSL/wolfssl/actions/runs/24192185355/job/70631397253?pr=10160
supposedly test_pkcs7_padding failed . didn't have it on my branch I now rebased it to master and ran it locally like the setup with
`./configure --enable-asynccrypt --enable-all --enable-dtls13 'CFLAGS=-pedantic -Wdeclaration-after-statement -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE -DWOLFCRYPT_TEST_LINT'

and it seems to pass , atleast locally , but its not related to my code changes , maybe its due to the diff from master , can we try to re-run ?

End Group : tls 1337: test_wc_DhSetNamedKey : passed ( 0.00000) 1338: test_DhAgree_rejects_p_minus_1 : passed ( 0.00014) 1339: test_ed448_rejects_identity_key : passed ( 0.00000) 1340: test_pkcs7_decode_encrypted_outputsz : passed ( 0.00000) 1341: test_pkcs7_ori_oversized_oid : passed ( 0.00000) 1342: test_pkcs7_padding : passed ( 0.00001) 1343: test_mldsa_verify_hash : skipped 1344: test_dilithium_hash : skipped 1345: test_wolfSSL_Cleanup : passed ( 0.00001) End API Tests Failed/Skipped/Passed/All: 0/140/1205/1345

`

@julek-wolfssl

Copy link
Copy Markdown
Member

@Roy-Carter with gh workflows you need to rebase on the latest commit to pick up any fixes that might have tests failing in the older commit. There is also a conflict to be resolved but I think its a trivial one.

@Roy-Carter

Copy link
Copy Markdown
Contributor Author

done @julek-wolfssl

@julek-wolfssl julek-wolfssl force-pushed the feature/integrate_openssl_comp_fixes branch from b41d577 to 8915683 Compare April 14, 2026 11:01
@julek-wolfssl

Copy link
Copy Markdown
Member

@Roy-Carter please rebase your branch instead of merging master to your branch. I think its easier for the workflows to work with that. I rebased your branch to master and resovled the minor conflict. Let's see what the tests say now.

@Roy-Carter

Copy link
Copy Markdown
Contributor Author

hey @julek-wolfssl noted for next time , can you start the tests? seems like they weren't ran

@julek-wolfssl

Copy link
Copy Markdown
Member

Okay to test

@Roy-Carter

Copy link
Copy Markdown
Contributor Author

Hey @julek-wolfssl I'm unable to watch what's the reason for the failed Jenkins job since it requires a login to your Jenkins , would you be able to elaborate ?

@julek-wolfssl

Copy link
Copy Markdown
Member

@Roy-Carter

Testing configuration:
CFLAGS="-DUSE_CERT_BUFFERS_256 -DUSE_CERT_BUFFERS_2048" --enable-fastmath
...
FAILURES:
   1277: test_tls_cert_store_unchanged
 End API Tests
 Failed/Skipped/Passed/All: 1/1010/300/1311
FAIL scripts/unit.test (exit status: 1)

@Roy-Carter Roy-Carter force-pushed the feature/integrate_openssl_comp_fixes branch from 8915683 to b977c00 Compare April 16, 2026 11:30
@Roy-Carter

Copy link
Copy Markdown
Contributor Author

@julek-wolfssl i've rebased to master can we try to re-run ? that failure does not happen to me locally , maybe again a rebase issue .

@github-actions

github-actions Bot commented Apr 16, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

Comment thread wolfcrypt/src/evp.c Outdated
@julek-wolfssl

Copy link
Copy Markdown
Member

Please rebase on master to resolve merge conflicts.

Comment thread src/ssl.c Outdated
@Roy-Carter Roy-Carter force-pushed the feature/integrate_openssl_comp_fixes branch from b977c00 to dab361c Compare April 17, 2026 16:14
@Roy-Carter

Copy link
Copy Markdown
Contributor Author

don't test this yet , still need to fix a couple of things :) will ping here when its ready

@Roy-Carter

Copy link
Copy Markdown
Contributor Author

nvm , @julek-wolfssl @dgarske lets try to run tests , I wanna see if its my environment issue or not but the rebase seems fine on github

@Roy-Carter

Copy link
Copy Markdown
Contributor Author

can we re run workflows @julek-wolfssl

@Roy-Carter

Copy link
Copy Markdown
Contributor Author

Hey @julek-wolfssl @dgarske like I wrote in previous note here your grammar check detects the unsupported extension short cut of "UE" as a spelling error, would you be able to allow it somehow or tell me how you'd like it to be instead ?

@dgarske

dgarske commented Apr 28, 2026

Copy link
Copy Markdown
Member

Hey @julek-wolfssl @dgarske like I wrote in previous note here your grammar check detects the unsupported extension short cut of "UE" as a spelling error, would you be able to allow it somehow or tell me how you'd like it to be instead ?

Just update https://github.com/wolfSSL/wolfssl/blob/master/.codespellexcludelines to add the exception

@Roy-Carter

Copy link
Copy Markdown
Contributor Author

@dgarske can we re run workflow ? I added the UE exclusion hopefully now its proper , lets re-run

@Roy-Carter Roy-Carter force-pushed the feature/integrate_openssl_comp_fixes branch from 57858d1 to cbd5b61 Compare May 8, 2026 14:54
@Roy-Carter

Copy link
Copy Markdown
Contributor Author

@julek-wolfssl @dgarske can we re-run workflows ? test that didn't exist on branch failed - i rebasedto master

@dgarske

dgarske commented May 8, 2026

Copy link
Copy Markdown
Member

Jenkins retest this please

wolfSSL_alert_type_string
wolfSSL_alert_desc_string
wolfSSL_EVP_DigestSign
wolfSSL_EVP_DigestVerify

in the openssl compatiility layer for wolfssl
When building with --enable-opensslextra=x509small, only OPENSSL_EXTRA_X509_SMALL is defined, not OPENSSL_EXTRA, so these functions are not compiled into the library
@Roy-Carter Roy-Carter force-pushed the feature/integrate_openssl_comp_fixes branch from cbd5b61 to eb32554 Compare May 22, 2026 16:01
@Roy-Carter

Copy link
Copy Markdown
Contributor Author

I've rebased this to master can we recheck this @julek-wolfssl ?

@Roy-Carter

Copy link
Copy Markdown
Contributor Author

Is this pr good to go ? @dgarske

@dgarske dgarske merged commit 8199fda into wolfSSL:master May 26, 2026
439 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.

5 participants