TLS: Return expiry time in UTC

This PS updates the certificate generation util to return the expiry
time in UTC.

Change-Id: Ic4e6dc6589d937cb8883f9cfcf4bf8b8c56a9628
Signed-off-by: Pete Birley <pete@port.direct>
This commit is contained in:
Pete Birley 2018-08-31 12:22:11 -05:00 committed by Pete Birley
parent 1ba789901f
commit abc9975dab

@ -39,7 +39,7 @@ return: |
<CA CRT>
crt: |
<CRT>
exp: 2018-09-01T10:56:07.895392915-05:00
exp: 2018-09-01T10:56:07.895392915-00:00
key: |
<CRT PRIVATE KEY>
*/}}
@ -63,7 +63,7 @@ return: |
{{- end }}
{{- $ca := buildCustomCert ($params.ca.crt | b64enc ) ($params.ca.key | b64enc ) }}
{{- $expDate := date_modify (printf "+%sh" (mul $params.life 24 |toString)) now }}
{{- $expDate := date_in_zone "2006-01-02T15:04:05Z07:00" ( date_modify (printf "+%sh" (mul $params.life 24 |toString)) now ) "UTC" }}
{{- $rawCert := genSignedCert (first $local.certHosts) ($local.certIps) (rest $local.certHosts) (int $params.life) $ca }}
{{- $certificate := dict "crt" $rawCert.Cert "key" $rawCert.Key "ca" $params.ca.crt "exp" $expDate "" }}
{{- $certificate | toYaml }}