Return a Stack in Pkcs12
This commit is contained in:
parent
ed69d6b037
commit
8037258913
|
|
@ -49,7 +49,7 @@ impl Pkcs12 {
|
|||
|
||||
let pkey = PKey::from_ptr(pkey);
|
||||
let cert = X509::from_ptr(cert);
|
||||
let chain = Stack::from_ptr(chain).into_iter().collect();
|
||||
let chain = Stack::from_ptr(chain);
|
||||
|
||||
Ok(ParsedPkcs12 {
|
||||
pkey: pkey,
|
||||
|
|
@ -63,7 +63,7 @@ impl Pkcs12 {
|
|||
pub struct ParsedPkcs12 {
|
||||
pub pkey: PKey,
|
||||
pub cert: X509,
|
||||
pub chain: Vec<X509>,
|
||||
pub chain: Stack<X509>,
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
|
|||
|
|
@ -480,6 +480,12 @@ impl AsRef<X509Ref> for X509 {
|
|||
}
|
||||
}
|
||||
|
||||
impl AsRef<X509Ref> for X509Ref {
|
||||
fn as_ref(&self) -> &X509Ref {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl Borrow<X509Ref> for X509 {
|
||||
fn borrow(&self) -> &X509Ref {
|
||||
&*self
|
||||
|
|
|
|||
Loading…
Reference in New Issue