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

Unable to get the cert #28

Open
iamantil opened this issue Jun 15, 2023 · 1 comment
Open

Unable to get the cert #28

iamantil opened this issue Jun 15, 2023 · 1 comment

Comments

@iamantil
Copy link

First generate a private key:
openssl genrsa -out ./private.key 2048

Then use hvclient to create a CSR:
./hvclient -privatekey ./private.key --commonname example.com -csrout csr.pem > csr.pem

Then we can look at the CSR, (this is optional)
openssl req -in csr.pem -text

We can then issue a cert
hvclient -commonname Demo_cert -csr csr.pem | openssl x509 -req -extfile <(printf "subjectAltName=DNS:pki.atlasqa.co.uk") -text -signkey test.key -out certificate.crt

Got below error:
hvclient: couldn't obtain certificate: 422: san.dns_names: has to have between 1 and 2 items
139781497472320:error:0909006C:PEM routines:get_name:no start line:../crypto/pem/pem_lib.c:745:Expecting: CERTIFICATE REQUEST

@kingcdavid
Copy link
Contributor

I think this is an error with the input, the error is saying you need to put a SAN (dnsnaems) in the request i.e.
./hvclient --commonname example.com -dnsnames example.com -csr csr.pem

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