Skip to content

Conversation

@Frauschi
Copy link
Contributor

@Frauschi Frauschi commented Jan 5, 2026

  • Create a new method DecodePrivateKey_ex() that gets the key to decode as parameters
  • Adapt DecodePrivateKey() and DecodeAltPrivateKey() to use this new method

This removes a lot of nearly duplicate code and simplifies maintenance.

@devin-ai-integration
Copy link
Contributor

🛟 Devin Lifeguard found 2 likely issues in this PR

  • declare-const-pointers snippet: Declare the parameter as const DerBuffer* key (and update any called prototypes if needed) in the signature of DecodePrivateKey_ex.
  • use-proper-function-visibility snippet: Change the definitions to ‘WOLFSSL_LOCAL int wolfssl_local_DecodePrivateKey(...’ and ‘WOLFSSL_LOCAL int wolfssl_local_DecodeAltPrivateKey(...);’ (or make them static) to match the visibility rule.

@Frauschi
please take a look at the above issues which Devin flagged. Devin will not fix these issues automatically.

@wolfSSL-Bot
Copy link

Can one of the admins verify this patch?

@dgarske
Copy link
Contributor

dgarske commented Jan 5, 2026

Okay to test. Welcome to the team! We'll get you officially added shortly.

* Create a new method DecodePrivateKey_ex() that gets the key to decode as parameters
* Adapt DecodePrivateKey() and DecodeAltPrivateKey() to use this new method
* Fix unblinding for TLS 1.3 Dual Algorithm Certificate alternative keys

This removes a lot of nearly duplicate code and simplifies maintenance.
@Frauschi Frauschi force-pushed the cleanup_decode_private_key branch from aea8594 to b8cb5be Compare January 7, 2026 12:46
@Frauschi
Copy link
Contributor Author

Frauschi commented Jan 7, 2026

I fixed the failing tests regarding the WOLFSSL_BLIND_PRIVATE_KEY option as well as the first devin issue.

Should I rename the existing DecodePrivateKey() method to wolfssl_local_DecodePrivateKey()?

@SparkiDev
Copy link
Contributor

SparkiDev commented Jan 7, 2026

No need to change names of existing functions yet.
(Unless you are reworking all the functions)

New functions need to be properly named.

@SparkiDev
Copy link
Contributor

retest this please

@dgarske dgarske self-assigned this Jan 8, 2026
@dgarske dgarske merged commit 198eac2 into wolfSSL:master Jan 8, 2026
382 checks passed
@Frauschi Frauschi deleted the cleanup_decode_private_key branch January 9, 2026 08:10
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.

4 participants