diff --git a/openpgp-card/src/openpgp.rs b/openpgp-card/src/openpgp.rs index c69374f..1b198b4 100644 --- a/openpgp-card/src/openpgp.rs +++ b/openpgp-card/src/openpgp.rs @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2021-2022 Heiko Schaefer +// SPDX-FileCopyrightText: 2021-2023 Heiko Schaefer // 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 { + self.card + } + /// Get an OpenPgpTransaction object. This starts a transaction on the underlying /// CardBackend. ///