diff --git a/openssl/src/x509/mod.rs b/openssl/src/x509/mod.rs index f624d7ab..717afa65 100644 --- a/openssl/src/x509/mod.rs +++ b/openssl/src/x509/mod.rs @@ -209,6 +209,17 @@ impl X509Generator { self } + /// Add multiple attributes to the name of the certificate + /// + /// ```ignore + /// generator.add_names(vec![("CN".to_string(),"example.com".to_string())]); + /// ``` + pub fn add_names(mut self, attrs: I) -> X509Generator + where I: IntoIterator { + self.names.extend(attrs); + self + } + /// (deprecated) Sets what for certificate could be used /// /// This function is deprecated, use `X509Generator.add_extension` instead.