Gandi / gandi.cli

⚠ ARCHIVED - Command line interface to Gandi.net products using the public API
http://cli.gandi.net/
GNU General Public License v3.0
347 stars 62 forks source link

Certificate export on a renew command #275

Closed charlyroot closed 5 years ago

charlyroot commented 5 years ago

Hi, When I'm ordering a ssl certificate, for a renewal, I make the order ($1 -> domain.tld): $ gandi certificate create --csr "$1.csr" --dcv-method "$DCV" -d 2 --type "std"

Once the DONE operation: $ gandi certificate export "$1" --intermediate

But I get the old certificate and not the new one.

when I make a info on this crt: $ gandi certificate info "$1"

cn           : $1
date_created : 2018-10-10 11:05:33
date_end     : 2020-11-30 00:59:59
plan         : Standard Wildcard
status       : valid
----------
cn           : $1
date_created : 2014-10-20 17:19:26
date_end     : 2018-11-30 00:59:59
plan         : Standard Wildcard
status       : valid

Is it possible to specify which one to download?

Gandi cli version: 1.3 OS: Debian 3.16

zaurky commented 5 years ago

Give --id to the info command to get the id of the certificate you want to export, and then call export with this id. That should work.

charlyroot commented 5 years ago

Yes it works thank you, and if not is it possible to make him take the most recent without having to find the id each time?