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
This commit is contained in:
Mariano Cano 2023-05-04 18:30:09 -07:00
parent 2139121683
commit afd5d46a90
No known key found for this signature in database

View file

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