Commit 7de1499c authored by Steven Fackler's avatar Steven Fackler
Browse files

Fix X509::clone impl

Closes #667
parent a318e887
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -616,7 +616,7 @@ impl X509 {

impl Clone for X509 {
    fn clone(&self) -> X509 {
        self.to_owned()
        X509Ref::to_owned(self)
    }
}

+7 −0
Original line number Diff line number Diff line
@@ -398,3 +398,10 @@ fn signature() {
    assert_eq!(algorithm.object().nid(), nid::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();
}