chore: make clippy happy
This commit is contained in:
@@ -126,10 +126,10 @@ impl Command for CommandImpl {
|
||||
success!("Parse authorization success, counter: {}", authorization.counter);
|
||||
|
||||
// PKey::public_key_from_der()
|
||||
let ec_group = EcGroup::from_curve_name(Nid::X9_62_PRIME256V1).unwrap();
|
||||
let ec_point = EcPoint::from_bytes(&ec_group, &public_key, &mut BigNumContext::new().unwrap()).unwrap();
|
||||
let ec_key = EcKey::from_public_key(&ec_group, &ec_point).unwrap();
|
||||
let ec_pkey = PKey::from_ec_key(ec_key).unwrap();
|
||||
let ec_group = opt_result!(EcGroup::from_curve_name(Nid::X9_62_PRIME256V1), "New secp256r1 EC group failed: {}");
|
||||
let ec_point = opt_result!(EcPoint::from_bytes(&ec_group, &public_key, &mut BigNumContext::new().unwrap()), "Parse from secp256r1 point failed: {}");
|
||||
let ec_key = opt_result!(EcKey::from_public_key(&ec_group, &ec_point), "Parse secp256r1 public key failed: {}");
|
||||
let ec_pkey = opt_result!(PKey::from_ec_key(ec_key), "EC secp256r1 key to PKey failed: {}");
|
||||
let mut verifier = opt_result!(Verifier::new(MessageDigest::sha256(), &ec_pkey), "Verifier new failed: {}");
|
||||
verifier.update(&signed_message)?;
|
||||
let verify_result = opt_result!(verifier.verify(signature), "Verifier verify failed: {}");
|
||||
|
||||
Reference in New Issue
Block a user