Struct openssl::x509::X509Generator [] [src]

pub struct X509Generator { /* fields omitted */ }
Deprecated since 0.9.7

: use X509Builder and X509ReqBuilder instead

Methods

impl X509Generator
[src]

[src]

Deprecated since 0.9.7

: use X509Builder and X509ReqBuilder instead

Creates a new generator with the following defaults:

validity period: 365 days

CN: "rust-openssl"

hash: SHA1

[src]

Deprecated since 0.9.7

: use X509Builder and X509ReqBuilder instead

Sets certificate validity period in days since today

[src]

Deprecated since 0.9.7

: use X509Builder and X509ReqBuilder instead

Add attribute to the name of the certificate

generator.add_name("CN".to_string(),"example.com".to_string());

[src]

Deprecated since 0.9.7

: use X509Builder and X509ReqBuilder instead

Add multiple attributes to the name of the certificate

generator.add_names(vec![("CN".to_string(),"example.com".to_string())]);

[src]

Deprecated since 0.9.7

: use X509Builder and X509ReqBuilder instead

Add an extension to a certificate

If the extension already exists, it will be replaced.

use openssl::x509::extension::Extension::*;
use openssl::x509::extension::KeyUsageOption::*;

generator.add_extension(KeyUsage(vec![DigitalSignature, KeyEncipherment]));

[src]

Deprecated since 0.9.7

: use X509Builder and X509ReqBuilder instead

Add multiple extensions to a certificate

If any of the extensions already exist, they will be replaced.

use openssl::x509::extension::Extension::*;
use openssl::x509::extension::KeyUsageOption::*;

generator.add_extensions(vec![KeyUsage(vec![DigitalSignature, KeyEncipherment])]);

[src]

Deprecated since 0.9.7

: use X509Builder and X509ReqBuilder instead

[src]

Deprecated since 0.9.7

: use X509Builder and X509ReqBuilder instead

Sets the certificate public-key, then self-sign and return it

[src]

Deprecated since 0.9.7

: use X509Builder and X509ReqBuilder instead

Obtain a certificate signing request (CSR)