From 20247fb168693449c6a209804370bf406e36af54 Mon Sep 17 00:00:00 2001 From: Philippe Boneff Date: Mon, 19 Aug 2024 16:35:31 +0000 Subject: [PATCH] fix key encoding --- personalities/sctfe/storage.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/personalities/sctfe/storage.go b/personalities/sctfe/storage.go index 8cf60382e..12d342478 100644 --- a/personalities/sctfe/storage.go +++ b/personalities/sctfe/storage.go @@ -67,8 +67,7 @@ func (cts *CTStorage) AddIssuerChain(ctx context.Context, chain []*x509.Certific for _, c := range chain { errG.Go(func() error { id := sha256.Sum256(c.Raw) - key := make([]byte, 32) - _ = hex.Encode(key, id[:]) + key := []byte(hex.EncodeToString(id[:])) // We first try and see if this issuer cert has already been stored since reads // are cheaper than writes. // TODO(phboneff): monitor usage, eventually write directly depending on usage patterns