Compare commits

..

No commits in common. "master" and "v3.3.19" have entirely different histories.

6 changed files with 236 additions and 423 deletions

View file

@ -10,7 +10,7 @@ jobs:
cargo-audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- uses: actions-rs/audit-check@v1
# Don't run on dependabot PRs or forks
# https://github.com/actions-rs/clippy-check/issues/2#issuecomment-807852653

View file

@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-22.04
needs: create_release
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- name: build
run: bash .github/workflows/release.sh
- name: upload release assets linux
@ -32,7 +32,7 @@ jobs:
runs-on: windows-latest
needs: create_release
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- name: Build
run: cargo build --verbose --release
- name: strip names
@ -50,7 +50,7 @@ jobs:
runs-on: macos-latest
needs: create_release
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- name: install toolchain
run: rustup target add aarch64-apple-darwin
- name: Build x86_64
@ -79,7 +79,7 @@ jobs:
packages: write
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Log into GHCR

View file

@ -12,7 +12,7 @@ jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- name: Run clippy action to produce annotations
# Don't run on dependabot PRs
# https://github.com/actions-rs/clippy-check/issues/2#issuecomment-807852653
@ -30,7 +30,7 @@ jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- name: Formatting
uses: actions-rs/cargo@v1
with:
@ -39,7 +39,7 @@ jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- uses: actions-rs/cargo@v1
with:
command: test

619
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
[package]
name = "agate"
version = "3.3.20"
version = "3.3.19"
authors = ["Matt Brubeck <mbrubeck@limpet.net>", "Johann150 <johann+agate@qwertqwefsday.eu>"]
description = "Very simple server for the Gemini hypertext protocol"
keywords = ["server", "gemini", "hypertext", "internet", "protocol"]
@ -20,10 +20,10 @@ glob = "0.3"
log = "0.4"
mime_guess = "2.0"
percent-encoding = "2.3"
rcgen = { version = "0.14.7", default-features = false, features = ["ring"] }
tokio-rustls = { version = "0.26.4", default-features = false, features = ["logging", "ring", "tls12"] }
tokio = { version = "1.49", features = ["fs", "io-util", "net", "rt-multi-thread", "sync"] }
url = "2.5.8"
rcgen = { version = "0.14.4", default-features = false, features = ["ring"] }
tokio-rustls = { version = "0.26.3", default-features = false, features = ["logging", "ring", "tls12"] }
tokio = { version = "1.47", features = ["fs", "io-util", "net", "rt-multi-thread", "sync"] }
url = "2.5.5"
[dev-dependencies]
trotter = "1.0"

View file

@ -313,15 +313,17 @@ fn args() -> Result<Args> {
let cert = cert_params.self_signed(&key_pair)?;
// make sure the certificate directory exists
let cert_dir = certs_path.join(domain);
fs::create_dir(&cert_dir)?;
fs::create_dir(certs_path.join(domain))?;
// write certificate data to disk
let mut cert_file = File::create(cert_dir.join(certificates::CERT_FILE_NAME))?;
let mut cert_file = File::create(certs_path.join(format!(
"{}/{}",
domain,
certificates::CERT_FILE_NAME
)))?;
cert_file.write_all(cert.der())?;
// write key data to disk
let key_file_path = cert_dir.join(certificates::KEY_FILE_NAME);
let key_file_path =
certs_path.join(format!("{}/{}", domain, certificates::KEY_FILE_NAME));
let mut key_file = File::create(&key_file_path)?;
#[cfg(unix)]
{