Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
6dced6d9
Commit
6dced6d9
authored
May 21, 2011
by
Robert Hencke
Committed by
Rob Pike
May 21, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypto/x509: fix incorrect prints found by govet
R=golang-dev, r CC=golang-dev
https://golang.org/cl/4526073
parent
f4fe688b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
x509_test.go
src/pkg/crypto/x509/x509_test.go
+3
-3
No files found.
src/pkg/crypto/x509/x509_test.go
View file @
6dced6d9
...
@@ -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
.
Fatal
f
(
"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
.
Fatal
f
(
"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
.
Fatal
f
(
"DSA Certificate verfication failed: %s"
,
err
)
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment