Skip to content

Support from/to PEM in OSSL wrappers#24

Merged
maxtropets merged 3 commits intomainfrom
f/pem-keys-support
Mar 25, 2026
Merged

Support from/to PEM in OSSL wrappers#24
maxtropets merged 3 commits intomainfrom
f/pem-keys-support

Conversation

@maxtropets
Copy link
Copy Markdown
Owner

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds PEM import/export support to the OpenSSL EVP key wrapper, enabling keys to be loaded from PEM and exported back to PEM, with new tests to validate round-trips and COSE sign/verify using PEM-imported keys.

Changes:

  • Add EvpKey::{from_pem_public, from_pem_private, to_pem_public, to_pem_private} APIs.
  • Add unit tests for PEM round-trips (EC/RSA) and negative PEM parsing.
  • Add a COSE integration test that signs/verifies using PEM-imported keys.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
src/ossl_wrappers.rs Adds PEM serialization/deserialization APIs for EvpKey plus comprehensive unit tests.
src/cose.rs Adds a test ensuring COSE signing/verifying works with PEM-imported keys.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/ossl_wrappers.rs
Comment thread src/ossl_wrappers.rs
Comment thread src/ossl_wrappers.rs
Comment thread src/ossl_wrappers.rs
Comment thread src/ossl_wrappers.rs
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/ossl_wrappers.rs
Comment thread src/ossl_wrappers.rs
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/ossl_wrappers.rs
Comment thread src/ossl_wrappers.rs
Comment thread src/ossl_wrappers.rs
Comment thread src/ossl_wrappers.rs
Comment thread src/ossl_wrappers.rs
Comment thread src/ossl_wrappers.rs
@maxtropets maxtropets merged commit 643dfbd into main Mar 25, 2026
5 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.

2 participants