@@ -111,7 +111,7 @@ func TestFormatValidator_Validate(t *testing.T) {
111
111
t .Run ("invalid signature" , func (t * testing.T ) {
112
112
t .Run ("unsigned" , func (t * testing.T ) {
113
113
obj , _ := minUnsignedObject (t )
114
- require .EqualError (t , v .Validate (& obj , false ), "could not validate header fields: invalid signature" )
114
+ require .EqualError (t , v .Validate (& obj , false ), "could not validate signature: missing signature" )
115
115
})
116
116
t .Run ("unsupported scheme" , func (t * testing.T ) {
117
117
obj , signer := minUnsignedObject (t )
@@ -121,7 +121,7 @@ func TestFormatValidator_Validate(t *testing.T) {
121
121
sig := neofscrypto .NewSignature (3 , signer .Public (), sigBytes )
122
122
obj .SetSignature (& sig )
123
123
124
- require .EqualError (t , v .Validate (& obj , false ), "could not validate header fields : invalid signature" )
124
+ require .EqualError (t , v .Validate (& obj , false ), "could not validate signature : invalid signature" )
125
125
})
126
126
t .Run ("wrong scheme" , func (t * testing.T ) {
127
127
obj , signer := minUnsignedObject (t )
@@ -131,7 +131,7 @@ func TestFormatValidator_Validate(t *testing.T) {
131
131
sig := neofscrypto .NewSignature (neofscrypto .ECDSA_WALLETCONNECT , signer .Public (), sigBytes )
132
132
obj .SetSignature (& sig )
133
133
134
- require .EqualError (t , v .Validate (& obj , false ), "could not validate header fields : invalid signature" )
134
+ require .EqualError (t , v .Validate (& obj , false ), "could not validate signature : invalid signature" )
135
135
})
136
136
t .Run ("invalid public key" , func (t * testing.T ) {
137
137
obj , signer := minUnsignedObject (t )
@@ -160,7 +160,7 @@ func TestFormatValidator_Validate(t *testing.T) {
160
160
pub := slices .Clone (signer .PublicKeyBytes )
161
161
sig .SetPublicKeyBytes (tc .changePub (pub ))
162
162
obj .SetSignature (& sig )
163
- require .EqualError (t , v .Validate (& obj , false ), "could not validate header fields : invalid signature" )
163
+ require .EqualError (t , v .Validate (& obj , false ), "could not validate signature : invalid signature" )
164
164
})
165
165
}
166
166
})
@@ -182,7 +182,7 @@ func TestFormatValidator_Validate(t *testing.T) {
182
182
cp [i ]++
183
183
newSig := neofscrypto .NewSignatureFromRawKey (sig .Scheme (), sig .PublicKeyBytes (), cp )
184
184
tc .object .SetSignature (& newSig )
185
- require .EqualError (t , v .Validate (& tc .object , false ), "could not validate header fields : invalid signature" )
185
+ require .EqualError (t , v .Validate (& tc .object , false ), "could not validate signature : invalid signature" )
186
186
}
187
187
})
188
188
}
@@ -256,7 +256,7 @@ func TestFormatValidator_Validate(t *testing.T) {
256
256
require .NoError (t , obj .Sign (sessionSubj ))
257
257
258
258
err = v .Validate (obj , false )
259
- require .EqualError (t , err , "could not validate signature key : authenticate session token: issuer mismatches signature" )
259
+ require .EqualError (t , err , "could not validate signature: authenticate session token: issuer mismatches signature" )
260
260
})
261
261
})
262
262
0 commit comments