mirror of
https://github.com/golang/go
synced 2024-11-24 22:57:57 -07:00
crypto/x509: fix incorrect prints found by govet
R=golang-dev, r CC=golang-dev https://golang.org/cl/4526073
This commit is contained in:
parent
f4fe688b09
commit
6dced6d992
@ -313,7 +313,7 @@ func TestParseCertificateWithDSASignatureAlgorithm(t *testing.T) {
|
||||
pemBlock, _ := pem.Decode([]byte(dsaCertPem))
|
||||
cert, err := ParseCertificate(pemBlock.Bytes)
|
||||
if err != nil {
|
||||
t.Fatal("Failed to parse certificate: %s", err)
|
||||
t.Fatalf("Failed to parse certificate: %s", err)
|
||||
}
|
||||
if cert.SignatureAlgorithm != DSAWithSHA1 {
|
||||
t.Errorf("Parsed signature algorithm was not DSAWithSHA1")
|
||||
@ -324,10 +324,10 @@ func TestVerifyCertificateWithDSASignature(t *testing.T) {
|
||||
pemBlock, _ := pem.Decode([]byte(dsaCertPem))
|
||||
cert, err := ParseCertificate(pemBlock.Bytes)
|
||||
if err != nil {
|
||||
t.Fatal("Failed to parse certificate: %s", err)
|
||||
t.Fatalf("Failed to parse certificate: %s", err)
|
||||
}
|
||||
// test cert is self-signed
|
||||
if err = cert.CheckSignatureFrom(cert); err != nil {
|
||||
t.Fatal("DSA Certificate verfication failed: %s", err)
|
||||
t.Fatalf("DSA Certificate verfication failed: %s", err)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user