[public] Clean up tests after 17e7460b
- Fix string names of functions used in tests that were spuriously
not changed in 17e7460b
Change-Id: Icc88d567181f0f5aa609b04716dd318a7fafbde8
diff --git a/src/public/ec/mod.rs b/src/public/ec/mod.rs
index 6a0117e..322cdaf 100644
--- a/src/public/ec/mod.rs
+++ b/src/public/ec/mod.rs
@@ -672,22 +672,22 @@
fn test_parse_invalid<C: PCurve>() {
should_fail(
EcPrivKey::<C>::parse_from_der(&[]),
- "parse_private_key_der",
+ "EcPrivKey::parse_from_der",
"elliptic curve routines:OPENSSL_internal:DECODE_ERROR",
);
should_fail(
EcPubKey::<C>::parse_from_der(&[]),
- "parse_public_key_der",
+ "EcPubKey::parse_from_der",
"public key routines:OPENSSL_internal:DECODE_ERROR",
);
should_fail(
EcPrivKeyAnyCurve::parse_from_der(&[]),
- "parse_private_key_der_any_curve",
+ "EcPrivKeyAnyCurve::parse_from_der",
"elliptic curve routines:OPENSSL_internal:DECODE_ERROR",
);
should_fail(
EcPubKeyAnyCurve::parse_from_der(&[]),
- "parse_public_key_der_any_curve",
+ "EcPubKeyAnyCurve::parse_from_der",
"public key routines:OPENSSL_internal:DECODE_ERROR",
);
}
@@ -703,13 +703,13 @@
let key_der = privkey.marshal_to_der();
should_fail(
EcPrivKey::<C2>::parse_from_der(&key_der),
- "parse_private_key_der",
+ "EcPrivKey::parse_from_der",
"elliptic curve routines:OPENSSL_internal:GROUP_MISMATCH",
);
let key_der = privkey.public().marshal_to_der();
should_fail(
EcPubKey::<C2>::parse_from_der(&key_der),
- "parse_public_key_der",
+ "EcPubKey::parse_from_der",
"unexpected curve:",
);
}
diff --git a/src/public/mod.rs b/src/public/mod.rs
index 5233bb0..171e9d4 100644
--- a/src/public/mod.rs
+++ b/src/public/mod.rs
@@ -25,7 +25,11 @@
/// corresponding to this public key. It is equivalent to
/// `signature.verify(self, message)`.
#[must_use]
- fn verify<S: Signature<PrivateKey = Self::Private>>(&self, message: &[u8], signature: &S) -> bool {
+ fn verify<S: Signature<PrivateKey = Self::Private>>(
+ &self,
+ message: &[u8],
+ signature: &S,
+ ) -> bool {
signature.verify(self, message)
}
}