Struct reqwest::Certificate
[−]
[src]
pub struct Certificate(_);
Represent an X509 certificate.
Methods
impl Certificate
[src]
pub fn from_der(der: &[u8]) -> Result<Certificate>
[src]
Create a Certificate
from a binary DER encoded certificate
Examples
let mut buf = Vec::new(); File::open("my_cert.der")? .read_to_end(&mut buf)?; let cert = reqwest::Certificate::from_der(&buf)?;
Errors
If the provided buffer is not valid DER, an error will be returned.