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

feature idea: re-sign a CSR #236

Open
amlynnworth opened this issue Sep 4, 2024 · 2 comments
Open

feature idea: re-sign a CSR #236

amlynnworth opened this issue Sep 4, 2024 · 2 comments

Comments

@amlynnworth
Copy link

amlynnworth commented Sep 4, 2024

Hi, this is just a suggestion for something I am trying to do without python, and that is to replace the signature and public key values within a Certificate Signing Request "CSR."

This is the python-based solution: https://github.com/g-a-d/aws-kms-sign-csr

I think that, combined with AWS KMS (not AWS CloudHMS), there could be a relatively cost effective solution for independent software developers who need to codesign in a continuous integration situation, i.e. from command line on a remote "build" computer. Step 1 of that is to securely sign a CSR to give to a third party certificate supplier, so that the resulting EXE signature shows up as valid.

Meanwhile thank you for everything jsign already does.

@ebourg
Copy link
Owner

ebourg commented Sep 4, 2024

Interesting idea, thank you. Signing a CSR is fairly easy in Java with Bouncy Castle (https://stackoverflow.com/questions/7230330/sign-csr-using-bouncy-castle), however Jsign handles PKCS#7 signatures instead of raw signed hashes as found in CSR files. It might be possible to wrap the raw hash into a fake PKCS#7 structure to work around this mismatch though, I'll think about it.

@amlynnworth
Copy link
Author

Thanks! I found a very useful ASN.1 visualizer today: https://lapo.it/asn1js/
-- useful at least for those of us who do not already see the structure and sequences clearly.

And, to help the search engines, ASN.1 for Dummies

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

2 participants