From 76ced2c3c53fd72fb8cb9ca6d38536273a7f3d8e Mon Sep 17 00:00:00 2001 From: MeexReay Date: Sun, 6 Apr 2025 20:09:46 +0300 Subject: [PATCH] some dumb funk --- .gitignore | 0 Cargo.toml | 2 +- src/flowgate/ssl_cert.rs | 6 +++--- 3 files changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 .gitignore diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/Cargo.toml b/Cargo.toml index 6b3df3c..a8d649e 100755 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ colog = "1.3.0" threadpool = "1.8.1" wildcard_ex = "0.1.2" websocket = "0.27.1" -serde_json = "1.0.136" +serde_json = "1.0.137" [features] default = ["use-openssl"] diff --git a/src/flowgate/ssl_cert.rs b/src/flowgate/ssl_cert.rs index 0cef70a..65a0f19 100755 --- a/src/flowgate/ssl_cert.rs +++ b/src/flowgate/ssl_cert.rs @@ -11,9 +11,9 @@ pub struct SslCert { fn generate_ctx(cert_file: &str, key_file: &str) -> Option { use openssl::ssl::{SslFiletype, SslMethod}; - let mut ctx = SslContext::builder(SslMethod::tls()).ok()?; - ctx.set_private_key_file(&key_file, SslFiletype::PEM).ok()?; - ctx.set_certificate_file(&cert_file, SslFiletype::PEM).ok()?; + let mut ctx = SslContext::builder(SslMethod::tls()).ok().unwrap(); + ctx.set_private_key_file(&key_file, SslFiletype::PEM).ok().unwrap(); + ctx.set_certificate_file(&cert_file, SslFiletype::PEM).ok().unwrap(); ctx.check_private_key().ok()?; Some(ctx.build()) }