Commit 6dced6d9 authored by Robert Hencke's avatar Robert Hencke Committed by Rob Pike

crypto/x509: fix incorrect prints found by govet

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4526073
parent f4fe688b
...@@ -313,7 +313,7 @@ func TestParseCertificateWithDSASignatureAlgorithm(t *testing.T) { ...@@ -313,7 +313,7 @@ func TestParseCertificateWithDSASignatureAlgorithm(t *testing.T) {
pemBlock, _ := pem.Decode([]byte(dsaCertPem)) pemBlock, _ := pem.Decode([]byte(dsaCertPem))
cert, err := ParseCertificate(pemBlock.Bytes) cert, err := ParseCertificate(pemBlock.Bytes)
if err != nil { if err != nil {
t.Fatal("Failed to parse certificate: %s", err) t.Fatalf("Failed to parse certificate: %s", err)
} }
if cert.SignatureAlgorithm != DSAWithSHA1 { if cert.SignatureAlgorithm != DSAWithSHA1 {
t.Errorf("Parsed signature algorithm was not DSAWithSHA1") t.Errorf("Parsed signature algorithm was not DSAWithSHA1")
...@@ -324,10 +324,10 @@ func TestVerifyCertificateWithDSASignature(t *testing.T) { ...@@ -324,10 +324,10 @@ func TestVerifyCertificateWithDSASignature(t *testing.T) {
pemBlock, _ := pem.Decode([]byte(dsaCertPem)) pemBlock, _ := pem.Decode([]byte(dsaCertPem))
cert, err := ParseCertificate(pemBlock.Bytes) cert, err := ParseCertificate(pemBlock.Bytes)
if err != nil { if err != nil {
t.Fatal("Failed to parse certificate: %s", err) t.Fatalf("Failed to parse certificate: %s", err)
} }
// test cert is self-signed // test cert is self-signed
if err = cert.CheckSignatureFrom(cert); err != nil { if err = cert.CheckSignatureFrom(cert); err != nil {
t.Fatal("DSA Certificate verfication failed: %s", err) t.Fatalf("DSA Certificate verfication failed: %s", err)
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment