Skip to content

Implementation for PEM_write_PrivateKey & PEM_write_PUBKEY#10317

Merged
dgarske merged 7 commits into
wolfSSL:masterfrom
Roy-Carter:feature/pem_write_enhancement
Jun 1, 2026
Merged

Implementation for PEM_write_PrivateKey & PEM_write_PUBKEY#10317
dgarske merged 7 commits into
wolfSSL:masterfrom
Roy-Carter:feature/pem_write_enhancement

Conversation

@Roy-Carter

Copy link
Copy Markdown
Contributor

Description

As part of a continuous integration from OpenSSL I came across the missing functions of : PEM_write_PrivateKey & PEM_write_PUBKEY while their read does exist , i've reversed the logic based on the read implementation to also support compatibility for write .

Testing

Tested via adding 2 new tests

  1. test_wolfSSL_PEM_write_PrivateKey
  2. test_wolfSSL_PEM_write_PUBKEY

Checklist

  • [*] added tests
  • [*] updated/added doxygen

@Roy-Carter

Copy link
Copy Markdown
Contributor Author

@julek-wolfssl could you run the workflow on this ?

@wolfSSL-Bot

Copy link
Copy Markdown

Can one of the admins verify this patch?

@dgarske

dgarske commented Apr 28, 2026

Copy link
Copy Markdown
Member

Okay to test. Contributor agreement on file.

@github-actions

github-actions Bot commented Apr 29, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

@Roy-Carter
Roy-Carter force-pushed the feature/pem_write_enhancement branch from a5506d0 to 4f700a4 Compare April 29, 2026 10:05
@Roy-Carter

Copy link
Copy Markdown
Contributor Author

same here , vpn test failed , rebased to master @julek-wolfssl

@dgarske

dgarske commented May 5, 2026

Copy link
Copy Markdown
Member

Jenkins retest this please

@dgarske

dgarske commented May 8, 2026

Copy link
Copy Markdown
Member

Hi @Roy-Carter can you please rebase this to latest master and force push again? Thank you!

@Roy-Carter
Roy-Carter force-pushed the feature/pem_write_enhancement branch from 4f700a4 to 517f05e Compare May 8, 2026 14:55
@Roy-Carter

Copy link
Copy Markdown
Contributor Author

hey @dgarske , just rebased it to master , wanna re-run workflow just incase?

Comment thread src/pk.c Outdated
@Roy-Carter

Copy link
Copy Markdown
Contributor Author

@dgarske Fixed the header guard for the function , can we re-run ?

@dgarske

dgarske commented May 12, 2026

Copy link
Copy Markdown
Member

Jenkins retest this please

@julek-wolfssl

Copy link
Copy Markdown
Member

Jenkins retest this please

@julek-wolfssl julek-wolfssl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix this error. Please rebase before pushing.

  Testing DEFAULT: --enable-leantls --enable-session-ticket --enable-sni --enable-opensslextra --disable-shared
  Configure RESULT = 0
  
  make[2]: warning: -j3 forced in submake: resetting jobserver mode.
  In file included from src/ssl.c:459:

  ./src/pk.c:306:12: error: ‘der_write_to_file_as_pem’ defined but not used [-Werror=unused-function]
    306 | static int der_write_to_file_as_pem(const unsigned char* der, int derSz,
        |            ^~~~~~~~~~~~~~~~~~~~~~~~
  cc1: all warnings being treated as errors

Comment thread src/pk.c Outdated
Comment thread src/pk.c
Comment thread src/pk.c
@Roy-Carter
Roy-Carter force-pushed the feature/pem_write_enhancement branch from 511b36a to b20c1db Compare May 22, 2026 16:25
@Roy-Carter

Copy link
Copy Markdown
Contributor Author

I've fixed the notes and rebased to master , can we re-run workflow @julek-wolfssl ?

@dgarske dgarske left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Roy-Carter

@dgarske
dgarske merged commit 71ca579 into wolfSSL:master Jun 1, 2026
439 of 440 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.

4 participants