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.
This commit is contained in:
Nora Widdecke 2022-10-27 15:08:18 +02:00
parent 71f6c98ed5
commit 4c5a166d2b
No known key found for this signature in database
GPG key ID: 2D4111B31DBB99B6

View file

@ -27,10 +27,8 @@ impl AdminGenerate {
} }
fn text(&self) -> Result<String, OpgpCardError> { fn text(&self) -> Result<String, OpgpCardError> {
Ok(format!( // Do not print ident, as the file with the public_key must not contain anything else
"OpenPGP card {}\n\n{}\n", Ok(self.public_key.to_string())
self.ident, self.public_key,
))
} }
fn v1(&self) -> Result<AdminGenerateV0, OpgpCardError> { fn v1(&self) -> Result<AdminGenerateV0, OpgpCardError> {