From ad7947c5fa84d550fa39a1a09ab076f1a3977db2 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sat, 1 Aug 2020 21:55:08 +0000 Subject: [PATCH] serve cetacean.club --- site/src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/site/src/main.rs b/site/src/main.rs index 7e4d257..20d3041 100644 --- a/site/src/main.rs +++ b/site/src/main.rs @@ -8,7 +8,7 @@ use maj::{ }; use percent_encoding::percent_decode_str; use rustls::{ - internal::pemfile::{certs, rsa_private_keys}, + internal::pemfile::{certs, pkcs8_private_keys, rsa_private_keys}, AllowAnyAnonymousOrAuthenticatedClient, Certificate, PrivateKey, RootCertStore, ServerConfig, }; use std::{ @@ -57,15 +57,15 @@ fn load_certs(path: &Path) -> io::Result> { } fn load_keys(path: &Path) -> io::Result> { - rsa_private_keys(&mut BufReader::new(File::open(path)?)) + pkcs8_private_keys(&mut BufReader::new(File::open(path)?)) .map_err(|_| io::Error::new(io::ErrorKind::InvalidInput, "invalid key")) } fn main() -> Result<(), maj::server::Error> { env_logger::init(); let opts = Options::from_args(); - let certs = load_certs(&opts.cert)?; - let mut keys = load_keys(&opts.key)?; + let certs = load_certs(&opts.cert).unwrap(); + let mut keys = load_keys(&opts.key).unwrap(); log::info!( "serving gemini://{} on {}:{}",