-
Notifications
You must be signed in to change notification settings - Fork 0
/
ScMinidriver.pas
184 lines (122 loc) · 9.2 KB
/
ScMinidriver.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
unit ScMinidriver;
interface
type
HCkPublicKey = Pointer;
HCkJsonObject = Pointer;
HCkPrivateKey = Pointer;
HCkString = Pointer;
HCkStringTable = Pointer;
HCkCert = Pointer;
HCkScMinidriver = Pointer;
HCkBinData = Pointer;
function CkScMinidriver_Create: HCkScMinidriver; stdcall;
procedure CkScMinidriver_Dispose(handle: HCkScMinidriver); stdcall;
procedure CkScMinidriver_getAtr(objHandle: HCkScMinidriver; outPropVal: HCkString); stdcall;
function CkScMinidriver__atr(objHandle: HCkScMinidriver): PWideChar; stdcall;
procedure CkScMinidriver_getCardName(objHandle: HCkScMinidriver; outPropVal: HCkString); stdcall;
function CkScMinidriver__cardName(objHandle: HCkScMinidriver): PWideChar; stdcall;
procedure CkScMinidriver_getDebugLogFilePath(objHandle: HCkScMinidriver; outPropVal: HCkString); stdcall;
procedure CkScMinidriver_putDebugLogFilePath(objHandle: HCkScMinidriver; newPropVal: PWideChar); stdcall;
function CkScMinidriver__debugLogFilePath(objHandle: HCkScMinidriver): PWideChar; stdcall;
procedure CkScMinidriver_getLastErrorHtml(objHandle: HCkScMinidriver; outPropVal: HCkString); stdcall;
function CkScMinidriver__lastErrorHtml(objHandle: HCkScMinidriver): PWideChar; stdcall;
procedure CkScMinidriver_getLastErrorText(objHandle: HCkScMinidriver; outPropVal: HCkString); stdcall;
function CkScMinidriver__lastErrorText(objHandle: HCkScMinidriver): PWideChar; stdcall;
procedure CkScMinidriver_getLastErrorXml(objHandle: HCkScMinidriver; outPropVal: HCkString); stdcall;
function CkScMinidriver__lastErrorXml(objHandle: HCkScMinidriver): PWideChar; stdcall;
function CkScMinidriver_getLastMethodSuccess(objHandle: HCkScMinidriver): wordbool; stdcall;
procedure CkScMinidriver_putLastMethodSuccess(objHandle: HCkScMinidriver; newPropVal: wordbool); stdcall;
function CkScMinidriver_getMaxContainers(objHandle: HCkScMinidriver): Integer; stdcall;
procedure CkScMinidriver_getRsaPaddingHash(objHandle: HCkScMinidriver; outPropVal: HCkString); stdcall;
procedure CkScMinidriver_putRsaPaddingHash(objHandle: HCkScMinidriver; newPropVal: PWideChar); stdcall;
function CkScMinidriver__rsaPaddingHash(objHandle: HCkScMinidriver): PWideChar; stdcall;
procedure CkScMinidriver_getRsaPaddingScheme(objHandle: HCkScMinidriver; outPropVal: HCkString); stdcall;
procedure CkScMinidriver_putRsaPaddingScheme(objHandle: HCkScMinidriver; newPropVal: PWideChar); stdcall;
function CkScMinidriver__rsaPaddingScheme(objHandle: HCkScMinidriver): PWideChar; stdcall;
procedure CkScMinidriver_getUncommonOptions(objHandle: HCkScMinidriver; outPropVal: HCkString); stdcall;
procedure CkScMinidriver_putUncommonOptions(objHandle: HCkScMinidriver; newPropVal: PWideChar); stdcall;
function CkScMinidriver__uncommonOptions(objHandle: HCkScMinidriver): PWideChar; stdcall;
function CkScMinidriver_getVerboseLogging(objHandle: HCkScMinidriver): wordbool; stdcall;
procedure CkScMinidriver_putVerboseLogging(objHandle: HCkScMinidriver; newPropVal: wordbool); stdcall;
procedure CkScMinidriver_getVersion(objHandle: HCkScMinidriver; outPropVal: HCkString); stdcall;
function CkScMinidriver__version(objHandle: HCkScMinidriver): PWideChar; stdcall;
function CkScMinidriver_AcquireContext(objHandle: HCkScMinidriver; readerName: PWideChar): wordbool; stdcall;
function CkScMinidriver_CardDeleteFile(objHandle: HCkScMinidriver; dirName: PWideChar; fileName: PWideChar): wordbool; stdcall;
function CkScMinidriver_DeleteCert(objHandle: HCkScMinidriver; cert: HCkCert; delPrivKey: wordbool): wordbool; stdcall;
function CkScMinidriver_DeleteContext(objHandle: HCkScMinidriver): wordbool; stdcall;
function CkScMinidriver_DeleteKeyContainer(objHandle: HCkScMinidriver; containerIndex: Integer): wordbool; stdcall;
function CkScMinidriver_EnumFiles(objHandle: HCkScMinidriver; dirName: PWideChar; st: HCkStringTable): wordbool; stdcall;
function CkScMinidriver_FindCert(objHandle: HCkScMinidriver; certPart: PWideChar; partValue: PWideChar; cert: HCkCert): wordbool; stdcall;
function CkScMinidriver_GenerateKey(objHandle: HCkScMinidriver; containerIndex: Integer; keySpec: PWideChar; keyType: PWideChar; keySize: Integer; pinId: PWideChar): wordbool; stdcall;
function CkScMinidriver_GetCardProperties(objHandle: HCkScMinidriver; json: HCkJsonObject): wordbool; stdcall;
function CkScMinidriver_GetCert(objHandle: HCkScMinidriver; containerIndex: Integer; keySpec: PWideChar; cert: HCkCert): wordbool; stdcall;
function CkScMinidriver_GetContainerKeys(objHandle: HCkScMinidriver; containerIndex: Integer; sigKey: HCkPublicKey; kexKey: HCkPublicKey): wordbool; stdcall;
function CkScMinidriver_GetCspContainerMap(objHandle: HCkScMinidriver; json: HCkJsonObject): wordbool; stdcall;
function CkScMinidriver_ImportCert(objHandle: HCkScMinidriver; cert: HCkCert; containerIndex: Integer; keySpec: PWideChar; pinId: PWideChar): wordbool; stdcall;
function CkScMinidriver_ImportKey(objHandle: HCkScMinidriver; containerIndex: Integer; keySpec: PWideChar; privKey: HCkPrivateKey; pinId: PWideChar): wordbool; stdcall;
function CkScMinidriver_ListCerts(objHandle: HCkScMinidriver; certPart: PWideChar; st: HCkStringTable): wordbool; stdcall;
function CkScMinidriver_PinAuthenticate(objHandle: HCkScMinidriver; pinId: PWideChar; pin: PWideChar): Integer; stdcall;
function CkScMinidriver_PinAuthenticateHex(objHandle: HCkScMinidriver; pinId: PWideChar; pin: PWideChar): Integer; stdcall;
function CkScMinidriver_PinChange(objHandle: HCkScMinidriver; pinId: PWideChar; currentPin: PWideChar; newPin: PWideChar): Integer; stdcall;
function CkScMinidriver_PinDeauthenticate(objHandle: HCkScMinidriver; pinId: PWideChar): wordbool; stdcall;
function CkScMinidriver_ReadFile(objHandle: HCkScMinidriver; dirName: PWideChar; fileName: PWideChar; bd: HCkBinData): wordbool; stdcall;
function CkScMinidriver_SaveLastError(objHandle: HCkScMinidriver; path: PWideChar): wordbool; stdcall;
function CkScMinidriver_SignData(objHandle: HCkScMinidriver; containerIndex: Integer; keySpec: PWideChar; hashDataAlg: PWideChar; bdData: HCkBinData; bdSignedData: HCkBinData): wordbool; stdcall;
function CkScMinidriver_WriteFile(objHandle: HCkScMinidriver; dirName: PWideChar; fileName: PWideChar; bd: HCkBinData): wordbool; stdcall;
implementation
{$Include chilkatDllPath.inc}
function CkScMinidriver_Create; external DLLName;
procedure CkScMinidriver_Dispose; external DLLName;
procedure CkScMinidriver_getAtr; external DLLName;
function CkScMinidriver__atr; external DLLName;
procedure CkScMinidriver_getCardName; external DLLName;
function CkScMinidriver__cardName; external DLLName;
procedure CkScMinidriver_getDebugLogFilePath; external DLLName;
procedure CkScMinidriver_putDebugLogFilePath; external DLLName;
function CkScMinidriver__debugLogFilePath; external DLLName;
procedure CkScMinidriver_getLastErrorHtml; external DLLName;
function CkScMinidriver__lastErrorHtml; external DLLName;
procedure CkScMinidriver_getLastErrorText; external DLLName;
function CkScMinidriver__lastErrorText; external DLLName;
procedure CkScMinidriver_getLastErrorXml; external DLLName;
function CkScMinidriver__lastErrorXml; external DLLName;
function CkScMinidriver_getLastMethodSuccess; external DLLName;
procedure CkScMinidriver_putLastMethodSuccess; external DLLName;
function CkScMinidriver_getMaxContainers; external DLLName;
procedure CkScMinidriver_getRsaPaddingHash; external DLLName;
procedure CkScMinidriver_putRsaPaddingHash; external DLLName;
function CkScMinidriver__rsaPaddingHash; external DLLName;
procedure CkScMinidriver_getRsaPaddingScheme; external DLLName;
procedure CkScMinidriver_putRsaPaddingScheme; external DLLName;
function CkScMinidriver__rsaPaddingScheme; external DLLName;
procedure CkScMinidriver_getUncommonOptions; external DLLName;
procedure CkScMinidriver_putUncommonOptions; external DLLName;
function CkScMinidriver__uncommonOptions; external DLLName;
function CkScMinidriver_getVerboseLogging; external DLLName;
procedure CkScMinidriver_putVerboseLogging; external DLLName;
procedure CkScMinidriver_getVersion; external DLLName;
function CkScMinidriver__version; external DLLName;
function CkScMinidriver_AcquireContext; external DLLName;
function CkScMinidriver_CardDeleteFile; external DLLName;
function CkScMinidriver_DeleteCert; external DLLName;
function CkScMinidriver_DeleteContext; external DLLName;
function CkScMinidriver_DeleteKeyContainer; external DLLName;
function CkScMinidriver_EnumFiles; external DLLName;
function CkScMinidriver_FindCert; external DLLName;
function CkScMinidriver_GenerateKey; external DLLName;
function CkScMinidriver_GetCardProperties; external DLLName;
function CkScMinidriver_GetCert; external DLLName;
function CkScMinidriver_GetContainerKeys; external DLLName;
function CkScMinidriver_GetCspContainerMap; external DLLName;
function CkScMinidriver_ImportCert; external DLLName;
function CkScMinidriver_ImportKey; external DLLName;
function CkScMinidriver_ListCerts; external DLLName;
function CkScMinidriver_PinAuthenticate; external DLLName;
function CkScMinidriver_PinAuthenticateHex; external DLLName;
function CkScMinidriver_PinChange; external DLLName;
function CkScMinidriver_PinDeauthenticate; external DLLName;
function CkScMinidriver_ReadFile; external DLLName;
function CkScMinidriver_SaveLastError; external DLLName;
function CkScMinidriver_SignData; external DLLName;
function CkScMinidriver_WriteFile; external DLLName;
end.