globalsign / hvclient

An interface for making GlobalSign Atlas API calls
MIT License
8 stars 10 forks source link

Set Signature Hash Algo with CLI #29

Closed kingcdavid closed 1 year ago

kingcdavid commented 1 year ago

There is currently no option to set the signature hash algo from the CLI, i.e.

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

We can then try to issue a cert

./hvclient --commonname example.com -dnsnames example.com -csr csr.pem hvclient: couldn't obtain certificate: 422: signature.hash_algorithm: is required

But the account is configured to require signature.hash_algorithm but that isn't an option to set in the CLI

either it should allow the client to set it, or have a sensible default

nhgs64 commented 1 year ago

I'm also running into this issue for a devops project, can we have this field added please? @yateeshbhardwaj94

yateeshbhardwaj94 commented 1 year ago

@nhgs64 Yeah sure we can discuss but what I know is that during creation of template on Atlas for API credentials, you can set your HASH algorithm there only.

iamantil commented 1 year ago

I have tried from RSA to ECC and didn't receive the hash algorithm error but getting another error: use ParsePKCS8PrivateKey instead for this key format.

toddgaunt-gs commented 1 year ago

Closed by https://github.com/globalsign/hvclient/pull/30