File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
crates/bitwarden-crypto/src/signing Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -129,8 +129,7 @@ mod tests {
129
129
130
130
#[ test]
131
131
fn test_cose_roundtrip_encode_verifying ( ) {
132
- let verifying_key =
133
- VerifyingKey :: from_cose ( & CoseKeyBytes :: from ( VERIFYING_KEY . to_vec ( ) ) ) . unwrap ( ) ;
132
+ let verifying_key = VerifyingKey :: from_cose ( & CoseKeyBytes :: from ( VERIFYING_KEY ) ) . unwrap ( ) ;
134
133
let cose = verifying_key. to_cose ( ) ;
135
134
let parsed_key = VerifyingKey :: from_cose ( & cose) . unwrap ( ) ;
136
135
@@ -139,8 +138,7 @@ mod tests {
139
138
140
139
#[ test]
141
140
fn test_testvector ( ) {
142
- let verifying_key =
143
- VerifyingKey :: from_cose ( & CoseKeyBytes :: from ( VERIFYING_KEY . to_vec ( ) ) ) . unwrap ( ) ;
141
+ let verifying_key = VerifyingKey :: from_cose ( & CoseKeyBytes :: from ( VERIFYING_KEY ) ) . unwrap ( ) ;
144
142
assert_eq ! ( verifying_key. algorithm( ) , SignatureAlgorithm :: Ed25519 ) ;
145
143
146
144
verifying_key
@@ -150,8 +148,7 @@ mod tests {
150
148
151
149
#[ test]
152
150
fn test_invalid_testvector ( ) {
153
- let verifying_key =
154
- VerifyingKey :: from_cose ( & CoseKeyBytes :: from ( VERIFYING_KEY . to_vec ( ) ) ) . unwrap ( ) ;
151
+ let verifying_key = VerifyingKey :: from_cose ( & CoseKeyBytes :: from ( VERIFYING_KEY ) ) . unwrap ( ) ;
155
152
assert_eq ! ( verifying_key. algorithm( ) , SignatureAlgorithm :: Ed25519 ) ;
156
153
157
154
// This should fail, as the signed object is not valid for the given verifying key.
You can’t perform that action at this time.
0 commit comments