Implement attestation_certificate()
This commit is contained in:
parent
169e338360
commit
6fad597637
3 changed files with 19 additions and 0 deletions
|
@ -285,6 +285,11 @@ impl<'a> Open<'a> {
|
||||||
self.opt.algorithm_information()
|
self.opt.algorithm_information()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Get "Attestation Certificate (Yubico)"
|
||||||
|
pub fn attestation_certificate(&mut self) -> Result<Vec<u8>, Error> {
|
||||||
|
self.opt.attestation_certificate()
|
||||||
|
}
|
||||||
|
|
||||||
/// Firmware Version, YubiKey specific (?)
|
/// Firmware Version, YubiKey specific (?)
|
||||||
pub fn firmware_version(&mut self) -> Result<Vec<u8>, Error> {
|
pub fn firmware_version(&mut self) -> Result<Vec<u8>, Error> {
|
||||||
self.opt.firmware_version()
|
self.opt.firmware_version()
|
||||||
|
|
|
@ -67,6 +67,11 @@ pub(crate) fn algo_info() -> Command {
|
||||||
get_data(Tags::AlgorithmInformation)
|
get_data(Tags::AlgorithmInformation)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// GET DO "Attestation Certificate (Yubico)"
|
||||||
|
pub(crate) fn attestation_certificate() -> Command {
|
||||||
|
get_data(Tags::AttestationCertificate)
|
||||||
|
}
|
||||||
|
|
||||||
/// GET Firmware Version (yubikey specific?)
|
/// GET Firmware Version (yubikey specific?)
|
||||||
pub(crate) fn firmware_version() -> Command {
|
pub(crate) fn firmware_version() -> Command {
|
||||||
Command::new(0x00, 0xF1, 0x00, 0x00, vec![])
|
Command::new(0x00, 0xF1, 0x00, 0x00, vec![])
|
||||||
|
|
|
@ -160,6 +160,15 @@ impl<'a> OpenPgpTransaction<'a> {
|
||||||
Ok(Some(ai))
|
Ok(Some(ai))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Get "Attestation Certificate (Yubico)"
|
||||||
|
pub fn attestation_certificate(&mut self) -> Result<Vec<u8>, Error> {
|
||||||
|
log::info!("OpenPgpTransaction: attestation_certificate");
|
||||||
|
|
||||||
|
let resp = apdu::send_command(self.tx(), commands::attestation_certificate(), true)?;
|
||||||
|
|
||||||
|
Ok(resp.data()?.into())
|
||||||
|
}
|
||||||
|
|
||||||
/// Firmware Version (YubiKey specific (?))
|
/// Firmware Version (YubiKey specific (?))
|
||||||
pub fn firmware_version(&mut self) -> Result<Vec<u8>, Error> {
|
pub fn firmware_version(&mut self) -> Result<Vec<u8>, Error> {
|
||||||
log::info!("OpenPgpTransaction: firmware_version");
|
log::info!("OpenPgpTransaction: firmware_version");
|
||||||
|
|
Loading…
Reference in a new issue