Struct reqwest::Identity [−][src]
pub struct Identity { /* fields omitted */ }Expand description
Represents a private key and X509 cert as a client certificate.
Implementations
impl Identity[src]
impl Identity[src]pub fn from_pem(buf: &[u8]) -> Result<Identity>[src]
pub fn from_pem(buf: &[u8]) -> Result<Identity>[src]Parses PEM encoded private key and certificate.
The input should contain a PEM encoded private key and at least one PEM encoded certificate.
Examples
let mut buf = Vec::new(); File::open("my-ident.pem")? .read_to_end(&mut buf)?; let id = reqwest::Identity::from_pem(&buf)?;
Optional
This requires the rustls-tls Cargo feature enabled.