openpgp-card: minor cleanup

This commit is contained in:
Heiko Schaefer 2023-08-28 20:23:04 +02:00
parent 308bd804ae
commit 8e4ee08802
No known key found for this signature in database
GPG key ID: 4A849A1904CCBD7D

View file

@ -1083,11 +1083,9 @@ impl<'a> OpenPgpTransaction<'a> {
key: Box<dyn CardUploadableKey>,
key_type: KeyType,
) -> Result<(), Error> {
let algo_info = self.algorithm_information();
// An error is ok - it's fine if a card doesn't offer a list of
// supported algorithms
let algo_info = algo_info.unwrap_or(None);
let algo_info = self.algorithm_information().unwrap_or(None);
keys::key_import(self, key, key_type, algo_info)
}