diff --git a/der/src/asn1/any.rs b/der/src/asn1/any.rs index 3856191bd..72004b7ce 100644 --- a/der/src/asn1/any.rs +++ b/der/src/asn1/any.rs @@ -184,6 +184,11 @@ impl Any { Ok(Self { tag, value }) } + /// Allow access to value + pub fn value(&self) -> &[u8] { + self.value.as_slice() + } + /// Attempt to decode this [`Any`] type into the inner value. pub fn decode_as<'a, T>(&'a self) -> Result where diff --git a/x509-ocsp/src/lib.rs b/x509-ocsp/src/lib.rs index 8eb5a142e..cc60d4d81 100644 --- a/x509-ocsp/src/lib.rs +++ b/x509-ocsp/src/lib.rs @@ -16,7 +16,7 @@ extern crate alloc; use der::asn1::{BitStringRef, Ia5StringRef, ObjectIdentifier, OctetStringRef, UintRef}; use der::asn1::{GeneralizedTime, Null}; use der::{AnyRef, Choice, Enumerated, Sequence}; -use spki::AlgorithmIdentifierRef; +use spki::{AlgorithmIdentifierOwned, AlgorithmIdentifierRef}; use x509_cert::ext::pkix::name::GeneralName; use x509_cert::ext::pkix::{AuthorityInfoAccessSyntax, CrlReason}; use x509_cert::ext::Extensions; @@ -242,7 +242,7 @@ pub struct ResponseBytes<'a> { #[allow(missing_docs)] pub struct BasicOcspResponse<'a> { pub tbs_response_data: ResponseData<'a>, - pub signature_algorithm: AlgorithmIdentifierRef<'a>, + pub signature_algorithm: AlgorithmIdentifierOwned, pub signature: BitStringRef<'a>, #[asn1(context_specific = "0", optional = "true", tag_mode = "EXPLICIT")]