Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions spki/src/algorithm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl<Params> AlgorithmIdentifier<Params> {
if self.oid == expected_oid {
Ok(expected_oid)
} else {
Err(Error::OidUnknown { oid: expected_oid })
Err(Error::OidUnknown { oid: self.oid })
}
}
}
Expand All @@ -122,7 +122,7 @@ impl<'a> AlgorithmIdentifierRef<'a> {
if actual_oid == expected_oid {
Ok(actual_oid)
} else {
Err(Error::OidUnknown { oid: expected_oid })
Err(Error::OidUnknown { oid: actual_oid })
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These could probably use tests.

Perhaps the it should also carry the expected OID if available.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding the expected should be cheap.

}
}

Expand Down