Add X509generator.add_names method

This commit is contained in:
Jethro Beekman 2015-06-30 15:40:36 -07:00
parent f2b0da1de7
commit 1bcbe8f4bc
1 changed files with 11 additions and 0 deletions

View File

@ -209,6 +209,17 @@ impl X509Generator {
self 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<I>(mut self, attrs: I) -> X509Generator
where I: IntoIterator<Item=(String,String)> {
self.names.extend(attrs);
self
}
/// (deprecated) Sets what for certificate could be used /// (deprecated) Sets what for certificate could be used
/// ///
/// This function is deprecated, use `X509Generator.add_extension` instead. /// This function is deprecated, use `X509Generator.add_extension` instead.