From 34f5c857b6d97f96b78543a5df4fb974848df91a Mon Sep 17 00:00:00 2001 From: Andrew Ayer <andrew@sslmate.com> Date: Sun, 15 Jan 2023 17:01:03 -0500 Subject: [PATCH] Deprecate $FINGERPRINT and $PUBKEY_HASH -script variables Replaced by $CERT_SHA256 and $PUBKEY_SHA256 --- helpers.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/helpers.go b/helpers.go index 9f1586b..cc574e1 100644 --- a/helpers.go +++ b/helpers.go @@ -197,7 +197,8 @@ func (info *CertInfo) PubkeyHashBytes() []byte { func (info *CertInfo) Environ() []string { env := make([]string, 0, 10) - env = append(env, "PUBKEY_HASH="+info.PubkeyHash()) + env = append(env, "PUBKEY_HASH="+info.PubkeyHash()) // deprecated, not documented + env = append(env, "PUBKEY_SHA256="+info.PubkeyHash()) if info.SerialNumberParseError != nil { env = append(env, "SERIAL_PARSE_ERROR="+info.SerialNumberParseError.Error()) @@ -282,7 +283,8 @@ func yesnoString(value bool) string { func (info *EntryInfo) Environ() []string { env := []string{ - "FINGERPRINT=" + info.Fingerprint(), + "FINGERPRINT=" + info.Fingerprint(), // deprecated, not documented + "CERT_SHA256=" + info.Fingerprint(), "CERT_PARSEABLE=" + yesnoString(info.ParseError == nil), "LOG_URI=" + info.LogUri, "ENTRY_INDEX=" + strconv.FormatInt(info.Entry.Index, 10),