mirror of
https://github.com/ankitects/anki.git
synced 2026-01-05 18:13:56 -05:00
Fix rustls_pki_types usage
This commit is contained in:
parent
80d5062bcb
commit
0c6ee1a6ac
1 changed files with 3 additions and 4 deletions
|
|
@ -140,10 +140,9 @@ impl Backend {
|
|||
|
||||
#[cfg(feature = "rustls")]
|
||||
fn set_custom_certificate_inner(&self, cert_str: String) -> Result<()> {
|
||||
use std::io::Cursor;
|
||||
use std::io::Read;
|
||||
|
||||
use reqwest::Certificate;
|
||||
use rustls_pki_types::pem::PemObject;
|
||||
use rustls_pki_types::PrivateKeyDer;
|
||||
|
||||
let mut web_client = self.web_client.lock().unwrap();
|
||||
|
||||
|
|
@ -152,7 +151,7 @@ impl Backend {
|
|||
return Ok(());
|
||||
}
|
||||
|
||||
if rustls_pki_types::pem::PemObject::from_pem_slice(cert_str.as_bytes()).is_err() {
|
||||
if PrivateKeyDer::from_pem_slice(cert_str.as_bytes()).is_err() {
|
||||
return Err(AnkiError::InvalidCertificateFormat);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue