diff --git a/openssl/src/x509/mod.rs b/openssl/src/x509/mod.rs index 7782958f91461bb1ccc4c6417dfd5d892dbee521..02b89549a362a2b147b9d1d8503f690c86ff66ef 100644 --- a/openssl/src/x509/mod.rs +++ b/openssl/src/x509/mod.rs @@ -843,12 +843,16 @@ impl X509Extension { } } - #[corresponds(X509V3_EXT_add_alias)] - pub fn add_alias(to: Nid, from: Nid) -> Result<(), ErrorStack> { - unsafe { - ffi::init(); - cvt(ffi::X509V3_EXT_add_alias(to.as_raw(), from.as_raw())).map(|_| ()) - } + /// 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(|_| ()) } }