VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/Include
diff options
context:
space:
mode:
authorkavsrf <kavsrf@gmail.com>2017-03-27 16:01:33 +0300
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-18 15:41:15 +0200
commit3cddd24df26085682c819a3c8e9e3ce21a2872da (patch)
treef97065bd54266978df4cae2fe91127c3f58278cd /Include
parent51088d231d73cbe14516d553e97237e7f5a4f147 (diff)
downloadVeraCrypt-DCS-3cddd24df26085682c819a3c8e9e3ce21a2872da.tar.gz
VeraCrypt-DCS-3cddd24df26085682c819a3c8e9e3ce21a2872da.zip
smart card tests via DcsCfg
Diffstat (limited to 'Include')
-rw-r--r--Include/Library/CommonLib.h49
1 files changed, 48 insertions, 1 deletions
diff --git a/Include/Library/CommonLib.h b/Include/Library/CommonLib.h
index 7966eee..2b46632 100644
--- a/Include/Library/CommonLib.h
+++ b/Include/Library/CommonLib.h
@@ -262,6 +262,39 @@ UsbGetId(
OUT CHAR8** id
);
+#define PC_to_RDR_XfrBlock_Message 0x6F
+
+#pragma pack(1)
+typedef struct _CCID_HEADER_OUT {
+ UINT8 bMessageType; // Type of the message
+ UINT32 dwLength; // Length of data
+ UINT8 bSlot; //
+ UINT8 bSeq; //
+ UINT8 bReserved; //
+ UINT16 wLevelParameter; // 0000h Short APDU level
+} CCID_HEADER_OUT;
+
+typedef struct _CCID_HEADER_IN {
+ UINT8 bMessageType; // Type of the message
+ UINT32 dwLength; // Length of data
+ UINT8 bSlot; //
+ UINT8 bSeq; //
+ UINT8 bStatus; //
+ UINT8 bError; //
+ UINT8 bChainParameter;
+} CCID_HEADER_IN;
+#pragma pack()
+
+EFI_STATUS
+UsbScTransmit(
+ IN EFI_USB_IO_PROTOCOL *UsbIO,
+ IN UINT8* cmd,
+ IN UINTN cmdLen,
+ OUT UINT8* resp,
+ OUT UINTN* respLen,
+ OUT UINT16* statusSc
+ );
+
//////////////////////////////////////////////////////////////////////////
// Touch
//////////////////////////////////////////////////////////////////////////
@@ -292,7 +325,7 @@ TouchGetIO(
VOID
PrintBytes(
IN UINT8* Data,
- IN UINT32 Size);
+ IN UINTN Size);
EFI_STATUS
ConsoleGetOutput(
@@ -383,6 +416,20 @@ AsciiStrToGuid(
IN CHAR8 *str
);
+BOOLEAN
+AsciiHexToBytes(
+ OUT UINT8 *b,
+ IN UINTN *bytesLen,
+ IN CHAR8 *str
+ );
+
+BOOLEAN
+StrHexToBytes(
+ OUT UINT8 *b,
+ IN UINTN *bytesLen,
+ IN CHAR16 *str
+ );
+
//////////////////////////////////////////////////////////////////////////
// Menu
//////////////////////////////////////////////////////////////////////////