Commit
Author: Mauro D [mauro@stalw.art]
Hash: 647eb9c7cdd6f0afaf1235b1bd4aa621ba7aa3dc
Timestamp: Fri, 09 Dec 2022 17:59:21 +0000 (1 year ago)

+2 -2 +/-2 browse
Renamed VerifyingKeyType::new to VerifyingKeyType::verifying_key
1diff --git a/src/common/crypto.rs b/src/common/crypto.rs
2index e2c024a..aa50931 100644
3--- a/src/common/crypto.rs
4+++ b/src/common/crypto.rs
5 @@ -127,7 +127,7 @@ pub(crate) enum VerifyingKeyType {
6 }
7
8 impl VerifyingKeyType {
9- pub(crate) fn new(&self, bytes: &[u8]) -> Result<Box<dyn VerifyingKey>> {
10+ pub(crate) fn verifying_key(&self, bytes: &[u8]) -> Result<Box<dyn VerifyingKey>> {
11 Ok(match self {
12 Self::Rsa => {
13 let inner =
14 diff --git a/src/dkim/parse.rs b/src/dkim/parse.rs
15index 237c278..33ccfe7 100644
16--- a/src/dkim/parse.rs
17+++ b/src/dkim/parse.rs
18 @@ -296,7 +296,7 @@ impl TxtRecordParser for DomainKey {
19
20 match public_key {
21 Some(public_key) => Ok(DomainKey {
22- p: key_type.new(&public_key)?,
23+ p: key_type.verifying_key(&public_key)?,
24 f: flags,
25 }),
26 _ => Err(Error::InvalidRecordType),