Skip to content
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

Improve the type of signature padding types. #1887

Open
briansmith opened this issue Jan 9, 2024 · 0 comments
Open

Improve the type of signature padding types. #1887

briansmith opened this issue Jan 9, 2024 · 0 comments

Comments

@briansmith
Copy link
Owner

The signature padding constants are of type PSS (for 'RSA_PSS_SHA256', 'RSA_PSS_SHA384', and 'RSA_PSS_SHA512') and PKCS1 (for RSA_PKCS1_SHA256, RSA_PKCS1_SHA384, and RSA_PKCS1_SHA512). But, PSS and PKCS1 are not actually exported.

This makes it difficult to discover how to use the API because these values are used with functions that take &dyn Padding values but there's nothing in the rustdoc that indicates that PSS and PKCS1 implement Padding.

Perhaps instead these values should have type &'static dyn Padding.

I think this would be a SemVer-breaking change.

briansmith added a commit that referenced this issue Jan 9, 2024
See #1887 about addressing this
messiness long-term.
briansmith added a commit that referenced this issue Jan 9, 2024
See #1887 about addressing this
messiness long-term.
briansmith added a commit that referenced this issue Jan 9, 2024
See #1887 about addressing this
messiness long-term.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant