Use vaultcas ttl as a duration string

According to docs at thttps://developer.hashicorp.com/vault/api-docs/secret/pki#ttl
the ttl can be sent as a time.Duration string.

Fixes #1375
pull/1376/head
Mariano Cano 1 year ago
parent 2139121683
commit afd5d46a90
No known key found for this signature in database

@ -215,7 +215,7 @@ func (v *VaultCAS) createCertificate(cr *x509.CertificateRequest, lifetime time.
Bytes: cr.Raw,
})),
"format": "pem_bundle",
"ttl": lifetime.Seconds(),
"ttl": lifetime.String(),
}
secret, err := v.client.Logical().Write(v.config.PKIMountPath+"/sign/"+vaultPKIRole, vaultReq)

Loading…
Cancel
Save