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

Support sha512WithRSAEncryption for PKI #6114

Closed
johnnybubonic opened this issue Jan 27, 2019 · 7 comments
Closed

Support sha512WithRSAEncryption for PKI #6114

johnnybubonic opened this issue Jan 27, 2019 · 7 comments

Comments

@johnnybubonic
Copy link

Describe the bug
Currently, a hardcoded usage of sha256WithRSAEncryption is enforced for created certificates. This should also support SHA512 as a stepping stone to SHA3.

@aphorise
Copy link
Contributor

Key bits is already there in the PKI UI & API /pki/intermediate/generate/:type - have you recently retried this @johnnybubonic ?


Screenshot 2020-08-22 at 21 43 42

@johnnybubonic
Copy link
Author

@aphorise apologies for the delay. lots of life things happening (all good).

so in X.509, there's the key bit size (which can indeed use 4096; I use it). but i'm talking about the hashing/signature algorithm function, not the key size.

@aphorise
Copy link
Contributor

@johnnybubonic - oh indeed - thank you for the clarity. Hey I'm wondering where you've noticed the sha256WithRSAEncryption hard encoding? - or how do you encounter it via API / CLI steps. All that you can share in due time would be well appreciated for my own understanding at least.

@johnnybubonic
Copy link
Author

sure thing- i noticed it in sdk/helper/certutil/helpers.go in the CreateCertificate(data *CreationBundle) func

right after certBytes is initialized, you see an if block. The switches in that if block are where that gets set.

@hsimon-hashicorp
Copy link
Contributor

Hi there! There's an option in the API called signature_bits, but unfortunately we realized during our investigation into this issue that it's not currently documented on the API page. We'll get that sorted, but in the meantime here's what it looks like in the code:
https://github.com/hashicorp/vault/blob/main/builtin/logical/pki/fields.go#L285-L295
I'll close this issue, and we'll fix the docs issue - and if this doesn't solve the problem please feel free to re-open this issue. :)

@cipherboy
Copy link
Contributor

Looks like it was added in #11245 fwiw. :-)

@johnnybubonic
Copy link
Author

Confirmed on all fronts. Thanks, y'all!

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

5 participants