Update 'x509-parser' to 0.13.

This commit is contained in:
Sergio Benitez 2022-02-22 13:01:05 -08:00
parent 2f59515752
commit 502b11c177
2 changed files with 6 additions and 9 deletions

View File

@ -43,7 +43,7 @@ cookie = { version = "0.16.0", features = ["percent-encode", "secure"] }
state = "0.5.1" state = "0.5.1"
[dependencies.x509-parser] [dependencies.x509-parser]
version = "0.12" version = "0.13"
optional = true optional = true
[dependencies.hyper] [dependencies.hyper]

View File

@ -1,7 +1,7 @@
pub mod oid { pub mod oid {
//! Lower-level OID types re-exported from //! Lower-level OID types re-exported from
//! [`oid_registry`](https://docs.rs/oid-registry/0.1) and //! [`oid_registry`](https://docs.rs/oid-registry/0.4) and
//! [`der-parser`](https://docs.rs/der-parser/5). //! [`der-parser`](https://docs.rs/der-parser/7).
pub use x509_parser::oid_registry::*; pub use x509_parser::oid_registry::*;
pub use x509_parser::der_parser::oid::*; pub use x509_parser::der_parser::oid::*;
@ -16,7 +16,7 @@ pub mod bigint {
pub mod x509 { pub mod x509 {
//! Lower-level X.509 types re-exported from //! Lower-level X.509 types re-exported from
//! [`x509_parser`](https://docs.rs/x509-parser/0.9). //! [`x509_parser`](https://docs.rs/x509-parser/0.13).
//! //!
//! Lack of documentation is directly inherited from the source crate. //! Lack of documentation is directly inherited from the source crate.
//! Prefer to use Rocket's wrappers when possible. //! Prefer to use Rocket's wrappers when possible.
@ -75,11 +75,8 @@ pub enum Error {
NoSubject, NoSubject,
/// There is no subject and the subjectAlt is not marked as critical. /// There is no subject and the subjectAlt is not marked as critical.
NonCriticalSubjectAlt, NonCriticalSubjectAlt,
// FIXME: Waiting on https://github.com/rusticata/x509-parser/pull/92.
// Parse(X509Error),
/// An error occurred while parsing the certificate. /// An error occurred while parsing the certificate.
#[doc(hidden)] Parse(X509Error),
Parse(String),
/// The certificate parsed partially but is incomplete. /// The certificate parsed partially but is incomplete.
/// ///
/// If `Some(n)`, then `n` more bytes were expected. Otherwise, the number /// If `Some(n)`, then `n` more bytes were expected. Otherwise, the number
@ -523,7 +520,7 @@ impl From<nom::Err<X509Error>> for Error {
match e { match e {
nom::Err::Incomplete(nom::Needed::Unknown) => Error::Incomplete(None), nom::Err::Incomplete(nom::Needed::Unknown) => Error::Incomplete(None),
nom::Err::Incomplete(nom::Needed::Size(n)) => Error::Incomplete(Some(n)), nom::Err::Incomplete(nom::Needed::Size(n)) => Error::Incomplete(Some(n)),
nom::Err::Error(e) | nom::Err::Failure(e) => Error::Parse(e.to_string()), nom::Err::Error(e) | nom::Err::Failure(e) => Error::Parse(e),
} }
} }
} }