Skip to content

pkey: add get bn & utf-8 param funcs #2436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

huwcbjones
Copy link
Contributor

  • sys/evp: add EVP_PKEY_gettable_params
  • sys/evp: add EVP_PKEY_settable_params
  • pkey: add get bn & utf-8 param

@alex
Copy link
Collaborator

alex commented Aug 4, 2025

What's the purpose of these? I'm not wild about exposing params as a public API, they're so volatile...

@huwcbjones
Copy link
Contributor Author

I'm running with the idea of switching the underlying implementation of the Rsa, etc implementations to be backed by the EVP API rather than the deprecated RSA_* APIs.
The Rsa impls have accessors for d, p, q, etc and my plan was to back those funcs with these APIs (see WIP: https://github.com/huwcbjones/rust-openssl/blob/b207499b65deddea14a372fba12737e50dde772b/openssl/src/rsa.rs#L241-L25).

In hindsight, they could probably be pub(crate) so we can use them internally, but not expose them.

@alex
Copy link
Collaborator

alex commented Aug 5, 2025 via email

@huwcbjones
Copy link
Contributor Author

Have reduced the visibility of those funcs

@huwcbjones huwcbjones force-pushed the huw/pkey-params branch 2 times, most recently from a5f3b1d to 56ad9f1 Compare August 5, 2025 12:31
Copy link
Collaborator

@alex alex left a comment

Choose a reason for hiding this comment

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

If you'd like to add the bindings to openssl-sys, that's fine, but it doesn't make sense to add APIs to EVP PKEY that we don't have actual callers for.

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