openpgp-card: add OpenPgp::into_card()
This commit is contained in:
parent
d0fc4b5725
commit
b852393039
1 changed files with 9 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2021-2022 Heiko Schaefer <heiko@schaefer.name>
|
||||
// SPDX-FileCopyrightText: 2021-2023 Heiko Schaefer <heiko@schaefer.name>
|
||||
// SPDX-License-Identifier: MIT OR Apache-2.0
|
||||
|
||||
use std::convert::{TryFrom, TryInto};
|
||||
|
@ -37,6 +37,14 @@ impl OpenPgp {
|
|||
}
|
||||
}
|
||||
|
||||
/// Get the internal `CardBackend`.
|
||||
///
|
||||
/// This is useful to perform operations on the card with a different crate,
|
||||
/// e.g. `yubikey-management`.
|
||||
pub fn into_card(self) -> Box<dyn CardBackend + Send + Sync> {
|
||||
self.card
|
||||
}
|
||||
|
||||
/// Get an OpenPgpTransaction object. This starts a transaction on the underlying
|
||||
/// CardBackend.
|
||||
///
|
||||
|
|
Loading…
Reference in a new issue