Make pcsc usage less platform specific.

This commit is contained in:
Heiko Schaefer 2021-12-30 17:35:58 +01:00
parent 873f2ed910
commit 28e4200090
No known key found for this signature in database
GPG key ID: 4A849A1904CCBD7D

View file

@ -187,7 +187,7 @@ impl PcscClient {
fn features(&mut self) -> Result<Vec<Tlv>, Error> {
let mut recv = vec![0; 1024];
let cm_ioctl_get_feature_request = 0x42000000 + 3400;
let cm_ioctl_get_feature_request = pcsc::ctl_code(3400);
let res = self
.card
.control(cm_ioctl_get_feature_request, &[], &mut recv)
@ -325,7 +325,7 @@ impl CardClient for PcscClient {
.try_into()?;
let res = self.card.control(
u32::from_be_bytes(verify_ioctl) as u64,
u32::from_be_bytes(verify_ioctl).into(),
&send,
&mut recv,
)?;
@ -426,7 +426,7 @@ impl CardClient for PcscClient {
.try_into()?;
let res = self.card.control(
u32::from_be_bytes(modify_ioctl) as u64,
u32::from_be_bytes(modify_ioctl).into(),
&send,
&mut recv,
)?;