Commit d771f497 authored by Tim Pambor's avatar Tim Pambor
Browse files

Mark add_alias unsafe

parent ae60c2f6
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -843,14 +843,18 @@ impl X509Extension {
        }
    }

    #[corresponds(X509V3_EXT_add_alias)]
    pub fn add_alias(to: Nid, from: Nid) -> Result<(), ErrorStack> {
        unsafe {
    /// Adds an alias for an extension
    ///
    /// This corresponds to [`X509V3_EXT_add_alias`]
    ///
    /// # Safety
    ///
    /// This method modifies global state without locking and therefore is not thread safe
    pub unsafe fn add_alias(to: Nid, from: Nid) -> Result<(), ErrorStack> {
        ffi::init();
        cvt(ffi::X509V3_EXT_add_alias(to.as_raw(), from.as_raw())).map(|_| ())
    }
}
}

/// A builder used to construct an `X509Name`.
pub struct X509NameBuilder(X509Name);