Print key hash as hex in admin tool. (#8266)
The ProtoText printing of this structure prints the binary string as escaped utf8 text, which is essentially gibberish for my processes. --------- Co-authored-by: Aaron Gable <aaron@letsencrypt.org>
This commit is contained in:
parent
cd02caea99
commit
5ddd5acf99
|
|
@ -32,10 +32,6 @@ type dryRunSAC struct {
|
|||
}
|
||||
|
||||
func (d dryRunSAC) AddBlockedKey(_ context.Context, req *sapb.AddBlockedKeyRequest, _ ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
b, err := prototext.Marshal(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
d.log.Infof("dry-run: %#v", string(b))
|
||||
d.log.Infof("dry-run: Block SPKI hash %x by %s %s", req.KeyHash, req.Comment, req.Source)
|
||||
return &emptypb.Empty{}, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -178,6 +178,6 @@ func TestBlockSPKIHash(t *testing.T) {
|
|||
err = a.blockSPKIHash(context.Background(), keyHash[:], u, "")
|
||||
test.AssertNotError(t, err, "")
|
||||
test.AssertEquals(t, len(log.GetAllMatching("Found 0 unexpired certificates")), 1)
|
||||
test.AssertEquals(t, len(log.GetAllMatching("dry-run:")), 1)
|
||||
test.AssertEquals(t, len(log.GetAllMatching("dry-run: Block SPKI hash "+hex.EncodeToString(keyHash[:]))), 1)
|
||||
test.AssertEquals(t, len(msa.blockRequests), 0)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue