Skip to content

Commit ed566e4

Browse files
committed
x509-cert: impl Hash for Name
Fixes #1763
1 parent ba2f687 commit ed566e4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

x509-cert/src/attr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ pub type Attributes = SetOfVec<Attribute>;
8585
///
8686
/// [RFC 5280 Appendix A.1]: https://datatracker.ietf.org/doc/html/rfc5280#appendix-A.1
8787
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
88-
#[derive(Clone, Debug, Eq, PartialEq, PartialOrd, Ord, Sequence, ValueOrd)]
88+
#[derive(Clone, Debug, Eq, PartialEq, PartialOrd, Ord, Sequence, ValueOrd, Hash)]
8989
#[allow(missing_docs)]
9090
pub struct AttributeTypeAndValue {
9191
pub oid: AttributeType,

x509-cert/src/name.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ use der::{
5757
/// [RFC 4514 Section 3]: https://www.rfc-editor.org/rfc/rfc4514#section-3
5858
/// [RFC 5280 Section 4.1.2.4]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.4
5959
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
60-
#[derive(Clone, Debug, Default, PartialEq, Eq)]
60+
#[derive(Clone, Debug, Default, PartialEq, Eq, Hash)]
6161
pub struct Name(pub(crate) RdnSequence);
6262

6363
impl Name {
@@ -307,7 +307,7 @@ impl fmt::Display for Name {
307307
///
308308
/// [RFC 5280 Section 4.1.2.4]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.4
309309
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
310-
#[derive(Clone, Debug, Default, PartialEq, Eq)]
310+
#[derive(Clone, Debug, Default, PartialEq, Eq, Hash)]
311311
pub struct RdnSequence(Vec<RelativeDistinguishedName>);
312312

313313
impl RdnSequence {
@@ -437,7 +437,7 @@ pub type DistinguishedName = RdnSequence;
437437
///
438438
/// [RFC 5280 Section 4.1.2.4]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.4
439439
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
440-
#[derive(Clone, Debug, Default, PartialEq, Eq)]
440+
#[derive(Clone, Debug, Default, PartialEq, Eq, Hash)]
441441
pub struct RelativeDistinguishedName(pub(crate) SetOfVec<AttributeTypeAndValue>);
442442

443443
impl RelativeDistinguishedName {

0 commit comments

Comments
 (0)