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

pki-tool genreq fails with: REQ::ERROR signing the Request [error:00000000:lib(0):func(0):reason(0)] #17

Closed
NHellFire opened this issue May 29, 2017 · 1 comment

Comments

@NHellFire
Copy link

Attempting to generate a CSR results in:

# pki-tool genreq -config /opt/ocspd/etc/ocspd/pki -outkey /opt/ocspd/etc/ocspd/private/key.pem -newkey -bits 2048 -subject 'CN=OCSP Server, O=OpenCA, C=US' -algor RSA-SHA256 -out /opt/ocspd/etc/ocspd/req.pem -batch -debug
May 29 20:00:37 2017 GMT [1213] INFO: [token.c:2570] [DEBUG] ERROR, can not load directory /root/.libpki/profile.d!
May 29 20:00:37 2017 GMT [1213] INFO: [token.c:842] [DEBUG] Can not load profiles (/root/.libpki/profile.d)

May 29 20:00:37 2017 GMT [1213] INFO: [pki-tool.c:214] [DEBUG] Output URL: /opt/ocspd/etc/ocspd/private/key.pem
May 29 20:00:37 2017 GMT [1213] INFO: [pki_algor.c:108] [DEBUG] GETTING ALGORITHM: RSA-SHA256
May 29 20:00:37 2017 GMT [1213] INFO: [pki_algor.c:117] [DEBUG] GOT ALGORITHM ID: 668
May 29 20:00:39 2017 GMT [1213] INFO: [pki_algor.c:108] [DEBUG] GETTING ALGORITHM: RSA-SHA256
May 29 20:00:39 2017 GMT [1213] INFO: [pki_algor.c:117] [DEBUG] GOT ALGORITHM ID: 668
May 29 20:00:39 2017 GMT [1213] INFO: [pki_x509_req.c:48] [DEBUG] Digest Algorithm: SHA256
May 29 20:00:39 2017 GMT [1213] INFO: [pki_x509_name.c:123] [DEBUG] ADDING KEY (mrdn=0) -> CN
May 29 20:00:39 2017 GMT [1213] INFO: [pki_x509_name.c:123] [DEBUG] ADDING KEY (mrdn=0) -> O
May 29 20:00:39 2017 GMT [1213] INFO: [pki_x509_name.c:123] [DEBUG] ADDING KEY (mrdn=0) -> C
May 29 20:00:39 2017 GMT [1213] INFO: [pki_x509_req.c:207] [DEBUG] REQ::ERROR signing the Request [error:00000000:lib(0):func(0):reason(0)]
ERROR, can not generate a new Request!

libpki 0319d1e, built with ./configure --prefix=/opt/ocspd && make
Ubuntu 17.04, OpenSSL v1.0.2g

@opencrypto
Copy link
Member

The tool syntax has changed and uses the following syntax now:

pki-tool genreq -config /opt/ocspd/etc/ocspd/pki -outkey key.pem -newkey -param bits:2048 \
    -subject 'CN=OCSP Server, O=OpenCA, C=US' -algor RSA -out req.pem -batch -debug

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