parent
a318e88712
commit
7de1499c65
|
|
@ -616,7 +616,7 @@ impl X509 {
|
||||||
|
|
||||||
impl Clone for X509 {
|
impl Clone for X509 {
|
||||||
fn clone(&self) -> X509 {
|
fn clone(&self) -> X509 {
|
||||||
self.to_owned()
|
X509Ref::to_owned(self)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -398,3 +398,10 @@ fn signature() {
|
||||||
assert_eq!(algorithm.object().nid(), nid::SHA256WITHRSAENCRYPTION);
|
assert_eq!(algorithm.object().nid(), nid::SHA256WITHRSAENCRYPTION);
|
||||||
assert_eq!(algorithm.object().to_string(), "sha256WithRSAEncryption");
|
assert_eq!(algorithm.object().to_string(), "sha256WithRSAEncryption");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn clone_x509() {
|
||||||
|
let cert = include_bytes!("../../test/cert.pem");
|
||||||
|
let cert = X509::from_pem(cert).unwrap();
|
||||||
|
cert.clone();
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue