From d9a87b8266a574efcb4816c21da7b958ab40b3ff Mon Sep 17 00:00:00 2001 From: Adam Spofford Date: Mon, 28 Jul 2025 06:58:18 -0700 Subject: [PATCH] Add curve info to exported PEM --- src/commands/decrypt_pem.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/decrypt_pem.rs b/src/commands/decrypt_pem.rs index c1565237..488c5295 100644 --- a/src/commands/decrypt_pem.rs +++ b/src/commands/decrypt_pem.rs @@ -2,7 +2,7 @@ use std::path::PathBuf; use anyhow::bail; use clap::Parser; -use sec1::LineEnding; +use sec1::{EncodeEcPrivateKey, LineEnding}; use crate::{ lib::{AnyhowResult, AuthInfo}, @@ -25,7 +25,7 @@ pub fn exec(auth: &AuthInfo, opts: DecryptPemOpts) -> AnyhowResult<()> { write_file( &opts.output_path, "PEM", - pk.to_sec1_pem(LineEnding::default())?.as_bytes(), + EncodeEcPrivateKey::to_sec1_pem(pk, LineEnding::default())?.as_bytes(), )?; eprintln!("Wrote PEM file to {}", opts.output_path.display()); Ok(())