aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-03-30 16:09:52 -0700
committerFuwn <[email protected]>2022-03-30 16:09:52 -0700
commit429df3ab0481307e7cdac50bbd0afa6a1ff3fa77 (patch)
tree009848386ee4671ce0572dd3e8495682e305b8cc
parentfix: reverts (diff)
downloadlocus-429df3ab0481307e7cdac50bbd0afa6a1ff3fa77.tar.xz
locus-429df3ab0481307e7cdac50bbd0afa6a1ff3fa77.zip
fix: new certificate loading method
-rw-r--r--Cargo.toml2
-rw-r--r--Makefile.toml32
-rw-r--r--src/main.rs2
3 files changed, 14 insertions, 22 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 8393d1f..3bb2ec8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -22,7 +22,7 @@ codegen-units = 1
[dependencies]
# Gemini
-windmark = { version = "0.1.4", features = ["logger"] }
+windmark = { version = "0.1.5", features = ["logger"] }
# Loggging
log = "0.4.16"
diff --git a/Makefile.toml b/Makefile.toml
index 80be522..83ab6d3 100644
--- a/Makefile.toml
+++ b/Makefile.toml
@@ -29,31 +29,23 @@ dependencies = ["fmt", "check", "clippy"]
command = "openssl"
args = [
"req",
- "-newkey",
- "rsa:2048",
"-new",
- "-nodes",
- "-keyout",
- "locus_private.pem",
- "-out",
- "locus_public.pem",
"-subj",
- "/CN=fuwn.me"
-]
-
-[tasks.fixkey]
-command = "openssl"
-args = [
- "x509",
- "-req",
+ "/CN=fuwn.me",
+ "-x509",
+ "-newkey",
+ "ec",
+ "-pkeyopt",
+ "ec_paramgen_curve:prime256v1",
"-days",
"365",
- "-in",
- "locus_public.pem",
- "-signkey",
- "locus_private.pem",
+ "-nodes",
"-out",
- "locus_pair.pem"
+ ".locus/windmark_public.pem",
+ "-keyout",
+ ".locus/windmark_private.pem",
+ "-inform",
+ "pem",
]
[tasks.run]
diff --git a/src/main.rs b/src/main.rs
index 3733c30..40dc8bb 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -85,7 +85,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let uptime = Instant::now();
router.set_private_key_file(".locus/locus_private.pem");
- router.set_certificate_chain_file(".locus/locus_pair.pem");
+ router.set_certificate_file(".locus/locus_public.pem");
router.set_pre_route_callback(Box::new(|stream, url, _| {
info!(
"accepted connection from {} to {}",