Browse Source

Downcast to String instead of &str

Fixes #160
main
Rodolphe Bréard 2 months ago
parent
commit
fa1e987d0c
Failed to extract signature
  1. 6
      CHANGELOG.md
  2. 4
      tacd/src/main.rs

6
CHANGELOG.md

@ -12,6 +12,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Fixed
- Fix the panic when tacd starts.
## [0.24.0] - 2024-12-21 ## [0.24.0] - 2024-12-21
### Added ### Added

4
tacd/src/main.rs

@ -58,13 +58,13 @@ fn init(cnf: &ArgMatches) -> Result<()> {
.get_one::<String>("listen") .get_one::<String>("listen")
.map(|e| e.as_str()) .map(|e| e.as_str())
.unwrap_or(DEFAULT_LISTEN_ADDR); .unwrap_or(DEFAULT_LISTEN_ADDR);
let crt_signature_alg = match cnf.get_one::<&str>("crt-signature-alg") {
let crt_signature_alg = match cnf.get_one::<String>("crt-signature-alg") {
Some(alg) => alg Some(alg) => alg
.parse() .parse()
.map_err(|e: acme_common::error::Error| anyhow!(e))?, .map_err(|e: acme_common::error::Error| anyhow!(e))?,
None => DEFAULT_CRT_KEY_TYPE, None => DEFAULT_CRT_KEY_TYPE,
}; };
let crt_digest = match cnf.get_one::<&str>("crt-digest") {
let crt_digest = match cnf.get_one::<String>("crt-digest") {
Some(alg) => alg Some(alg) => alg
.parse() .parse()
.map_err(|e: acme_common::error::Error| anyhow!(e))?, .map_err(|e: acme_common::error::Error| anyhow!(e))?,

Loading…
Cancel
Save