Skip to content
Merged
Show file tree
Hide file tree
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 der/src/asn1/boolean.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! ASN.1 `BOOLEAN` support.

use crate::{
asn1::Any, ByteSlice, DecodeValue, Decoder, EncodeValue, Encoder, Error, ErrorKind, FixedTag,
Length, OrdIsValueOrd, Result, Tag,
asn1::Any, ord::OrdIsValueOrd, ByteSlice, DecodeValue, Decoder, EncodeValue, Encoder, Error,
ErrorKind, FixedTag, Length, Result, Tag,
};

/// Byte used to encode `true` in ASN.1 DER. From X.690 Section 11.1:
Expand Down
4 changes: 2 additions & 2 deletions der/src/asn1/generalized_time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
use crate::{
asn1::Any,
datetime::{self, DateTime},
ByteSlice, DecodeValue, Decoder, EncodeValue, Encoder, Error, FixedTag, Length, OrdIsValueOrd,
Result, Tag,
ord::OrdIsValueOrd,
ByteSlice, DecodeValue, Decoder, EncodeValue, Encoder, Error, FixedTag, Length, Result, Tag,
};
use core::time::Duration;

Expand Down
4 changes: 2 additions & 2 deletions der/src/asn1/ia5_string.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! ASN.1 `IA5String` support.

use crate::{
asn1::Any, ByteSlice, DecodeValue, Decoder, EncodeValue, Encoder, Error, FixedTag, Length,
OrdIsValueOrd, Result, StrSlice, Tag,
asn1::Any, ord::OrdIsValueOrd, ByteSlice, DecodeValue, Decoder, EncodeValue, Encoder, Error,
FixedTag, Length, Result, StrSlice, Tag,
};
use core::{fmt, str};

Expand Down
4 changes: 2 additions & 2 deletions der/src/asn1/null.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! ASN.1 `NULL` support.

use crate::{
asn1::Any, ByteSlice, DecodeValue, Decoder, Encodable, EncodeValue, Encoder, Error, ErrorKind,
FixedTag, Length, OrdIsValueOrd, Result, Tag,
asn1::Any, ord::OrdIsValueOrd, ByteSlice, DecodeValue, Decoder, Encodable, EncodeValue,
Encoder, Error, ErrorKind, FixedTag, Length, Result, Tag,
};

/// ASN.1 `NULL` type.
Expand Down
4 changes: 2 additions & 2 deletions der/src/asn1/octet_string.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! ASN.1 `OCTET STRING` support.

use crate::{
asn1::Any, ByteSlice, DecodeValue, Decoder, EncodeValue, Encoder, Error, ErrorKind, FixedTag,
Length, OrdIsValueOrd, Result, Tag,
asn1::Any, ord::OrdIsValueOrd, ByteSlice, DecodeValue, Decoder, EncodeValue, Encoder, Error,
ErrorKind, FixedTag, Length, Result, Tag,
};

/// ASN.1 `OCTET STRING` type.
Expand Down
4 changes: 2 additions & 2 deletions der/src/asn1/oid.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! ASN.1 `OBJECT IDENTIFIER`

use crate::{
asn1::Any, ByteSlice, DecodeValue, Decoder, EncodeValue, Encoder, Error, FixedTag, Length,
OrdIsValueOrd, Result, Tag, Tagged,
asn1::Any, ord::OrdIsValueOrd, ByteSlice, DecodeValue, Decoder, EncodeValue, Encoder, Error,
FixedTag, Length, Result, Tag, Tagged,
};
use const_oid::ObjectIdentifier;

Expand Down
4 changes: 2 additions & 2 deletions der/src/asn1/printable_string.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! ASN.1 `PrintableString` support.

use crate::{
asn1::Any, ByteSlice, DecodeValue, Decoder, EncodeValue, Encoder, Error, FixedTag, Length,
OrdIsValueOrd, Result, StrSlice, Tag,
asn1::Any, ord::OrdIsValueOrd, ByteSlice, DecodeValue, Decoder, EncodeValue, Encoder, Error,
FixedTag, Length, Result, StrSlice, Tag,
};
use core::{fmt, str};

Expand Down
4 changes: 2 additions & 2 deletions der/src/asn1/utc_time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
use crate::{
asn1::Any,
datetime::{self, DateTime},
ByteSlice, DecodeValue, Decoder, EncodeValue, Encoder, Error, FixedTag, Length, OrdIsValueOrd,
Result, Tag,
ord::OrdIsValueOrd,
ByteSlice, DecodeValue, Decoder, EncodeValue, Encoder, Error, FixedTag, Length, Result, Tag,
};
use core::time::Duration;

Expand Down
4 changes: 2 additions & 2 deletions der/src/asn1/utf8_string.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! ASN.1 `UTF8String` support.

use crate::{
asn1::Any, ByteSlice, DecodeValue, Decoder, EncodeValue, Encoder, Error, FixedTag, Length,
OrdIsValueOrd, Result, StrSlice, Tag,
asn1::Any, ord::OrdIsValueOrd, ByteSlice, DecodeValue, Decoder, EncodeValue, Encoder, Error,
FixedTag, Length, Result, StrSlice, Tag,
};
use core::{fmt, str};

Expand Down
2 changes: 1 addition & 1 deletion der/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ pub use crate::{
error::{Error, ErrorKind, Result},
header::Header,
length::Length,
ord::{DerOrd, OrdIsValueOrd, ValueOrd},
ord::{DerOrd, ValueOrd},
tag::{Class, FixedTag, Tag, TagMode, TagNumber, Tagged},
value::{DecodeValue, EncodeValue},
};
Expand Down
6 changes: 2 additions & 4 deletions x509/src/attribute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use der::{
asn1::{Any, ObjectIdentifier},
OrdIsValueOrd, Sequence,
Sequence, ValueOrd,
};

/// Attribute type/value pairs as defined in [RFC 5280 Section 4.1.2.4].
Expand All @@ -18,13 +18,11 @@ use der::{
/// ```
///
/// [RFC 5280 Section 4.1.2.4]: https://tools.ietf.org/html/rfc5280#section-4.1.2.4
#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord, Sequence)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord, Sequence, ValueOrd)]
pub struct AttributeTypeAndValue<'a> {
/// OID describing the type of the attribute
pub oid: ObjectIdentifier,

/// Value of the attribute
pub value: Any<'a>,
}

impl OrdIsValueOrd for AttributeTypeAndValue<'_> {}