Skip to content

Custom csr support in _createcsr function #5098

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

Closed
avollmaier opened this issue Apr 19, 2024 · 7 comments
Closed

Custom csr support in _createcsr function #5098

avollmaier opened this issue Apr 19, 2024 · 7 comments

Comments

@avollmaier
Copy link

Hello everyone,
is it possible to provide and then use your own csr config for signing the certificates? I believe the _createcsr function does the generation of a CSR. The problem is that it always overwrites the existing config... :(

Copy link

Please upgrade to the latest code and try again first. Maybe it's already fixed. acme.sh --upgrade If it's still not working, please provide the log with --debug 2, otherwise, nobody can help you.

@avollmaier
Copy link
Author

feature request?

@Neilpang
Copy link
Member

@avollmaier
Copy link
Author

avollmaier commented Apr 21, 2024

because after a signcsr i cant do a posthook and transfer it into a keystore with the to-pkcs function :(

  • missing domain key

@avollmaier
Copy link
Author

As i already said i got this key error when the posthook triggers... the signcsr doesnt generate a key so there is no key in the folder

/root/.acme.sh/acme.sh --signcsr --csr csr.pem --standalone --server xxxx --days 12 --post-hook "/root/.acme.sh/acme.sh --domain xxxx --to-pkcs12 --password changeit"

[Mo 22. Apr 08:37:49 CEST 2024] Run post hook:'/root/.acme.sh/acme.sh --domain xxxxx --to-pkcs12 --password changeit'
Error opening private key /root/.acme.sh/xxxxx/xxxxx.key
139733299238816:error:02001002:system library:fopen:No such file or directory:bss_file.c:402:fopen('/root/.acme.sh/xxxxx/xxxx.key','r')
139733299238816:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:404:
unable to load private key

@avollmaier
Copy link
Author

This works for me:

_createcsr() {
....
if [ -f "$csrconf" ]; then
${ACME_OPENSSL_BIN:-openssl} req -new -sha256 -key "$csrkey" -config "$csrconf" -out "$csr"
return
fi
...

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

No branches or pull requests

2 participants