@@ -62,7 +62,7 @@ func TestSignatureSelection(t *testing.T) {
62
62
t .Errorf ("test[%d]: unexpected selectSignatureScheme error: %v" , testNo , err )
63
63
}
64
64
if test .expectedSigAlg != sigAlg {
65
- t .Errorf ("test[%d]: expected signature scheme %#x , got %#x " , testNo , test .expectedSigAlg , sigAlg )
65
+ t .Errorf ("test[%d]: expected signature scheme %v , got %v " , testNo , test .expectedSigAlg , sigAlg )
66
66
}
67
67
sigType , hashFunc , err := typeAndHashFromSignatureScheme (sigAlg )
68
68
if err != nil {
@@ -115,7 +115,7 @@ func TestSignatureSelection(t *testing.T) {
115
115
for testNo , test := range badTests {
116
116
sigAlg , err := selectSignatureScheme (test .tlsVersion , test .cert , test .peerSigAlgs )
117
117
if err == nil {
118
- t .Errorf ("test[%d]: unexpected success, got %#x " , testNo , sigAlg )
118
+ t .Errorf ("test[%d]: unexpected success, got %v " , testNo , sigAlg )
119
119
}
120
120
}
121
121
}
@@ -129,7 +129,7 @@ func TestLegacyTypeAndHash(t *testing.T) {
129
129
t .Errorf ("RSA: expected signature type %#x, got %#x" , expectedSigType , sigType )
130
130
}
131
131
if expectedHashFunc := crypto .MD5SHA1 ; expectedHashFunc != hashFunc {
132
- t .Errorf ("RSA: expected hash %#x, got %#x" , expectedHashFunc , sigType )
132
+ t .Errorf ("RSA: expected hash %#x, got %#x" , expectedHashFunc , hashFunc )
133
133
}
134
134
135
135
sigType , hashFunc , err = legacyTypeAndHashFromPublicKey (testECDSAPrivateKey .Public ())
@@ -140,7 +140,7 @@ func TestLegacyTypeAndHash(t *testing.T) {
140
140
t .Errorf ("ECDSA: expected signature type %#x, got %#x" , expectedSigType , sigType )
141
141
}
142
142
if expectedHashFunc := crypto .SHA1 ; expectedHashFunc != hashFunc {
143
- t .Errorf ("ECDSA: expected hash %#x, got %#x" , expectedHashFunc , sigType )
143
+ t .Errorf ("ECDSA: expected hash %#x, got %#x" , expectedHashFunc , hashFunc )
144
144
}
145
145
146
146
// Ed25519 is not supported by TLS 1.0 and 1.1.
@@ -156,13 +156,13 @@ func TestSupportedSignatureAlgorithms(t *testing.T) {
156
156
for _ , sigAlg := range supportedSignatureAlgorithms {
157
157
sigType , hash , err := typeAndHashFromSignatureScheme (sigAlg )
158
158
if err != nil {
159
- t .Errorf ("%#04x : unexpected error: %v" , sigAlg , err )
159
+ t .Errorf ("%v : unexpected error: %v" , sigAlg , err )
160
160
}
161
161
if sigType == 0 {
162
- t .Errorf ("%#04x : missing signature type" , sigAlg )
162
+ t .Errorf ("%v : missing signature type" , sigAlg )
163
163
}
164
164
if hash == 0 && sigAlg != Ed25519 {
165
- t .Errorf ("%#04x : missing hash" , sigAlg )
165
+ t .Errorf ("%v : missing hash" , sigAlg )
166
166
}
167
167
}
168
168
}
0 commit comments