@@ -5,11 +5,12 @@ use der::asn1::BitString;
55
66use crmf:: controls:: CertId ;
77use spki:: AlgorithmIdentifierOwned ;
8+ use x509_cert:: certificate:: { Profile , Rfc5280 } ;
89
910#[ cfg( feature = "digest" ) ]
1011use {
1112 der:: { DigestWriter , Encode , asn1:: Null , oid:: AssociatedOid } ,
12- x509_cert:: { Certificate , ext:: pkix:: name:: GeneralName } ,
13+ x509_cert:: { certificate :: CertificateInner , ext:: pkix:: name:: GeneralName } ,
1314} ;
1415
1516use crate :: header:: CmpCertificate ;
@@ -37,7 +38,7 @@ pub type OobCert = CmpCertificate;
3738/// [RFC 4210 Section 5.2.5]: https://www.rfc-editor.org/rfc/rfc4210#section-5.2.5
3839#[ derive( Clone , Debug , Eq , PartialEq , Sequence ) ]
3940#[ allow( missing_docs) ]
40- pub struct OobCertHash {
41+ pub struct OobCertHash < P : Profile = Rfc5280 > {
4142 #[ asn1(
4243 context_specific = "0" ,
4344 tag_mode = "EXPLICIT" ,
@@ -51,14 +52,17 @@ pub struct OobCertHash {
5152 constructed = "true" ,
5253 optional = "true"
5354 ) ]
54- pub cert_id : Option < CertId > ,
55+ pub cert_id : Option < CertId < P > > ,
5556 pub hash_val : BitString ,
5657}
5758
5859#[ cfg( feature = "digest" ) ]
59- impl OobCertHash {
60+ impl < P > OobCertHash < P >
61+ where
62+ P : Profile ,
63+ {
6064 /// Create an [`OobCertHash`] from a given certificate
61- pub fn from_certificate < D > ( cert : & Certificate ) -> der:: Result < Self >
65+ pub fn from_certificate < D > ( cert : & CertificateInner < P > ) -> der:: Result < Self >
6266 where
6367 D : digest:: Digest + AssociatedOid ,
6468 {
0 commit comments