cli icon indicating copy to clipboard operation
cli copied to clipboard

`certs:add` and `certs:update` no longer support certificate intermediary

Open chasestubblefield opened this issue 3 years ago • 0 comments

The help text for the commands certs:add and certs:update give the following example:

Certificate Intermediary:
$ heroku certs:add intermediary.crt example.com.crt example.com.key

However, looking at:

https://github.com/heroku/cli/blob/67d33d6e4c7df64b8ac3017abfcf703df7359311/packages/certs-v5/lib/get_cert_and_key.js#L19

you can see that only two positional arguments are parsed, the first being crt and the second being key. The crt argument is being sent in the API request as certificate_chain:

https://github.com/heroku/cli/blob/67d33d6e4c7df64b8ac3017abfcf703df7359311/packages/certs-v5/commands/certs/add.js#L226

This suggests the user must create the certificate chain themselves by concatenating files, then pass the certificate chain to certs:add. The help text should probably say something like this instead:

Certificate Intermediary:
$ cat certificate.crt ca_bundle.crt > certificate_chain.crt
$ heroku certs:add certificate_chain.crt private.key

chasestubblefield avatar Dec 27 '21 22:12 chasestubblefield