Deprecate $FINGERPRINT and $PUBKEY_HASH -script variables

Replaced by $CERT_SHA256 and $PUBKEY_SHA256
This commit is contained in:
Andrew Ayer 2023-01-15 17:01:03 -05:00
parent fff3b01b26
commit 34f5c857b6
1 changed files with 4 additions and 2 deletions

View File

@ -197,7 +197,8 @@ func (info *CertInfo) PubkeyHashBytes() []byte {
func (info *CertInfo) Environ() []string { func (info *CertInfo) Environ() []string {
env := make([]string, 0, 10) 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 { if info.SerialNumberParseError != nil {
env = append(env, "SERIAL_PARSE_ERROR="+info.SerialNumberParseError.Error()) env = append(env, "SERIAL_PARSE_ERROR="+info.SerialNumberParseError.Error())
@ -282,7 +283,8 @@ func yesnoString(value bool) string {
func (info *EntryInfo) Environ() []string { func (info *EntryInfo) Environ() []string {
env := []string{ env := []string{
"FINGERPRINT=" + info.Fingerprint(), "FINGERPRINT=" + info.Fingerprint(), // deprecated, not documented
"CERT_SHA256=" + info.Fingerprint(),
"CERT_PARSEABLE=" + yesnoString(info.ParseError == nil), "CERT_PARSEABLE=" + yesnoString(info.ParseError == nil),
"LOG_URI=" + info.LogUri, "LOG_URI=" + info.LogUri,
"ENTRY_INDEX=" + strconv.FormatInt(info.Entry.Index, 10), "ENTRY_INDEX=" + strconv.FormatInt(info.Entry.Index, 10),