From 4c5a166d2bdc7b0e8bc45838b1bd764d6b397efe Mon Sep 17 00:00:00 2001 From: Nora Widdecke Date: Thu, 27 Oct 2022 15:08:18 +0200 Subject: [PATCH] opgpcard: Remove ident line from output. - The certificate generated by admin generate is written to a file, prefixed with a line containing the card identifier. That means the file is not immediately usable as a pgp certificate. - Remove the identifier line. --- tools/src/bin/opgpcard/output/generate.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/src/bin/opgpcard/output/generate.rs b/tools/src/bin/opgpcard/output/generate.rs index 33c3282..cc92843 100644 --- a/tools/src/bin/opgpcard/output/generate.rs +++ b/tools/src/bin/opgpcard/output/generate.rs @@ -27,10 +27,8 @@ impl AdminGenerate { } fn text(&self) -> Result { - Ok(format!( - "OpenPGP card {}\n\n{}\n", - self.ident, self.public_key, - )) + // Do not print ident, as the file with the public_key must not contain anything else + Ok(self.public_key.to_string()) } fn v1(&self) -> Result {