diff options
| author | Jethro Beekman <[email protected]> | 2015-06-30 15:40:36 -0700 |
|---|---|---|
| committer | Jethro Beekman <[email protected]> | 2015-07-08 10:09:40 -0700 |
| commit | 1bcbe8f4bc3f06f3e4ac08d060b27c81e42ad68b (patch) | |
| tree | 74a263ffa9af0f27bf770421ae4225d7ee887725 | |
| parent | Add public add_name method to X509Generator (diff) | |
| download | rust-openssl-1bcbe8f4bc3f06f3e4ac08d060b27c81e42ad68b.tar.xz rust-openssl-1bcbe8f4bc3f06f3e4ac08d060b27c81e42ad68b.zip | |
Add X509generator.add_names method
| -rw-r--r-- | openssl/src/x509/mod.rs | 11 |
1 files changed, 11 insertions, 0 deletions
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<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 /// /// This function is deprecated, use `X509Generator.add_extension` instead. |