Loading openssl/src/x509/mod.rs +5 −3 Original line number Diff line number Diff line Loading @@ -201,8 +201,9 @@ impl X509Generator { /// Add attribute to the name of the certificate /// /// ```ignore /// generator.add_name("CN".to_string(),"example.com".to_string()) /// ``` /// # let generator = openssl::x509::X509Generator::new(); /// generator.add_name("CN".to_string(),"example.com".to_string()); /// ``` pub fn add_name(mut self, attr_type: String, attr_value: String) -> X509Generator { self.names.push((attr_type,attr_value)); Loading @@ -211,7 +212,8 @@ impl X509Generator { /// Add multiple attributes to the name of the certificate /// /// ```ignore /// ``` /// # let generator = openssl::x509::X509Generator::new(); /// generator.add_names(vec![("CN".to_string(),"example.com".to_string())]); /// ``` pub fn add_names<I>(mut self, attrs: I) -> X509Generator Loading openssl/src/x509/tests.rs +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ fn test_cert_gen() { let gen = X509Generator::new() .set_bitlength(2048) .set_valid_period(365*2) .set_CN("test_me") .add_name("CN".to_string(),"test_me".to_string()) .set_sign_hash(SHA256) .add_extension(KeyUsage(vec![DigitalSignature, KeyEncipherment])) .add_extension(ExtKeyUsage(vec![ClientAuth, ServerAuth, ExtKeyUsageOption::Other("2.999.1".to_owned())])) Loading Loading
openssl/src/x509/mod.rs +5 −3 Original line number Diff line number Diff line Loading @@ -201,8 +201,9 @@ impl X509Generator { /// Add attribute to the name of the certificate /// /// ```ignore /// generator.add_name("CN".to_string(),"example.com".to_string()) /// ``` /// # let generator = openssl::x509::X509Generator::new(); /// generator.add_name("CN".to_string(),"example.com".to_string()); /// ``` pub fn add_name(mut self, attr_type: String, attr_value: String) -> X509Generator { self.names.push((attr_type,attr_value)); Loading @@ -211,7 +212,8 @@ impl X509Generator { /// Add multiple attributes to the name of the certificate /// /// ```ignore /// ``` /// # let generator = openssl::x509::X509Generator::new(); /// generator.add_names(vec![("CN".to_string(),"example.com".to_string())]); /// ``` pub fn add_names<I>(mut self, attrs: I) -> X509Generator Loading
openssl/src/x509/tests.rs +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ fn test_cert_gen() { let gen = X509Generator::new() .set_bitlength(2048) .set_valid_period(365*2) .set_CN("test_me") .add_name("CN".to_string(),"test_me".to_string()) .set_sign_hash(SHA256) .add_extension(KeyUsage(vec![DigitalSignature, KeyEncipherment])) .add_extension(ExtKeyUsage(vec![ClientAuth, ServerAuth, ExtKeyUsageOption::Other("2.999.1".to_owned())])) Loading