@@ -5,12 +5,13 @@ use der::asn1::BitString;
5
5
6
6
use crmf:: controls:: CertId ;
7
7
use spki:: AlgorithmIdentifierOwned ;
8
+ use x509_cert:: certificate:: { Profile , Rfc5280 } ;
8
9
9
10
#[ cfg( feature = "digest" ) ]
10
11
use {
11
12
der:: { Encode , asn1:: Null , oid:: AssociatedOid } ,
12
13
spki:: DigestWriter ,
13
- x509_cert:: { Certificate , ext:: pkix:: name:: GeneralName } ,
14
+ x509_cert:: { certificate :: CertificateInner , ext:: pkix:: name:: GeneralName } ,
14
15
} ;
15
16
16
17
use crate :: header:: CmpCertificate ;
@@ -38,7 +39,7 @@ pub type OobCert = CmpCertificate;
38
39
/// [RFC 4210 Section 5.2.5]: https://www.rfc-editor.org/rfc/rfc4210#section-5.2.5
39
40
#[ derive( Clone , Debug , Eq , PartialEq , Sequence ) ]
40
41
#[ allow( missing_docs) ]
41
- pub struct OobCertHash {
42
+ pub struct OobCertHash < P : Profile = Rfc5280 > {
42
43
#[ asn1(
43
44
context_specific = "0" ,
44
45
tag_mode = "EXPLICIT" ,
@@ -52,14 +53,17 @@ pub struct OobCertHash {
52
53
constructed = "true" ,
53
54
optional = "true"
54
55
) ]
55
- pub cert_id : Option < CertId > ,
56
+ pub cert_id : Option < CertId < P > > ,
56
57
pub hash_val : BitString ,
57
58
}
58
59
59
60
#[ cfg( feature = "digest" ) ]
60
- impl OobCertHash {
61
+ impl < P > OobCertHash < P >
62
+ where
63
+ P : Profile ,
64
+ {
61
65
/// Create an [`OobCertHash`] from a given certificate
62
- pub fn from_certificate < D > ( cert : & Certificate ) -> der:: Result < Self >
66
+ pub fn from_certificate < D > ( cert : & CertificateInner < P > ) -> der:: Result < Self >
63
67
where
64
68
D : digest:: Digest + AssociatedOid ,
65
69
{
0 commit comments