API C/C++
HSM Dinamo
Loading...
Looking for...
No entries found
dinamo.h
Go to the documentation for this file.
1/* Dinamo Networks. */
2/* Date: 20220930(AAAAMMDD) */
3
4#ifndef DINAMO_H_INCLUDED
5#define DINAMO_H_INCLUDED
6
13#ifdef _WIN32
14 #include <windows.h>
15#endif
16
17#include <time.h>
18
28#ifdef _WIN32
29 typedef unsigned __int64 ND_uint64_t;
30 typedef unsigned __int64 ND_OATH_uint64_t;
31 #define AAP_API __stdcall
32
33 typedef unsigned long long int QWORD;
34 #define DWORD_PRINT_TYPE "lu"
35 #define DWORD_PRINT "%" DWORD_PRINT_TYPE
36#else
37 typedef unsigned long long ND_uint64_t;
38 typedef unsigned long long ND_OATH_uint64_t;
39 #ifdef INTEL_GCC
40 #define AAP_API __attribute__((stdcall))
41 #else
42 #define AAP_API
43 #endif /* INTEL_GCC */
44
45 typedef unsigned char BYTE;
46 typedef unsigned int DWORD;
47 typedef unsigned long long int QWORD;
48 typedef unsigned short WORD;
49 typedef int BOOL;
50 typedef unsigned int UINT;
51 typedef signed int INT;
52 typedef signed char CHAR;
53
54 #define DWORD_PRINT_TYPE "u"
55 #define DWORD_PRINT "%" DWORD_PRINT_TYPE
56
57 #ifndef FALSE
58 #define FALSE (0)
59 #endif
60 #ifndef TRUE
61 #define TRUE (1)
62 #endif
63
64#endif
65
66typedef unsigned long DN_ULONG;
67
68typedef void *HSESSIONCTX;
69typedef void *HHASHCTX;
70typedef void *HKEYCTX;
71typedef void *HCERTCTX;
72typedef void *HSPBCTX;
73typedef void *HCHAPCTX;
74typedef void *HLOGCTX;
75typedef void *HOBJMETACTX;
76typedef void *HP11ATTRCTX;
77typedef void *HOBJMETASEARCHCTX;
78
79#define D_SOCKET_FAILED (-10)
80#define D_GETHOSTNAME_FAILED (-11)
81#define D_CONNECT_FAILED (-12)
82#define D_SEND_FAILED (-13)
83#define D_RECV_FAILED (-14)
84#define D_INVALID_PACKAGE_SIZE (-15)
85#define D_SETSOCKOPT_FAILED (-16)
86#define D_GETSOCKOPT_FAILED (-17)
87#define D_ALL_LOAD_BALANCE_HSM_FAILED (-18)
88#define D_SSL_CTX_NEW_FAILED (1)
89#define D_SSL_NEW_FAILED (2)
90#define D_SSL_CONNECT_FAILED (3)
91#define D_SSL_GENERAL_ERROR (4)
92#define D_CRL_GENERAL_ERROR (101)
93#define D_CRL_SSL_CACERT_BADFILE (102)
94#define D_CRL_COULDNT_RESOLVE_HOST (103)
95#define D_CRL_COULDNT_CONNECT (104)
96#define D_CRL_OPERATION_TIMEDOUT (105)
97#define D_CRL_PEER_FAILED_VERIFICATION (106)
98#define D_CRL_SSL_CONNECT_ERROR (107)
99#define D_CRL_SEND_ERROR (108)
100#define D_CRL_RECV_ERROR (109)
101#define D_CRL_SSL_CERTPROBLEM (110)
102#define D_CRL_SSL_ISSUER_ERROR (111)
103#define D_CRL_AUTH_ERROR (112)
104#define D_CRL_GOT_NOTHING (113)
105#define D_CRL_UNSUPPORTED_PROTOCOL (114)
106#define D_CRL_URL_MALFORMAT (115)
107#define D_CRL_WEIRD_SERVER_REPLY (116)
108#define D_CRL_REMOTE_ACCESS_DENIED (117)
109#define D_CRL_HTTP2 (118)
110#define D_CRL_WRITE_ERROR (119)
111#define D_CRL_READ_ERROR (120)
112#define D_CRL_HTTP_POST_ERROR (121)
113#define D_CRL_ABORTED_BY_CALLBACK (122)
114#define D_CRL_TOO_MANY_REDIRECTS (123)
115#define D_CRL_SSL_CIPHER (124)
116#define D_CRL_BAD_CONTENT_ENCODING (125)
117#define D_CRL_LOGIN_DENIED (126)
118#define D_CRL_INSTALL_SIGN_CALL_FAILED (127)
119#define D_CRL_CERT_LOAD_FAILED (128)
120#define D_CRL_CHAIN_LOAD_FAILED (129)
121#define D_CRL_PRIVATE_KEY_LOAD_FAILED (130)
122#define D_WSASTARTUP (2001)
123#define D_MEMORY_ALLOC (2002)
124#define D_INVALID_PARAM (1001)
125#define D_INVALID_TYPE (1002)
126#define D_INVALID_STATE (1003)
127#define D_LOGGING_NOT_STARTED (1004)
128#define D_MORE_DATA (1005)
129#define D_INVALID_RESPONSE (1006)
130#define D_INVALID_CONTEXT (1007)
131#define D_KEY_GEN_ERROR (1008)
132#define D_KEY_DEL_ERROR (1009)
133#define D_KEY_NOT_EXISTS (1010)
134#define D_INVALID_DATA_LENGTH (1011)
135#define D_INVALID_KEY_ALG (1012)
136#define D_INVALID_PADDING (1013)
137#define D_INVALID_KEY (1014)
138#define D_BAD_DATA (1015)
139#define D_INVALID_PUBKEY (1016)
140#define D_INVALID_ALG_ID (1017)
141#define D_INVALID_HASH (1018)
142#define D_INIT_HASH_FAILED (1019)
143#define D_INVALID_HASH_STATE (1020)
144#define D_END_HASH_FAILED (1021)
145#define D_GET_INFO_ERROR (1022)
146#define D_INVALID_PIN_LEN (1023)
147#define D_OPEN_FILE_FAILED (1025)
148#define D_BACKUP_FAILED (1026)
149#define D_RESTORE_FAILED (1027)
150#define D_INVALID_CALLBACK (1028)
151#define D_NOT_IMPLEMENTED (1029)
152#define D_AUTH_FAILED (1030)
153#define D_INVALID_CLEAR_OP (1031)
154#define D_CHANGE_PWD_ERROR (1032)
155#define D_PWD_SIZE_ERROR (1033)
156#define D_IMPORT_KEY_ERROR (1034)
157#define D_INVALID_KEY_ID (1035)
158#define D_INVALID_FLAG (1036)
159#define D_INVALID_SIGNATURE (1037)
160#define D_INVALID_PUB_KEY (1038)
161#define D_INVALID_KEY_STATE (1039)
162#define D_CREATE_USER_ERROR (1040)
163#define D_NO_MORE_OBJECT (1041)
164#define D_PUT_ENV_VAR_FAILED (1042)
165#define D_INVALID_FILE_SIZE (1043)
166#define D_INVALID_TEXT_SIZE (1044)
167#define D_FILE_ACCESS_ERROR (1045)
168#define D_INVALID_COUNTER (1046)
169#define D_INVALID_MODE (1047)
170#define D_INVALID_STRUCT_ID (1048)
171#define D_INVALID_IP_ADDRESS (1049)
172#define D_GET_PEER_IP_ERROR (1050)
173#define D_CERTIFICATE_PARSE_FAILED (1051)
174#define D_INVALID_KEY_PART_1 (1052)
175#define D_INVALID_KEY_PART_2 (1053)
176#define D_INVALID_KEY_PART_3 (1054)
177#define D_VERIFY_DAC_FAILED (1055)
178#define D_DEPRECATED (1056)
179#define D_NO_MATCHING_KEY_FOUND (1057)
180#define D_CALLBACK_ERROR (1058)
181#define D_INTERNAL_ERROR (1059)
182#define D_KEY_NOT_EXPORTABLE_ERROR (1060)
183#define D_INVALID_SPB_ID (1062)
184#define D_JSON_PARSE_ERROR (1063)
185#define D_JSON_PARSE_WRONG_TYPE_ERROR (1064)
186#define D_JSON_SET_VALUE_ERROR (1065)
187#define D_JSON_UNSET_VALUE_ERROR (1066)
188#define D_JSON_VALUE_NOT_FOUND (1067)
189#define D_JSON_OBJ_CREATE_ERROR (1068)
190#define D_SLP_PARSE_ERROR (1069)
191#define D_SLP_INTERNAL_ERROR (1070)
192#define D_SLP_TOO_MANY_SERVERS_ERROR (1071)
193#define D_INVALID_SERVER_VERSION (1072)
194#define D_GENERATE_PKCS12_ERROR (1073)
195#define D_SET_LOAD_BALANCE_LIST_ERROR (1074)
196#define D_OATH_BLOB_UPDATE (1075)
197#define D_GZIP_DEFLATE_ERROR (1076)
198#define D_HTTP_UNEXPECTED_STATUS_CODE (1077)
199#define D_BASE64_ERROR (1078)
200#define D_SC_READER_NOT_READY (1079)
201#define D_SC_NOT_FORMATTED (1080)
202#define D_SC_INVALID_PIN (1081)
203#define D_SC_READ_FAILED (1082)
204#define D_SC_UNEXPECTED_SVMK_STATUS (1083)
205#define D_SC_FAILED_USB_LIB_LOAD (1084)
206#define D_SC_INVALID_ATR_LEN (1085)
207#define D_SC_PIN_LOCKED (1086)
208#define D_SC_KATS_NEGOTIATION_FAILED (1087)
209#define D_SC_CHANGE_PIN_FAILED (1088)
210#define D_INVALID_DATA_FORMAT (1089)
211#define D_SC_FREEZE_FAILED (1090)
212#define D_SC_LEGACY_CARD_NOT_SUPPORTED (1091)
213#define D_SC_WOULD_OVERWRITE_SVMK (1092)
214#define D_SC_INVALID_SVMK_TYPE (1093)
215#define D_SC_WRITE_FAILED (1094)
216#define D_SC_ERASE_FAILED (1095)
217#define D_SC_SELECT_FAILED (1096)
218#define D_KEEP_ALIVE_ERROR (3001)
219#define D_RECEIVE_LOG_ERROR (3002)
220#define D_ERROR_NOTIFY (3003)
221
222// -------------------------------------------------------------------
223#define D_SUCCESS (0)
224#define D_ERR_UNKNOWN (5000)
225#define D_ERR_NET_FAIL (5001)
226#define D_ERR_ACCESS_DENIED (5002)
227#define D_ERR_CANNOT_CREATE_OBJ (5003)
228#define D_ERR_CANNOT_OPEN_OBJ (5004)
229#define D_ERR_CANNOT_DEL_OBJ (5005)
230#define D_ERR_CANNOT_ALLOC_RES (5006)
231#define D_ERR_INVALID_CTX (5007)
232#define D_ERR_INVALID_OPERATION (5008)
233#define D_ERR_INVALID_KEY (5009)
234#define D_ERR_NO_TLS_USED (5010)
235#define D_ERR_CANNOT_CHANGE_PWD (5011)
236#define D_ERR_OBJ_NOT_EXPORTABLE (5012)
237#define D_ERR_USR_ALREADY_EXISTS (5013)
238#define D_ERR_INVALID_USR_NAME (5014)
239#define D_ERR_CANNOT_CREATE_USR (5015)
240#define D_ERR_NO_MORE_LOG_SLOTS (5016)
241#define D_ERR_CANNOT_DELETE_USR (5017)
242#define D_ERR_CANNOT_DELETE_MASTER (5018)
243#define D_ERR_NOT_IMPLEMENTED (5019)
244#define D_ERR_USR_NOT_FOUND (5020)
245#define D_ERR_INVALID_PAYLOAD (5021)
246#define D_ERR_OBJ_ALREADY_EXISTS (5022)
247#define D_ERR_INVALID_OBJ_NAME (5023)
248#define D_ERR_OBJ_IN_USE (5024)
249#define D_ERR_CANNOT_WRITE_BACKUP_BLOB (5025)
250#define D_ERR_CANNOT_OPEN_BACKUP_BLOB (5026)
251#define D_ERR_CANNOT_RESTORE_BACKUP_BLOB (5027)
252#define D_ERR_INVALID_BACKUP_PIN_OR_LEN (5028)
253#define D_ERR_INVALID_XML_SIGNATURE (5029)
254#define D_ERR_INVALID_CERTIFICATE (5030)
255#define D_ERR_VERIFY_XML_FAILED (5031)
256#define D_ERR_INVALID_XML (5032)
257#define D_ERR_SIGN_XML_FAILED (5033)
258#define D_ERR_UPACK_VERIFY_FAILED (5034)
259#define D_ERR_CANNOT_TRUNCATE_LOG (5035)
260#define D_ERR_CANNOT_BACKUP_OLD_LOG (5036)
261#define D_ERR_CERTIFICATE_EXPIRED (5037)
262#define D_ERR_CERTIFICATE_FAILED (5038)
263#define D_ERR_CERTIFICATE_NOT_FOUND (5039)
264#define D_ERR_CERTIFICATE_REVOKED (5040)
265#define D_ERR_CERTIFICATE_ISSUER_FAILED (5041)
266#define D_ERR_CERTIFICATE_NOT_YET_VALID (5042)
267#define D_ERR_CERT_EXPIRED_SIGN_VALID (5043)
268#define D_ERR_CRL_EXPIRED (5044)
269#define D_ERR_INVALID_CRL_SIGN (5045)
270#define D_ERR_CRL_CERT_MISMATCH (5046)
271#define D_ERR_CERT_REVOKED (D_ERR_CERTIFICATE_REVOKED)
272#define D_ERR_CERT_REVOKED_LIBCLIENT_FIX1 (5047)
273#define D_ERR_ACCESS_DENIED_TOKEN_NOT_NEEDED (5048)
274#define D_ERR_ACCESS_DENIED_TOKEN_NEEDED (5049)
275#define D_ERR_CERT_REVOKED_CRL_VAL_UNUSED (5050)
276#define D_ERR_CERT_VALID_CRL_VAL_UNUSED (5051)
277#define D_ERR_CANNOT_PARSE_XML (5052)
278#define D_ERR_CANNOT_CREATE_XML_SIG_TEMPL (5053)
279#define D_ERR_CANNOT_ADD_XML_SIG_TEMPL_REF (5054)
280#define D_ERR_CANNOT_ADD_XML_SIG_TEMPL_TRANS (5055)
281#define D_ERR_CANNOT_ADD_XML_SIG_KEY_INFO (5056)
282#define D_ERR_CANNOT_ADD_XML_SIG_KEY_CERT (5057)
283#define D_ERR_CANNOT_ALLOC_XML_SIG_CTX (5058)
284#define D_ERR_CANNOT_PARSE_DER_PRIV_KEY (5059)
285#define D_ERR_XML_CANNOT_LOAD_PRIV_KEY (5060)
286#define D_ERR_XML_CANNOT_LOAD_CERT (5061)
287#define D_ERR_XML_CANNOT_CREATE_KEY_MNG (5062)
288#define D_ERR_XML_CANNOT_INIT_KEY_MNG (5063)
289#define D_ERR_XML_CANNOT_LOAD_TRUSTED_CERTS (5064)
290#define D_ERR_XML_SIG_NODE_NOT_FOUND (5065)
291#define D_ERR_XML_CERT_NODE_NOT_FOUND (5066)
292#define D_ERR_XML_CANNOT_DECODE_CERT_NODE (5067)
293#define D_ERR_CANNOT_PARSE_DER_CERT (5068)
294#define D_ERR_DEPRECATED_XML_COMPRESS (5069)
295#define D_ERR_INVALID_CERTIFICATE_NULL_RES (5070)
296#define D_ERR_CANNOT_RECREATE_MASTER (5071)
297#define D_ERR_CANNOT_CREATE_USR_STORAGE1 (5072)
298#define D_ERR_CANNOT_CREATE_USR_STORAGE2 (5073)
299#define D_ERR_CANNOT_CREATE_USR_DEFAULT_ACL (5074)
300#define D_ERR_CANNOT_ALLOC_CTX (5075)
301#define D_ERR_CANNOT_LOAD_PRIV_KEY (5076)
302#define D_ERR_CANNOT_DECODE_PUB_KEY (5077)
303#define D_ERR_CANNOT_GENERATE_RND_DATA (5078)
304#define D_ERR_CACHE_LAYER_EXHAUSTED (5079)
305#define D_ERR_RSA_POWER_SIGN_FAILED (5080)
306#define D_ERR_CANNOT_DEMOTE_MASTER (5081)
307#define D_ERR_CANNOT_GET_SYS_INFO (5100)
308#define D_ERR_CANNOT_ALLOC_UPACK_ID (5101)
309#define D_ERR_CANNOT_ALLOC_UPACK_PATH (5102)
310#define D_ERR_CANNOT_WRITE_UPACK_OBJ (5103)
311#define D_ERR_INVALID_CRL (5104)
312#define D_ERR_OPERATION_FAILED (5105)
313#define D_ERR_GET_USR_ACL_FAILED (5106)
314#define D_ERR_INVALID_SIGNATURE (5107)
315#define D_ERR_CANNOT_GENERATE_SOFT_TOKEN (5108)
316#define D_ERR_INVALID_SECRET (5109)
317#define D_ERR_ACCESS_DENIED_USR_BLOCKED (5120)
318#define D_ERR_INVALID_IMEI (5121)
319#define D_ERR_REPLAY_DETECTED (5122)
320#define D_ERR_NON_APPROVED_OPERATION (5123)
321#define D_ERR_ACCESS_DENIED_OBJ_BLOCKED (5124)
322#define D_ERR_DRBG_CONTINUOUS_TEST (5125)
323#define D_ERR_RSA_CONTINUOUS_TEST (5126)
324#define D_ERR_ECC_CONTINUOUS_TEST (5127)
325#define D_ERR_DES_CONTINUOUS_TEST (5128)
326#define D_ERR_AES_CONTINUOUS_TEST (5129)
327#define D_ERR_ALT_BN128_CONTINUOUS_TEST (5130)
328#define D_ERR_CANNOT_UPDATE_OBJ (5175)
329#define D_ERR_CANNOT_GET_PWD_POLICY (5176)
330#define D_ERR_PWD_BLOCKED_BY_POLICY (5177)
331#define D_ERR_PWD_EXPIRED (5178)
332#define D_ERR_CERT_VALID_CRL_VAL_UNUSED_CRL_EXPIRED (5179)
333#define D_ERR_CERT_VALID_CRL_EXPIRED (5180)
334#define D_ERR_INVALID_CERT_SIGN (5181)
335#define D_ERR_CANNOT_LOAD_CORRUPTED_OBJ (5200)
336#define D_ERR_INVALID_CERT_ISPB_MISMATCH (5230)
337#define D_ERR_INVALID_CA (5231)
338#define D_ERR_DEPRECATED_FUNCTION (5303)
339#define D_ERR_SERVER_BUSY (5304)
340#define D_ERR_SL_BE_BUSY (5305)
341#define D_ERR_SVMK_MISMATCH (5306)
342#define D_ERR_INVALID_CERT_SN_MISMATCH (5307)
343#define D_ERR_CANNOT_DEC_SYM_KEY (5308)
344#define D_ERR_CANNOT_REC_SYM_KEY (5309)
345#define D_SUCCESS_CANNOT_OPEN_OBJ_AT_REPL (5401)
346#define D_ERR_CANNOT_OPEN_INVALID_OBJ_AT_REPL (5402)
347#define D_ERR_CANNOT_SL_BE_CHECK_OBJ (5500)
348#define D_ERR_CANNOT_WRITE_AUTH_INFO_OBJ (5501)
349#define D_ERR_CANNOT_GEN_RSA_KEY (5502)
350#define D_ERR_CANNOT_GEN_ECC_CURVE (5503)
351#define D_ERR_CANNOT_GEN_ECC_KEY (5504)
352#define D_ERR_CANNOT_GEN_ECC_DER (5505)
353#define D_ERR_CANNOT_GEN_ECC_DER_KEY (5506)
354#define D_ERR_CANNOT_CREATE_UNKNOWN_OBJ (5507)
355#define D_ERR_CANNOT_WRITE_HSM_MODE (5508)
356#define D_ERR_CANNOT_WRITE_LOGIN_BLOCK_INFO (5509)
357#define D_ERR_CANNOT_SETUP_LIVE_SYNC_OBJ (5510)
358#define D_ERR_CANNOT_CREATE_LIVE_SYNC_OBJ (5511)
359#define D_ERR_CANNOT_OPEN_LOG (5512)
360#define D_ERR_COULD_NOT_OPEN_OBJ (5513)
361#define D_ERR_CANNOT_EXPORT_RAW_OBJ (5514)
362#define D_ERR_CANNOT_RENAME_OBJ (5515)
363#define D_ERR_REPLICATION_CANNOT_OPEN_OBJ (5516)
364#define D_ERR_CANNOT_SETUP_LIVE_SYNC_IMG (5517)
365#define D_ERR_CANNOT_LOAD_LIVE_SYNC_IMG (5518)
366#define D_ERR_CANNOT_SETUP_LIVE_SYNC_DEL_USR (5519)
367#define D_ERR_CANNOT_DEL_LIVE_SYNC_USR (5520)
368#define D_ERR_CANNOT_SETUP_LIVE_SYNC_DEL_CONFIG (5521)
369#define D_ERR_CANNOT_DEL_LIVE_SYNC_CONFIG (5522)
370#define D_ERR_CANNOT_SETUP_LIVE_SYNC_CONFIG (5523)
371#define D_ERR_CANNOT_CREATE_LIVE_SYNC_CONFIG (5524)
372#define D_ERR_CANNOT_SETUP_LIVE_SYNC_USER (5525)
373#define D_ERR_CANNOT_CREATE_LIVE_SYNC_USER (5526)
374#define D_ERR_CANNOT_SETUP_LIVE_SYNC_ACL (5527)
375#define D_ERR_CANNOT_CREATE_LIVE_SYNC_ACL (5528)
376#define D_ERR_CANNOT_DEL_AUTH_INFO_OBJ (5529)
377#define D_ERR_INVALID_KEY_NULL_RES (5530)
378#define D_ERR_INVALID_MSG_NULL_RES (5531)
379#define D_ERR_CANNOT_GEN_SYM_KEY (5532)
380#define D_ERR_CANNOT_SETUP_USR_AUTH_INFO (5533)
381#define D_ERR_CANNOT_BIND_USR_AUTH_INFO (5534)
382#define D_ERR_CANNOT_GET_CERT_SN (5535)
383#define D_ERR_CANNOT_GET_CERT_ISPB (5536)
384#define D_ERR_INVALID_HASH (5537)
385#define D_ERR_INVALID_SIG_LEN (5538)
386#define D_ERR_INVALID_PUBKEY_LEN (5539)
387#define D_ERR_INVALID_PSKC_XML (5540)
388#define D_ERR_CANNOT_FIND_PSKC_XML_NODE (5541)
389#define D_ERR_CANNOT_FIND_PSKC_XML_ATTR (5542)
390#define D_ERR_INVALID_PSKC_KEY_DERIVATION (5543)
391#define D_ERR_INVALID_PSKC_KEY_DERIVATION_IT (5544)
392#define D_ERR_INVALID_PSKC_KEY_DERIVATION_LEN (5545)
393#define D_ERR_INVALID_PSKC_KEY_DERIVATION_SALT_LEN (5546)
394#define D_ERR_PSKC_KEY_DERIVATION_FAILED (5547)
395#define D_ERR_INVALID_PSKC_KEY_ALG (5548)
396#define D_ERR_INVALID_PSKC_KEY_METHOD (5549)
397#define D_ERR_INVALID_OATH_EPOCH (5550)
398#define D_ERR_INVALID_OATH_TIMESTEP (5551)
399#define D_ERR_INVALID_OATH_DRIFT (5552)
400#define D_ERR_INVALID_PSKC_SECRET_LEN (5553)
401#define D_ERR_UNKNOWN_PADDING_TYPE (5554)
402#define D_ERR_DATA_TOO_LARGE_FOR_MODULUS (5555)
403#define D_ERR_DATA_GREATER_THAN_MODULUS_LEN (5556)
404#define D_ERR_PADDING_CHECK_FAILED (5557)
405#define D_ERR_DATA_TOO_LARGE_FOR_KEY_SIZE (5558)
406#define D_ERR_DATA_TOO_SMALL_FOR_KEY_SIZE (5559)
407#define D_ERR_INVALID_TYPE1_PADDING (5560)
408#define D_ERR_INVALID_TYPE2_PADDING (5561)
409#define D_ERR_BAD_FIXED_HDR_PADDING (5562)
410#define D_ERR_MISSING_NULL_PADDING (5563)
411#define D_ERR_BAD_PAD_BYTE_COUNT (5564)
412#define D_ERR_DATA_TOO_LARGE_FOR_PADDING (5565)
413#define D_ERR_BN_NO_INVERSE (5566)
414#define D_ERR_STATIC_BN_CANNOT_EXPAND (5567)
415#define D_ERR_BN_IS_NOT_PRIME (5568)
416#define D_ERR_TOO_MANY_BN_ITERATIONS (5569)
417#define D_ERR_BN_IS_NOT_A_SQUARE (5570)
418#define D_ERR_BN_DIV_BY_ZERO (5571)
419#define D_ERR_BN_NOT_INITIALIZED (5572)
420#define D_ERR_BN_INVALID_RANGE (5573)
421#define D_ERR_BN_BAD_RECIPROCAL (5574)
422#define D_ERR_BN_CALLED_WITH_EVEN_MODULUS (5575)
423#define D_ERR_BN_INPUT_NOT_REDUCED (5576)
424#define D_ERR_BN_TOO_MANY_TMP_VARIABLES (5577)
425#define D_ERR_BN_INVALID_LEN (5578)
426#define D_ERR_BN_ENCODING_ERROR (5579)
427#define D_ERR_INVALID_PUBLIC_EXP (5580)
428#define D_ERR_INVALID_SPB_HDR_LEN (5581)
429#define D_ERR_INVALID_SPB_HDR_VER (5582)
430#define D_ERR_INVALID_SPB_HDR_SPECIAL_TREATMENT (5583)
431#define D_ERR_INVALID_SPB_HDR_R0 (5584)
432#define D_ERR_INVALID_SPB_HDR_DST_ASYM_ALG (5585)
433#define D_ERR_INVALID_SPB_HDR_DST_SYM_ALG (5586)
434#define D_ERR_INVALID_SPB_HDR_SIGN_KEY_TYPE (5587)
435#define D_ERR_INVALID_SPB_HDR_DST_CA (5588)
436#define D_ERR_INVALID_SPB_HDR_SIGN_CA (5589)
437#define D_ERR_INVALID_SIGN_CERT_SN_MISMATCH (5590)
438#define D_ERR_INVALID_DST_CERT_SN_MISMATCH (5591)
439#define D_ERR_INVALID_SPB_MSG_LEN (5592)
440#define D_ERR_CANNOT_PARSE_JSON (5593)
441#define D_ERR_INVALID_SPB_CHARSET_SIG_OK (5594)
442#define D_ERR_JSON_MORE_DATA (5595)
443#define D_ERR_CANNOT_VIRTUALIZE_JSON (5596)
444#define D_ERR_CANNOT_CHANGE_OEM_JSON (5597)
445#define D_ERR_CANNOT_MERGE_JSON (5598)
446#define D_ERR_INVALID_SPB_CHARSET (5599)
447#define D_ERR_CANNOT_GET_JSON (5600)
448#define D_ERR_INVALID_SPB_CHARSET_SIG_ERR (5601)
449#define D_ERR_INVALID_SPB_DOMAIN (5602)
450#define D_ERR_CANNOT_GEN_DSA_KEY (5603)
451#define D_ERR_DSA_CONTINUOUS_TEST (5604)
452#define D_ERR_CANNOT_GEN_DH_KEY (5605)
453#define D_ERR_DH_CONTINUOUS_TEST (5606)
454#define D_ERR_KEY_CONTINUOUS_TEST (5699)
455#define D_ERR_SERVER_STARTED (5700)
456#define D_ERR_HSM_AUTO_TEST_FAILURE (5701)
457#define D_ERR_SERVER_NOT_STARTED (5702)
458#define D_ERR_UNAPPROVED_TSP_OPERATION (5703)
459#define D_ERR_INVALID_LCRYPTO_R_OPERATION (5704)
460#define D_ERR_OBJ_BLOCKED_BY_DS_POLICY (7000)
461#define D_ERR_TRUNCATING_DS_LOG (7001)
462#define D_ERR_THROTTLED_VM_SIZE (10000)
463#define D_ERR_THROTTLED_RAM (10001)
464#define D_ERR_CANNOT_ALLOC_SOCKET (11000)
465#define D_ERR_CANNOT_ALLOC_MEM (11001)
466#define D_ERR_CANNOT_ALLOC_KEY (11002)
467#define D_ERR_CANNOT_ALLOC_SL_BE_HANDLE (11003)
468#define D_ERR_CANNOT_ALLOC_IOM (11004)
469#define D_ERR_CANNOT_INIT_DRBG (11005)
470#define D_ERR_CANNOT_SEED_DRBG (11006)
471#define D_ERR_CANNOT_USE_IOM (11007)
472#define D_ERR_CANNOT_ALLOC_OBJ_HANDLE (11008)
473#define D_ERR_REPL_CANNOT_ALLOC_SL_BE_HANDLE (11009)
474#define D_ERR_CANNOT_ALLOC_TLS_CTX (11010)
475#define D_ERR_CANNOT_ALLOC_TLS_SOCKET (11011)
476#define D_ERR_CANNOT_SERIALIZE_XML (11012)
477#define D_ERR_CANNOT_ALLOC_BN (11013)
478#define D_ERR_CANNOT_ALLOC_JSON (11014)
479#define D_ERR_CRYPTOHW_OPEN_FAILURE (12001)
480#define D_ERR_CRYPTOHW_SETUP_FAILURE (12002)
481#define D_ERR_CRYPTOHW_READ_FAILURE (12003)
482#define D_ERR_CRYPTOHW_INVALID_CRC (12004)
483#define D_ERR_CRYPTOHW_WRITE_FAILURE (12005)
484#define D_ERR_CRYPTOHW_UNEXPECTED_MSG (12006)
485#define D_ERR_CRYPTOHW_CONNECT_FAILED (12007)
486#define D_ERR_CRYPTOHW_SEND_FAILED (12008)
487#define D_ERR_CRYPTOHW_RECV_FAILED (12009)
488#define D_ERR_REPLICATION_BUSY (36000)
489#define D_ERR_REPLICATION_D_BUSY (36001)
490#define D_ERR_REPLICATION_S_BUSY (36002)
491#define D_ERR_REPLICATION_STORAGE_LAYER_BUSY (36003)
492#define D_ERR_REPLICATION_SEC_LAYER_BUSY (36004)
493#define D_ERR_REPLICATION_PEER_NOT_SYNCED (36500)
494#define D_ERR_REPLICATION_CANNOT_PREPARE_TRANS (37001)
495#define D_ERR_REPLICATION_CANNOT_P2P_HANDSHAKE (37002)
496#define D_ERR_REPLICATION_CANNOT_P2P_FIND (37003)
497#define D_ERR_REPLICATION_CANNOT_P2P_CONNECT (37004)
498#define D_ERR_REPLICATION_CANNOT_P2P_SEND (37005)
499#define D_ERR_REPLICATION_CANNOT_P2P_RECV (37006)
500#define D_ERR_REPLICATION_CANNOT_P2P_SEND_ALL (37007)
501#define D_ERR_REPLICATION_CANNOT_P2P_RECV_ALL (37008)
502#define D_ERR_REPLICATION_CANNOT_P2P_SCONNECT (37009)
503#define D_ERR_REPLICATION_CANNOT_P2P_SSEND (37010)
504#define D_ERR_REPLICATION_CANNOT_P2P_SRECV (37011)
505#define D_ERR_REPLICATION_CANNOT_P2P_SSEND_ALL (37012)
506#define D_ERR_REPLICATION_CANNOT_P2P_SRECV_ALL (37013)
507#define D_ERR_REPLICATION_CANNOT_P2P_WORK (37014)
508#define D_ERR_REPLICATION_NOT_FOUND (37015)
509#define D_ERR_REPLICATION_ACK_NOT_FOUND (37016)
510#define D_ERR_REPLICATION_INVALID_OPERATION (37017)
511#define D_ERR_REPLICATION_INVALID_EVENT (37018)
512#define D_ERR_REPLICATION_OPERATION_FAILED (37019)
513#define D_ERR_REPLICATION_COMMIT_FAILED (37020)
514#define D_ERR_REPLICATION_ERASE_FAILED (37021)
515#define D_ERR_REPLICATION_INQUIRE_FAILED (37022)
516#define D_ERR_REPLICATION_UPDATE_ACK_FAILED (37023)
517#define D_ERR_REPLICATION_DISPATCH_FAILED (37024)
518#define D_ERR_REPLICATION_CANNOT_SL_BE_TRANSP (37025)
519#define D_ERR_REPLICATION_CANNOT_PRUNE_LOG (37026)
520#define D_ERR_REPLICATION_CANNOT_LOAD_LOG (37027)
521#define D_ERR_REPLICATION_CANNOT_WORK (37028)
522#define D_ERR_REPLICATION_CANNOT_VALIDATE_EVENT (37029)
523#define D_ERR_REPLICATION_TRANS_MISMATCH (37030)
524#define D_ERR_REPLICATION_CANNOT_SYNC_POINT (37031)
525#define D_ERR_REPLICATION_UNDEFINED_LIVE_SYNC (37032)
526#define D_ERR_REPLICATION_CONNECTED_LIVE_SYNC (37033)
527#define D_ERR_REPLICATION_SELF_LIVE_SYNC (37034)
528#define D_ERR_REPLICATION_OBJ_IN_USE (37035)
529#define D_ERR_REPLICATION_CANNOT_BEGIN_TRANS (37036)
530#define D_ERR_REPLICATION_MAX_NODE_COUNT_REACHED (37037)
531#define D_ERR_REPL_CANNOT_PREPARE_LS_TRANS (37038)
532#define D_ERR_REPL_PART_CANNOT_ADD_LOG (37039)
533#define D_ERR_REPL_COOR_CANNOT_ADD_LOG (37040)
534#define D_ERR_CANNOT_LOAD_DEPRECATED_LICENSE (47000)
535#define D_ERR_INVALID_DEPRECATED_LICENSE (47001)
536#define D_ERR_DEPRECATED_LICENSE_EXPIRED (47002)
537#define D_ERR_DEPRECATED_LICENSE_BLOCKED (47003)
538
539// -------------------------------------------------------------------
540
541
542/* Server error macros */
543
544#define D_IS_REPL_BUSY_ERR(dw) ( \
545 (DWORD)(dw) == (DWORD) D_ERR_REPLICATION_BUSY || \
546 (DWORD)(dw) == (DWORD) D_ERR_REPLICATION_D_BUSY || \
547 (DWORD)(dw) == (DWORD) D_ERR_REPLICATION_S_BUSY || \
548 (DWORD)(dw) == (DWORD) D_ERR_REPLICATION_STORAGE_LAYER_BUSY || \
549 (DWORD)(dw) == (DWORD) D_ERR_REPLICATION_SEC_LAYER_BUSY \
550 )
551
552
553
554
555#define NOT_LISTED_ERROR (-999999)
556
557/* DOpenSession - Options/parameters */
558
559/* dwParam */
560#define SS_ANONYMOUS (0x00000001) /*pbData == AUTH_PWD ou AUTH_PWD_EX*/
561#define SS_USER_PWD (0x00000002) /*pbData == AUTH_PWD*/
562#define SS_CERTIFICATE (0x00000004) /*pbData == SS_MEDIA_FILE*/
563#define SS_CLUSTER (0x00000008) /*pbData == NULL*/
564#define SS_USR_PWD_EX (0x00000010) /*pbData == AUTH_PWD_EX*/
565#define SS_ATOKEN (0x00000020) /*pbData == AUTH_ATOKEN*/
566#define SS_HTTP (0x00000040) /*pbData == AUTH_HTTP*/
567#define SS_WIN_CREDENTIAL (0x00000080) /*pbData == AUTH_WIN_CREDENTIAL*/
568
569/* dwFlags */
570#define ENCRYPTED_CONN (0x00000001) /* Encrypted communication */
571#define USER_INTERACTIVE (0x00000002) /* User interactive. Not implemented. */
572#define CLEAR_CONN (0x00000004) /* Not encrypted communication */
573#define LB_BYPASS (0x00000008) /* Load balance bypass */
574#define CACHE_BYPASS (0x00000010) /* Session Cache bypass */
575#define DS_BYPASS (0x00000020) /* Dinamo Services bypass */
576
577/* Strong authentication */
578
579#define SA_AUTH_NONE (0x00000000) /* No strong authentication */
580#define SA_AUTH_OTP (0x00000001) /* OTP authentication */
581#define SA_AUTH_CERTIFICATE (0x00000002) /* Certificate authentication */
582
583/* Modos de operação do HSM */
584
585#define DN_HSM_OP_NRM (0)
586#define DN_HSM_OP_RM1 (1)
587#define DN_HSM_OP_RM2 (2)
588#define DN_HSM_OP_RM3 (3)
590/* SetSessionParam/GetSessionParam */
591
592/* dwParam */
593#define SP_SESSION_TIMEOUT (0x00000001) /* Time-out sessao pbData == dwTimeout (ms) */
594#define SP_SEND_TIMEOUT (0x00000002) /* Time-out send pbData == dwTimeout (ms) */
595#define SP_RECV_TIMEOUT (0x00000004) /* Time-out recv pbData == dwTimeout (ms) */
596#define SP_ENCRYPTED (0x00000008) /* Read-only pbData == bSessionEncrypted (TRUE/FALSE) */
597#define SP_SESSION_ID (0x00000010) /* Read-only pbData == dwSessionId */
598#define SP_SESSION_CID (0x00000020) /* Read-only pbData == DWORD */
599#define SP_SESSION_TYPE (0x00000040) /* Read-only pbData == DWORD */
600#define SP_SESSION_CIPHER (0x00000080) /* Read-only pbData == char * */
601#define SP_SESSION_PIX_HTTP_RET (0x00000100) /* Read-only pbData == long */
602#define SP_SESSION_PIX_HTTP_REQ_DETAILS (0x00000200) /* Read-only pbData == PIX_HTTP_REQUEST_DETAILS */
603#define SP_HSM_OP_MODE (0x00000400) /* Read-only pbData == DWORD (DN_HSM_OP_NRM ...)*/
604
605/* SP_SESSION_TYPE */
606
607#define SP_SESSION_TYPE_CLEAR_CONN (1)
608#define SP_SESSION_TYPE_SSL2 (2)
609#define SP_SESSION_TYPE_SSL3 (3)
610#define SP_SESSION_TYPE_TLS1 (4)
611#define SP_SESSION_TYPE_TLS1_1 (5)
612#define SP_SESSION_TYPE_TLS1_2 (6)
613#define SP_SESSION_TYPE_UNKNOWN (7)
614
615
616/* CloseSession */
617
618/* dwFlags */
619#define WAIT_OPERATIONS (0x00000004) /* Wait the end of all operations in progress. Not implemented. */
620#define CLOSE_PHYSICALLY (0x00000008) /* Force the end of the connection with the HSM. Session will not be cached. */
621
622/* DDSBindHSM */
623
624#define D_DS_BIND_VERSION (1)
625#define D_MAX_DS_BIND_URL (255)
626#define D_DS_BIND_PSK_LEN (16)
627#define D_MIN_DS_BIND_B62_ID (1)
628#define D_MAX_DS_BIND_B62_ID (22)
629
630/* DBackupObject */
631
632#define D_BACKUP_OBJ (1)
633#define D_RESTORE_OBJ (2)
634
635#define D_MAX_BACKUP_OBJ_LEN (1024*4)
636
637/* Backup */
638
639#define MAKE_BACKUP (0)
640#define MAKE_RESTORE (1)
641#define MAKE_RESTORE_WITH_NET_CONFIG MAKE_RESTORE
642#define MAKE_RESTORE_WITHOUT_NET_CONFIG (2)
643#define MAKE_USE_WIN_CREDENTIAL (0x80000000)
645/* GetHsmData/SetHsmData */
646
647/* dwParam */
648#define HD_AUDIT_START (0x00000001) /* Indicate that the connection will be used to retrieve logs. */
649#define HD_AUDIT_RECV (0x00000002) /* Receive logs from server. */
650
651/* dwFlags */
652#define DATA_ONLY (0x00000008) /* Backup/Restore only data */
653#define CONFIG_ONLY (0x00000010) /* Backup/Restore only configurations*/
654
655
656/* GetHsmConfig/SetHsmConfig */
657
658/* dwParam*/
659#define HC_PASS_PORT_VALUE (0x00000001) /* Monitoring port. pbData == wPortNumber */
660#define HC_PASS_PORT_ENABLE (0x00000002) /* Enable/disable monitoring port. pbData == bEnable */
661#define HC_MAX_CONNECT (0x00000004) /* Maximum connections (processing). pbData == dwMaxConnections */
662#define HC_MAX_MONITORING (0x00000008) /* Maximum connections (monitoring). pbData == dwMaxConnections */
663#define HC_PERMISSION_IP (0x00000010) /* Clients IP list. pbData == szIPList (xxx.xxx.xxx.xxx;xxx...) */
664
665/* dwFlags */
666#define ENABLE_VALUES (0x00000020) /* Enable values indicated by pbData. */
667#define DISABLE_VALUES (0x00000040) /* Disable values indicated by pbData. */
668
669
670/* DAdmOperation */
671
672/* dwParam */
673#define AO_SHUTDOWN (1) /* Shutdown HSM. pbData == NULL */
674#define AO_RESTART (2) /* Restart HSM services. pbData == NULL */
675#define AO_KEEPALIVE (4) /* Keep session alive. */
676#define AO_SET_DATE_TIME (8) /* Set the HSM's time and date. pbData == struct tm (time.h) */
677#define AO_ADD_CLUSTER_LIST (16) /* DEPRECATED! */
678#define AO_DEL_CLUSTER_LIST (18) /* DEPRECATED! */
679#define AO_GET_CLUSTER_LIST (20) /* DEPRECATED! */
680#define AO_RST_CLUSTER_LIST (24) /* DEPRECATED! */
681#define AO_SET_PWD_SEC_POLICY (25) /* Define password security policies. */
682#define AO_GET_PWD_SEC_POLICY (32) /* Recover password security policies. */
683#define AO_REPL_UPDATE (33) /* Process an update replication command. pbData == NULL */
684#define AO_REPL_NODE_MESSAGE (34) /* Send comands to the HSM's replication subsystem. pbData == *REPL_NODE_MSG */
685#define AO_LOG_CACHE_STATE (35) /* Get cache log state. pbData == *DWORD */
686#define AO_LOG_CACHE_ENABLE (36) /* Enable log cache. pbData == NULL */
687#define AO_LOG_CACHE_DISABLE (37) /* Disable log cache. pbData == NULL */
688#define AO_SET_TLS_BUNDLE (38) /* Set TLS bundle. pbData == TLS_BUNDLE_INFO */
689
690#define AO_EFTD_ACTIVATE (39)
691#define AO_EFTD_DEACTIVATE (40)
692#define AO_EFTD_RESET_CONF (41)
693#define AO_EFTD_GET_CONF (42)
694#define AO_EFTD_SET_MSG_HEADER_LEN (43)
695#define AO_EFTD_SET_PIN_LEN (44)
696#define AO_GET_GLOBAL_OBJ_STATS (45)
697#define AO_GET_SEC_POLICY_GFLAGS (46)
698#define AO_SET_SEC_POLICY_GFLAGS (47)
700#define AO_KEEPALIVE_FLAG_NOISELESS ((DWORD) -2371)
701
702#define AO_LOG_CACHE_STATE_ENABLED (11)
703#define AO_LOG_CACHE_STATE_DISABLED (22)
704
705
706/*
707 AO_GET_SEC_POLICY_GFLAGS and AO_SET_SEC_POLICY_GFLAGS supported GFLAGS.
708*/
709
710#define DN_SEPOL_GF_ENABLE_HTTP_X509_SA (1 << 0)
711#define DN_SEPOL_GF_ENABLE_NSA_API_AUTH (1 << 1)
713//
714// Replication operation messages
715// to be used with AO_REPL_NODE_MESSAGE.
716//
717#define RNM_PROBE (1)
718#define RNM_DOWN (2)
719#define RNM_SLP_BYPASS_ADD (3)
720#define RNM_SLP_BYPASS_DEL (4)
721
722#define DN_EFTD_DEFAULT_USER "eftd0"
723#define DN_EFTD_MIN_MSG_HEADER_LEN (1)
724#define DN_EFTD_MAX_MSG_HEADER_LEN (255)
725#define DN_EFTD_MIN_PIN_LEN (5)
726#define DN_EFTD_MAX_PIN_LEN (13)
728#define DN_EFTD_JSON_CONF_MSG_HDR_LEN "msg-hdr-len"
729#define DN_EFTD_JSON_CONF_PIN_LEN "pin-len"
730#define DN_EFTD_JSON_CONF_EFTD0_ACTIV "eftd0"
732/* SetUserParam/GetUserParam */
733
734/* dwParam */
735#define UP_USER_NAME (0x00000001) /* User name. pbData == szUserName */
736#define UP_AUTH_MASK (0x00000002) /* Authorization mask. pdData == dwAuthMask */
737#define UP_ACCESS_TYPE (0x00000004) /* Access type mask. pbData == dwAccessType */
738#define UP_CERTIFICATE (0x00000008) /* User certificate. pbData == pbCertificate */
739#define UP_PASSWORD (0x00000010) /* User password. pbData == pwd */
740#define UP_INVALID_LOGIN_ATTEMPTS (0x00000020) /* Amount of invalid login attempts. pbData == DWORD */
741#define UP_BLOCK_USR (0x00000040) /* Block user. == szUserName */
742#define UP_UNBLOCK_USR (0x00000080) /* Unblock user. == szUserName */
743#define UP_USR_PASSWORD (0x00000100) /* Re-define user password. == USER_INFO */
744#define UP_USR_PA_STATE (0x00000200) /* Partition autorization state. == USER_PA_INFO */
745#define UP_USR_OBJ_COUNT (0x00000400) /* User object count. == DN_USER_OBJ_COUNT */
746
747/* FindUser */
748
749/* dwFindType */
750#define FU_USER_ID (0x00000001) /* User ID pvFindParam == szUserId */
751#define FU_USER_NAME (0x00000002) /* User ID pvFindParam == szUserName */
752#define FU_AUTH_MASK (0x00000004) /* Authorization mask. pvFindParam == dwAuthMask */
753#define FU_ACCESS_TYPE (0x00000008) /* Access type. pvFindParam == dwAccessType */
754#define FU_ROOT_ID (0x00000010) /* Root certificate issuer. pvFindParam == szRootCN */
755
756/* dwFlags */
757#define PARTIAL_VALUE (0x00000080) /* pvFindParam contains part of the search value. */
758
759/* DGetHsmInfo */
760
761#define HI_BATTERY_LIFE (0x00000001) /* Battery remaining life time. pbData == tLife (time_t) */
762#define HI_PERFOMANCE_COUNT (0x00000002) /* Use percentage: CPU, Memory e disk. pbData == * PERFOMANCE_COUNT */
763#define HI_MODULE_INFO (0x00000004) /* Existing modules. pbData == * MODULE_INFO */
764#define HI_HSM_INFO (0x00000008) /* HSM's model and version. pbData == szHsmInfo */
765#define HI_OPERATIONS_COUNT (0x00000010) /* Operation counter. pbData == * OPERATIONS_INFO */
766#define HI_SYS_HEALTH (0x00000020) /* Elapsed time since last update and battery check. pbData == * SYS_HEALTH */
767#define HI_FIPS_MODE (0x00000040) /* Recover HSM's operation mode. pbData == *DWORD */
768#define HI_DISK_INFO (0x00000080) /* Recover HSM's disk usage information. pbData == *SYS_DISK_INFO */
769#define HI_REPL_INFO (0x00000100) /* Recover HSM's replication information. pbData == *SYS_REPL_INFO */
770#define HI_CURRENT_DATE (0x00000200) /* Recover HSM's date and time. pbData == *QWORD */
771#define HI_HW_STR (0x00000400) /* Recover HSM's date and time. pbData == *SYS_HW_STR_INFO */
772#define HI_NTP_INFO (0x00000800) /* Recover HSM's date and time. pbData == *SYS_NTP_INFO */
773#define HI_STATS_INFO (0x00001000) /* Recover HSM's statistics info. pbData == *SYS_STATUS_INFO */
774#define HI_COUNTER_INFO (0x00002000) /* Recover HSM's counter info. pbData == *SYS_COUNTER_INFO */
775#define HI_FIPS_RCODE_INFO (0x00004000) /* Recover HSM's Restrict Modes auto-test return code. pbData == *DWORD */
776#define HI_PENDING_INFO (0x00008000) /* Recover HSM's pending info. pbData == *SYS_PENDING_INFO */
777#define HI_ALL_INFO (0x00010000) /* Recover HSM's ALL info. pbData == *SYS_ALL_INFO */
778
779
780#define INVALID_OBJ_TYPE (0)
781
782#define MSGSH_NO_INFO (0xFFFFFFFF)
783
784
785#define GET_INFO_MAX_REPL_DOMAIN_NAME (1024)
786#define GET_INFO_MAX_REPL_NODES (255)
787#define GET_INFO_MAX_SN_LEN (255)
788#define GET_INFO_MAX_HW_STR_LEN (255)
789#define GET_INFO_MAX_TPKEY_LEN (16)
790#define GET_INFO_MAX_NTP_SVRS (16)
791#define GET_INFO_MAX_NTPQ_LEN (256)
792#define GET_INFO_MAX_NTP_KT_LEN (16)
793#define GET_INFO_MAX_NTP_KM_LEN (64)
794
795
796//Replication states returned by SYS_REPL_INFO structure.
797#define REPL_STATE_TWOPC_VIRTUAL (1)
798#define REPL_STATE_TWOPC_PREPARED (2)
799#define REPL_STATE_TWOPC_COMMITTED (3)
800#define REPL_STATE_TWOPC_COMMITTED_TM (4)
801
802//Replication events returned by SYS_REPL_INFO structure.
803#define REPL_EVENT_ET_NULL (1)
804#define REPL_EVENT_ET_CREATE_USR (2)
805#define REPL_EVENT_ET_DELETE_USR (3)
806#define REPL_EVENT_ET_CREATE_OBJ (4)
807#define REPL_EVENT_ET_DELETE_OBJ (5)
808#define REPL_EVENT_ET_DELETE_USR_OTP_AUTH_INFO (6)
809#define REPL_EVENT_ET_WRITE_USR_OTP_AUTH_INFO (7)
810#define REPL_EVENT_ET_UPDATE_USR_OTP_AUTH_INFO (8)
811#define REPL_EVENT_ET_CHANGE_USR_PWD (9)
812#define REPL_EVENT_ET_SET_USR_LOCK_COUNT (10)
813#define REPL_EVENT_ET_SET_GLOBAL_SEC_POLICY (11)
814#define REPL_EVENT_ET_SET_SYS_DATE_TIME (12)
815#define REPL_EVENT_ET_UPDATE_ACL (13)
816#define REPL_EVENT_ET_BLOCK_OBJ (14)
817#define REPL_EVENT_ET_UPDATE_OBJ (15)
818#define REPL_EVENT_ET_SET_USR_NS_AUTH_COOKIE (16)
819#define REPL_EVENT_ET_SET_USR_OTP_MOV_FACTOR (17)
820
821/* DListUserTrusts */
822
823#define OP_LST_USR_TRUSTERS (0x01) /* List users that permits the current logged user to access it's partition. */
824#define OP_LST_USR_TRUSTEES (0x02) /* List users that have permission to access the current logged user's partition. */
825
826
827/* DAssignToken/DUnassignToken */
828
829#define AT_GO3_TOKEN (1) /* DEPRECATED! */
830#define AT_OATH_TOKEN (2) /* Assign a OATH EVENT OTP token */
831#define AT_OATH_TOKEN_TOTP (3) /* Assign a OATH TIME OTP token */
832
833//
834// mod_OATH's NEW_SA; use with structure OATH_SA_v1.
835//
836#define MAX_OATH_HMAC_LEN (128) // up to hmac-sha512, in bytes
837
838#define OATH_SA_v1_type_SHA1 (0x01)
839#define OATH_SA_v1_HOTP_DYN_TRUNC_OFF (16)
840#define OATH_SA_v2_default_TIME_STEP (30)
841#define OATH_SA_v2_default_T0_Epoch (0)
842
843
844/* DOATHResync */
845
846#define OATH_MIN_HOTP_LEN (6 + 1) //plus 1 for the null terminator
847#define OATH_MAX_HOTP_LEN (16 + 1) //plus 1 for the null terminator
848
849/* DOATHGetBlobInfo */
850
851#define OATH_ISSUE_OATH_BLOB_t (1)
852#define OATH_ISSUE_OATH_INFO_t (2)
853
854
855/* DEncrypt/DDecrypt */
856
857#define D_NO_RSA_PADDING (3)
858#define D_FORCE_ACTUAL_RSA (4)
859
860
861/* DPKCS7Sign - Sign using PKCS#7 */
862
863#define TAC_MOD_CORE_P7_TEXT 0x0001
864#define TAC_MOD_CORE_P7_NOCERTS 0x0002
865#define TAC_MOD_CORE_P7_NOSIGS 0x0004
866#define TAC_MOD_CORE_P7_NOCHAIN 0x0008
867#define TAC_MOD_CORE_P7_NOINTERN 0x0010
868#define TAC_MOD_CORE_P7_NOVERIFY 0x0020
869#define TAC_MOD_CORE_P7_DETACHED 0x0040
870#define TAC_MOD_CORE_P7_BINARY 0x0080
871#define TAC_MOD_CORE_P7_NOATTR 0x0100
872#define TAC_MOD_CORE_P7_NOSMIMECAP 0x0200
873#define TAC_MOD_CORE_P7_NOOLDMIMETYPE 0x0400
874#define TAC_MOD_CORE_P7_CRLFEOL 0x0800
875#define TAC_MOD_CORE_P7_NOCRL 0x2000
876
877#define TAC_MOD_CORE_P7_COSIGN 0x80000000
878
879
880
881/* HASH algorithms */
882
883#define ALG_MD5 (1)
884#define ALG_SHA1 (2)
885#define ALG_SSL_SHA1_MD5 (3)
886#define ALG_SHA2_256 (4)
887#define ALG_SHA2_384 (5)
888#define ALG_SHA2_512 (6)
889#define ALG_SHA2_224 (7)
890#define ALG_SHA3_224 (8)
891#define ALG_SHA3_256 (9)
892#define ALG_SHA3_384 (10)
893#define ALG_SHA3_512 (11)
894
895#define ALG_IDENTITY_FUNC (255)
896
897/*
898 DSignXML/DSignXML2/DPIXSign hash mode options.
899*/
900#define ALG_MD5_InclC14N (1)
901#define ALG_SHA1_InclC14N (2)
902#define ALG_SHA256_InclC14N (3)
903#define ALG_SHA384_InclC14N (4)
904#define ALG_SHA512_InclC14N (5)
905#define ALG_SHA224_InclC14N (6)
906#define ALG_MD5_ExclC14N (31)
907#define ALG_SHA1_ExclC14N (32)
908#define ALG_MD5_InclC14NWithComments (33)
909#define ALG_SHA1_InclC14NWithComments (34)
910#define ALG_MD5_ExclC14NWithComments (35)
911#define ALG_SHA1_ExclC14NWithComments (36)
912#define ALG_SHA256_ExclC14N (37)
913#define ALG_SHA256_InclC14NWithComments (38)
914#define ALG_SHA256_ExclC14NWithComments (39)
915#define ALG_SHA384_ExclC14N (40)
916#define ALG_SHA384_InclC14NWithComments (41)
917#define ALG_SHA384_ExclC14NWithComments (42)
918#define ALG_SHA512_ExclC14N (43)
919#define ALG_SHA512_InclC14NWithComments (44)
920#define ALG_SHA512_ExclC14NWithComments (45)
921#define ALG_SHA224_ExclC14N (46)
922#define ALG_SHA224_InclC14NWithComments (47)
923#define ALG_SHA224_ExclC14NWithComments (48)
924
925/*
926 DSignXML2 flags
927*/
928
929
930#define XML_SIGN_FLAGS_FQN (1 << 31)
931#define XML_SIGN_FLAGS_NOL (1 << 30)
932#define XML_SIGN_FLAGS_NO_RNS (1 << 29)
933
934
935/*
936 DSignXML/DSignXML2 filter options
937*/
938
939#define XML_FILTER_NULL_URI "''"
940
941/*
942 DPIXSign flags
943*/
944
945#define PIX_SIGN_RNS (1)
946
947/* DPIXPost/DPIXGet/DPIXDelete */
948
949#define PIX_VERIFY_HOST_NAME (0x00000001)
950#define PIX_BASIC_HTTP_HEADER (0x00000002)
951#define PIX_GZIP (0x00000004)
952
953/*
954 DPIXJWSSign
955*/
956
957#define PIX_JWS_GEN_MAX_LEN (8*1024)
958
959#define MD5_LEN (16)
960#define SHA1_LEN (20)
961#define SSL_SHA1_MD5_LEN (36)
962#define SHA2_224_LEN (28)
963#define SHA2_256_LEN (32)
964#define SHA2_384_LEN (48)
965#define SHA2_512_LEN (64)
966#define CMAC_3DES_LEN (8)
967#define CMAC_AES_LEN (16)
968#define SHA3_224_LEN (28)
969#define SHA3_256_LEN (32)
970#define SHA3_384_LEN (48)
971#define SHA3_512_LEN (64)
972
973#define MAX_HASH_LEN (64)//SHA2_512_LEN
974
975/* Digital signature */
976
977#define NO_HASH_OID (1)
978#define MD5_HASH_OID (2)
979#define SHA_HASH_OID (3)
980#define SHA256_HASH_OID (4)
981#define SHA384_HASH_OID (5)
982#define SHA512_HASH_OID (6)
983#define SHA224_HASH_OID (7)
984
985#define MD5_HASH_OID_LEN (18)
986#define SHA_HASH_OID_LEN (15)
987#define SHA224_HASH_OID_LEN (19)
988#define SHA256_HASH_OID_LEN (19)
989#define SHA384_HASH_OID_LEN (19)
990#define SHA512_HASH_OID_LEN (19)
991
992/* DSignHash flags */
993
994#define DN_SIGN_NO_HASH_OID (0x01)
995#define DN_SIGN_DISABLE_LEGACY_OPERATION (0x02)
996#define DN_SIGN_ECC_P11_FMT (0x04)
997
998/* DVerifySignature flags */
999
1000#define DN_VERIFY_NO_HASH_OID (0x01)
1001#define DN_VERIFY_ECC_P11_FMT (0x02)
1002
1003#define DN_SIG_EDDSA_MAX_DATA_LEN (4 * 1024 * 1024)
1004
1005/* Symmetric cryptography algorithms */
1006
1007#define ALG_DES (1)
1008#define ALG_3DES_112 (2) /* EDE */
1009#define ALG_3DES_168 (3) /* EDE */
1010#define ALG_DESX (91)
1011
1012#define ALG_AES_128 (7)
1013#define ALG_AES_192 (8)
1014#define ALG_AES_256 (9)
1015
1016#define ALG_ARC4 (10)
1017#define ALG_ARC5 (89)
1018
1019/* Symmetric key sizes (bytes) */
1020
1021#define ALG_DES_LEN (8)
1022#define ALG_DES3_112_LEN (16)
1023#define ALG_DES3_168_LEN (24)
1024
1025//Deprecated
1026#define DES_LEN (ALG_DES_LEN)
1027#define DES3_112_LEN (ALG_DES3_112_LEN)
1028#define DES3_168_LEN (ALG_DES3_168_LEN)
1029
1030#define ALG_DESX_LEN (24)
1031
1032#define ALG_AES_128_LEN (16)
1033#define ALG_AES_192_LEN (24)
1034#define ALG_AES_256_LEN (32)
1035
1036#define ALG_ARC4_LEN (16)
1037#define ALG_ARC5_LEN (16)
1038
1039/* Block sizes */
1040
1041#define DES_BLOCK (8)
1042#define DES3_BLOCK (8)
1043#define DESX_BLOCK (8)
1044#define AES_BLOCK (16)
1045#define AES_128_BLOCK (16)
1046#define AES_192_BLOCK (16)
1047#define AES_256_BLOCK (16)
1048#define ARC5_BLOCK (8)
1049
1050/* Operation modes */
1051
1052#define MODE_DEFAULT (0xFFFFFFFF)
1053#define MODE_NONE (0)
1054#define MODE_ECB (1 << 0)
1055#define MODE_CBC (1 << 1)
1056#define MODE_KWP (1 << 2)
1057#define MODE_OFB (1 << 3)
1058#define MODE_CTR (1 << 4)
1059#define MODE_GCM (1 << 5)
1060#define MODE_KW (1 << 6)
1062/* Operation directions */
1063
1064#define D_ENCRYPT (0 << 7)
1065#define D_DECRYPT (1 << 7)
1066
1067/* Asymmetric algorithms */
1068
1069#define ALG_RSA_512 (4)
1070#define ALG_RSA_1024 (5)
1071#define ALG_RSA_2048 (6)
1072#define ALG_RSA_4096 (11)
1073#define ALG_RSA_1152 (121)
1074#define ALG_RSA_1408 (122)
1075#define ALG_RSA_1536 (131)
1076#define ALG_RSA_1976 (130)
1077#define ALG_RSA_1984 (123)
1078#define ALG_RSA_8192 (124)
1079#define ALG_RSA_2304 (126)
1080#define ALG_RSA_2560 (127)
1081#define ALG_RSA_2816 (128)
1082#define ALG_RSA_3072 (129)
1083
1084#define ALG_DSA_2048 (150)
1085#define ALG_DSA_3072 (151)
1086
1087#define ALG_DH_RFC5114_2048 (152)
1088#define ALG_DH_RFC7919_2048 (153)
1089#define ALG_DH_RFC7919_3072 (154)
1090
1091#define ALG_OBJ_CSP (193)
1093#define ALG_ECX_ED25519 (201)
1094#define ALG_ECX_ED448 (202)
1095#define ALG_ECX_X25519 (203)
1096#define ALG_ECX_X448 (204)
1097
1098#define ALG_ECC_SECP112R1 (18) // SECG/WTLS curve over a 112 bit prime field
1099#define ALG_ECC_SECP112R2 (19) // SECG curve over a 112 bit prime field
1100#define ALG_ECC_SECP128R1 (20) // SECG curve over a 128 bit prime field
1101#define ALG_ECC_SECP128R2 (21) // SECG curve over a 128 bit prime field
1102#define ALG_ECC_SECP160K1 (22) // SECG curve over a 160 bit prime field
1103#define ALG_ECC_SECP160R1 (23) // SECG curve over a 160 bit prime field
1104#define ALG_ECC_SECP160R2 (24) // SECG/WTLS curve over a 160 bit prime field
1105#define ALG_ECC_SECP192K1 (25) // SECG curve over a 192 bit prime field
1106#define ALG_ECC_SECP192R1 (26) // NIST/X9.62/SECG curve over a 192 bit prime field
1107#define ALG_ECC_SECP224K1 (27) // SECG curve over a 224 bit prime field
1108#define ALG_ECC_SECP224R1 (28) // NIST/SECG curve over a 224 bit prime field
1109#define ALG_ECC_SECP256K1 (29) // SECG curve over a 256 bit prime field
1110#define ALG_ECC_SECP256R1 (30) // X9.62/SECG curve over a 256 bit prime field
1111#define ALG_ECC_SECP384R1 (31) // NIST/SECG curve over a 384 bit prime field
1112#define ALG_ECC_SECP521R1 (32) // NIST/SECG curve over a 521 bit prime field
1113#define ALG_ECC_X9_62_PRIME192V1 (ALG_ECC_SECP192R1)
1114#define ALG_ECC_X9_62_PRIME192V2 (33) // X9.62 curve over a 192 bit prime field
1115#define ALG_ECC_X9_62_PRIME192V3 (34) // X9.62 curve over a 192 bit prime field
1116#define ALG_ECC_X9_62_PRIME239V1 (35) // X9.62 curve over a 239 bit prime field
1117#define ALG_ECC_X9_62_PRIME239V2 (36) // X9.62 curve over a 239 bit prime field
1118#define ALG_ECC_X9_62_PRIME239V3 (37) // X9.62 curve over a 239 bit prime field
1119#define ALG_ECC_X9_62_PRIME256V1 (ALG_ECC_SECP256R1)
1120
1121#define ALG_ECC_BRAINPOOL_P160R1 (38) // RFC 5639 standard curves
1122#define ALG_ECC_BRAINPOOL_P160T1 (39)
1123#define ALG_ECC_BRAINPOOL_P192R1 (40)
1124#define ALG_ECC_BRAINPOOL_P192T1 (41)
1125#define ALG_ECC_BRAINPOOL_P224R1 (42)
1126#define ALG_ECC_BRAINPOOL_P224T1 (43)
1127#define ALG_ECC_BRAINPOOL_P256R1 (44)
1128#define ALG_ECC_BRAINPOOL_P256T1 (45)
1129#define ALG_ECC_BRAINPOOL_P320R1 (46)
1130#define ALG_ECC_BRAINPOOL_P320T1 (47)
1131#define ALG_ECC_BRAINPOOL_P384R1 (48)
1132#define ALG_ECC_BRAINPOOL_P384T1 (49)
1133#define ALG_ECC_BRAINPOOL_P512R1 (50)
1134#define ALG_ECC_BRAINPOOL_P512T1 (51)
1135
1136/* ECC bchain */
1137#define ALG_BLKC_BTC_MINI_KEY (1771)
1138#define ALG_BLKC_BIP32_SXPRIV (1772)
1139#define ALG_BLKC_BIP39_SXPRIV (1773)
1140#define ALG_BLKC_BIP32_XPRIV (1774)
1141#define ALG_BLKC_BIP32_ED25519_XPRIV (1775)
1142
1143/* blobs */
1144#define BLOB_TYPE (12)
1145#define ALG_OBJ_BLOB (12)
1146#define ALG_OBJ_BLOB_X509 (13)
1147#define ALG_OBJ_BLOB_PKCS7 (14)
1148#define ALG_OBJ_BLOB_CRL (15)
1149#define ALG_OBJ_BLOB_HOTP (16)
1150#define ALG_OBJ_BLOB_DPGO3 (17) /* TAC-PASS (Vasco Digipass GO3 Compatible) */
1151#define ALG_OBJ_MAP (90)
1152#define ALG_OBJ_EXT_MAP_2_OBJ (125)
1153
1154
1155/* Public key objects */
1156
1157#define ALG_OBJ_PUBKEY_BLOB (350)
1158#define ALG_OBJ_PUBKEY_RSA_BLOB (351) // pkcs1/oem
1159#define ALG_OBJ_PUBKEY_ECC_BLOB (352) // SubjectPublicKeyInfo
1160#define ALG_OBJ_PUBKEY_SPKI_RSA_BLOB (353) // SubjectPublicKeyInfo
1161#define ALG_OBJ_PUBKEY_ECC_Ed_BLOB (354) // SubjectPublicKeyInfo
1162#define ALG_OBJ_PUBKEY_ECC_X_BLOB (355) // SubjectPublicKeyInfo
1163#define ALG_OBJ_PUBKEY_DSA_BLOB (356) // SubjectPublicKeyInfo
1164#define ALG_OBJ_PUBKEY_DH_BLOB (357) // SubjectPublicKeyInfo
1165
1166/* HMAC objects */
1167
1168#define ALG_HMAC_MD5 (92)
1169#define ALG_HMAC_SHA1 (93)
1170#define ALG_HMAC_SHA2_256 (94)
1171#define ALG_HMAC_SHA2_384 (95)
1172#define ALG_HMAC_SHA2_512 (96)
1173#define ALG_HMAC_SHA2_224 (97)
1174#define ALG_HMAC_SHA3_224 (98)
1175#define ALG_HMAC_SHA3_256 (99)
1176#define ALG_HMAC_SHA3_384 (100)
1177#define ALG_HMAC_SHA3_512 (101)
1178
1179/* CMAC algorithms - DCreateHash Only */
1180
1181#define ALG_CMAC_AES (250)
1182#define ALG_CMAC_DES (251)
1183
1184
1185/* PKCS11 objects */
1186
1187#define ALG_PKCS11_MAP (120) // pkcs11 shell obj
1188
1189
1190
1191#define MAX_ALG_ID (ALG_OBJ_PUBKEY_SPKI_RSA_BLOB)
1192
1193
1194/* Public keys -> most significant bit of the DWORD must be set. */
1195
1196#define ALG_RSA_512_PUB (ALG_RSA_512 | 1 << 31)
1197#define ALG_RSA_1024_PUB (ALG_RSA_1024 | 1 << 31)
1198#define ALG_RSA_2048_PUB (ALG_RSA_2048 | 1 << 31)
1199#define ALG_RSA_4096_PUB (ALG_RSA_4096 | 1 << 31)
1200#define ALG_RSA_1152_PUB (ALG_RSA_1152 | 1 << 31)
1201#define ALG_RSA_1408_PUB (ALG_RSA_1408 | 1 << 31)
1202#define ALG_RSA_1536_PUB (ALG_RSA_1536 | 1 << 31)
1203#define ALG_RSA_1976_PUB (ALG_RSA_1976 | 1 << 31)
1204#define ALG_RSA_1984_PUB (ALG_RSA_1984 | 1 << 31)
1205#define ALG_RSA_8192_PUB (ALG_RSA_8192 | 1 << 31)
1206#define ALG_RSA_2304_PUB (ALG_RSA_2304 | 1 << 31)
1207#define ALG_RSA_2560_PUB (ALG_RSA_2560 | 1 << 31)
1208#define ALG_RSA_2816_PUB (ALG_RSA_2816 | 1 << 31)
1209#define ALG_RSA_3072_PUB (ALG_RSA_3072 | 1 << 31)
1210
1211#define ALG_ECX_ED25519_PUB (ALG_ECX_ED25519 | 1 << 31)
1212#define ALG_ECX_ED448_PUB (ALG_ECX_ED448 | 1 << 31)
1213#define ALG_ECX_X25519_PUB (ALG_ECX_X25519 | 1 << 31)
1214#define ALG_ECX_X448_PUB (ALG_ECX_X448 | 1 << 31)
1215
1216
1217#define ALG_ECC_SECP112R1_PUB (ALG_ECC_SECP112R1 | (1 << 31))
1218#define ALG_ECC_SECP112R2_PUB (ALG_ECC_SECP112R2 | (1 << 31))
1219#define ALG_ECC_SECP128R1_PUB (ALG_ECC_SECP128R1 | (1 << 31))
1220#define ALG_ECC_SECP128R2_PUB (ALG_ECC_SECP128R2 | (1 << 31))
1221#define ALG_ECC_SECP160K1_PUB (ALG_ECC_SECP160K1 | (1 << 31))
1222#define ALG_ECC_SECP160R1_PUB (ALG_ECC_SECP160R1 | (1 << 31))
1223#define ALG_ECC_SECP160R2_PUB (ALG_ECC_SECP160R2 | (1 << 31))
1224#define ALG_ECC_SECP192K1_PUB (ALG_ECC_SECP192K1 | (1 << 31))
1225#define ALG_ECC_SECP192R1_PUB (ALG_ECC_SECP192R1 | (1 << 31))
1226#define ALG_ECC_SECP224K1_PUB (ALG_ECC_SECP224K1 | (1 << 31))
1227#define ALG_ECC_SECP224R1_PUB (ALG_ECC_SECP224R1 | (1 << 31))
1228#define ALG_ECC_SECP256K1_PUB (ALG_ECC_SECP256K1 | (1 << 31))
1229#define ALG_ECC_SECP256R1_PUB (ALG_ECC_SECP256R1 | (1 << 31))
1230#define ALG_ECC_SECP384R1_PUB (ALG_ECC_SECP384R1 | (1 << 31))
1231#define ALG_ECC_SECP521R1_PUB (ALG_ECC_SECP521R1 | (1 << 31))
1232#define ALG_ECC_X9_62_PRIME192V1_PUB (ALG_ECC_SECP192R1_PUB)
1233#define ALG_ECC_X9_62_PRIME192V2_PUB (ALG_ECC_X9_62_PRIME192V2 | (1 << 31))
1234#define ALG_ECC_X9_62_PRIME192V3_PUB (ALG_ECC_X9_62_PRIME192V3 | (1 << 31))
1235#define ALG_ECC_X9_62_PRIME239V1_PUB (ALG_ECC_X9_62_PRIME239V1 | (1 << 31))
1236#define ALG_ECC_X9_62_PRIME239V2_PUB (ALG_ECC_X9_62_PRIME239V2 | (1 << 31))
1237#define ALG_ECC_X9_62_PRIME239V3_PUB (ALG_ECC_X9_62_PRIME239V3 | (1 << 31))
1238#define ALG_ECC_X9_62_PRIME256V1_PUB (ALG_ECC_SECP256R1_PUB)
1239
1240#define ALG_ECC_BRAINPOOL_P160R1_PUB (ALG_ECC_BRAINPOOL_P160R1 | (1 << 31))
1241#define ALG_ECC_BRAINPOOL_P160T1_PUB (ALG_ECC_BRAINPOOL_P160T1 | (1 << 31))
1242#define ALG_ECC_BRAINPOOL_P192R1_PUB (ALG_ECC_BRAINPOOL_P192R1 | (1 << 31))
1243#define ALG_ECC_BRAINPOOL_P192T1_PUB (ALG_ECC_BRAINPOOL_P192T1 | (1 << 31))
1244#define ALG_ECC_BRAINPOOL_P224R1_PUB (ALG_ECC_BRAINPOOL_P224R1 | (1 << 31))
1245#define ALG_ECC_BRAINPOOL_P224T1_PUB (ALG_ECC_BRAINPOOL_P224T1 | (1 << 31))
1246#define ALG_ECC_BRAINPOOL_P256R1_PUB (ALG_ECC_BRAINPOOL_P256R1 | (1 << 31))
1247#define ALG_ECC_BRAINPOOL_P256T1_PUB (ALG_ECC_BRAINPOOL_P256T1 | (1 << 31))
1248#define ALG_ECC_BRAINPOOL_P320R1_PUB (ALG_ECC_BRAINPOOL_P320R1 | (1 << 31))
1249#define ALG_ECC_BRAINPOOL_P320T1_PUB (ALG_ECC_BRAINPOOL_P320T1 | (1 << 31))
1250#define ALG_ECC_BRAINPOOL_P384R1_PUB (ALG_ECC_BRAINPOOL_P384R1 | (1 << 31))
1251#define ALG_ECC_BRAINPOOL_P384T1_PUB (ALG_ECC_BRAINPOOL_P384T1 | (1 << 31))
1252#define ALG_ECC_BRAINPOOL_P512R1_PUB (ALG_ECC_BRAINPOOL_P512R1 | (1 << 31))
1253#define ALG_ECC_BRAINPOOL_P512T1_PUB (ALG_ECC_BRAINPOOL_P512T1 | (1 << 31))
1254
1255/* Binary objects */
1256
1257#define ALG_OBJ_INVALID_TYPE (0)
1258#define ALG_OBJ_NULL (ALG_OBJ_INVALID_TYPE)
1259#define ALG_OBJ (12)
1260#define OBJ_BLOCK (1)
1261
1262
1263/* RSA module sizes */
1264#define RSA_512_LEN (64)
1265#define RSA_1024_LEN (128)
1266#define RSA_2048_LEN (256)
1267#define RSA_4096_LEN (512)
1268#define RSA_1152_LEN (144)
1269#define RSA_1408_LEN (176)
1270#define RSA_1536_LEN (192)
1271#define RSA_1976_LEN (247)
1272#define RSA_1984_LEN (248)
1273#define RSA_8192_LEN (1024)
1274#define RSA_2304_LEN (288)
1275#define RSA_2560_LEN (320)
1276#define RSA_2816_LEN (352)
1277#define RSA_3072_LEN (384)
1278
1279#define RSA_512_PUB_LEN (RSA_512_LEN * 2)
1280#define RSA_1024_PUB_LEN (RSA_1024_LEN * 2)
1281#define RSA_2048_PUB_LEN (RSA_2048_LEN * 2)
1282#define RSA_4096_PUB_LEN (RSA_4096_LEN * 2)
1283#define RSA_1152_PUB_LEN (RSA_1152_LEN * 2)
1284#define RSA_1408_PUB_LEN (RSA_1408_LEN * 2)
1285#define RSA_1536_PUB_LEN (RSA_1536_LEN * 2)
1286#define RSA_1976_PUB_LEN (RSA_1976_LEN * 2)
1287#define RSA_1984_PUB_LEN (RSA_1984_LEN * 2)
1288#define RSA_8192_PUB_LEN (RSA_8192_LEN * 2)
1289#define RSA_2304_PUB_LEN (RSA_2304_LEN * 2)
1290#define RSA_2560_PUB_LEN (RSA_2560_LEN * 2)
1291#define RSA_2816_PUB_LEN (RSA_2816_LEN * 2)
1292#define RSA_3072_PUB_LEN (RSA_3072_LEN * 2)
1293
1294#define MAX_RSA_PUB_LEN RSA_8192_PUB_LEN
1295#define MAX_RSA_LEN RSA_8192_LEN
1296
1297
1298/* ECC key sizes (bits) */
1299#define ECC_SECP112R1_LEN (112)
1300#define ECC_SECP112R2_LEN (112)
1301#define ECC_SECP128R1_LEN (128)
1302#define ECC_SECP128R2_LEN (128)
1303#define ECC_SECP160K1_LEN (160)
1304#define ECC_SECP160R1_LEN (160)
1305#define ECC_SECP160R2_LEN (160)
1306#define ECC_SECP192K1_LEN (192)
1307#define ECC_SECP192R1_LEN (192)
1308#define ECC_SECP224K1_LEN (224)
1309#define ECC_SECP224R1_LEN (224)
1310#define ECC_SECP256K1_LEN (256)
1311#define ECC_SECP256R1_LEN (256)
1312#define ECC_SECP384R1_LEN (384)
1313#define ECC_SECP521R1_LEN (521)
1314#define ECC_X9_62_PRIME192V1_LEN (ECC_SECP192R1_LEN)
1315#define ECC_X9_62_PRIME192V2_LEN (192)
1316#define ECC_X9_62_PRIME192V3_LEN (192)
1317#define ECC_X9_62_PRIME239V1_LEN (239)
1318#define ECC_X9_62_PRIME239V2_LEN (239)
1319#define ECC_X9_62_PRIME239V3_LEN (239)
1320#define ECC_X9_62_PRIME256V1_LEN (ECC_SECP256R1_LEN)
1321
1322#define ECC_BRAINPOOL_P160R1_LEN (160) // RFC 5639 standard curves
1323#define ECC_BRAINPOOL_P160T1_LEN (160)
1324#define ECC_BRAINPOOL_P192R1_LEN (192)
1325#define ECC_BRAINPOOL_P192T1_LEN (192)
1326#define ECC_BRAINPOOL_P224R1_LEN (224)
1327#define ECC_BRAINPOOL_P224T1_LEN (224)
1328#define ECC_BRAINPOOL_P256R1_LEN (256)
1329#define ECC_BRAINPOOL_P256T1_LEN (256)
1330#define ECC_BRAINPOOL_P320R1_LEN (320)
1331#define ECC_BRAINPOOL_P320T1_LEN (320)
1332#define ECC_BRAINPOOL_P384R1_LEN (384)
1333#define ECC_BRAINPOOL_P384T1_LEN (384)
1334#define ECC_BRAINPOOL_P512R1_LEN (512)
1335#define ECC_BRAINPOOL_P512T1_LEN (512)
1336
1337#define ECC_Ed25519_LEN (256)
1338#define ECC_Ed448_LEN (448)
1339#define ECC_X25519_LEN (256)
1340#define ECC_X448_LEN (448)
1341
1342/* Initialization vector sizes */
1343
1344#define DES_IV_LEN (8)
1345#define AES_IV_LEN (16)
1346
1347/* Padding */
1348
1349#define D_DEFAULT_PADDING (0xFFFFFFFF) // Placeholder for default padding
1350#define D_NO_PADDING (0)
1351#define D_PKCS5_PADDING (1)
1352#define D_ZERO_PADDING (2)
1353#define D_OAEP_PADDING (3)
1354#define D_OAEP_SHA1_PADDING (D_OAEP_PADDING)
1355#define D_PKCS1_PADDING (4)
1356#define D_PSS_PADDING (5)
1357#define D_X931_PADDING (6)
1358#define D_PSS_SALT_LEN_MD_PADDING (7)
1359#define D_OAEP_SHA2_256_PADDING (8)
1360
1361
1362/* Key Blobs */
1363
1364#define PRIVATEKEY_BLOB (1)
1365#define PUBLICKEY_BLOB (2)
1366#define SIMPLE_BLOB (3)
1367#define PLAINTEXTKEY_BLOB (4)
1368#define RAW_BLOB (5) //Deprecated
1369#define HOTP_BLOB (6)
1370#define SIMPLE_BLOB_OAEP (7)
1371#define SIMPLE_BLOB_PKCS1 (SIMPLE_BLOB)
1372#define PUBLICKEY_BLOB_X509 (8)
1373#define SYM_WRAPPED_KEY_BLOB (9)
1374#define OPAQUE_BLOB (10)
1375#define PUBLICKEY_BLOB_HSM (11)
1376#define PUBLICKEY_RSA_PARTS_HSM (12)
1377#define PRIVATEKEY_BLOB_P8 (13)
1378#define PRIVATEKEY_BLOB_STRICT (14)
1379#define SYM_WRAPPED_KEY_BLOB_P11 (15)//Importkey only
1380#define WRAPPED_KEY_BLOB (16)
1381#define PRIVATE_RSA_KEY_INFO (17)
1382#define WRAPPED_KEY_BLOB_P8 (18)
1383
1384
1385
1386/* Pkcs11 Blobs */
1387#define P11_BLOB (1)
1388
1389/* Pkcs11 Update Flags */
1390
1391#define UPDATE_P11_target ( 1 << 0 )
1392#define UPDATE_P11_associate ( 1 << 1 )
1393#define UPDATE_P11_Class ( 1 << 2 )
1394#define UPDATE_P11_App ( 1 << 3 )
1395#define UPDATE_P11_Id ( 1 << 4 )
1396#define UPDATE_P11_Label ( 1 << 5 )
1397#define UPDATE_P11_Trusted ( 1 << 6 )
1398#define UPDATE_P11_WrapWithTrusted ( 1 << 7 )
1399#define UPDATE_P11_Local ( 1 << 8 )
1400#define UPDATE_P11_CertificateCategory ( 1 << 9 )
1401#define UPDATE_P11_JavaMidpSecDomain ( 1 << 10 )
1402#define UPDATE_P11_KeyGenMechanism ( 1 << 11 )
1403
1404/* Key types */
1405
1406/* DGenerateKey DImportKey and related */
1407/* Flags */
1408#define EXPORTABLE_KEY (0x00000001) // Mark the key as exportable.
1409#define NO_CRYPTO (0x00000002) // The key will not be encrypted inside the HSM. Deprecated in newer versions.
1410#define TEMPORARY_KEY (0x00000004) // Mark key as temporary. Key will exist while the session exists. (default in ImportKey).
1411#define PERMANENT_KEY (0x00000008) // The key will be persistent in the HSM. (default in GenerateKey and ImportKeyPart).
1412#define RSA_PUB_EXP3 (0x00000800) // Use exponent 0x03 when generating a RSA key pair
1413#define MOD_SPB_RELATED (0x00001000) // Mark as mod_SPB related object
1414#define TSP_KEY (0x00002000) // TSP keys: don't replicate, export, backup, etc;
1415#define BCHAIN_KEY (0x00004000) // BChain keys: PBKs are handled specially, etc;
1416#define HSM_LOCAL_GEN (0x00008000) // set on HSM generated keys;
1417
1418// Attribute Usage-profile
1419#define AUP_DIG_SIG (0x01000000) // signature generation/verification
1420#define AUP_DATA_CRYPTO (0x02000000) // data encryption/decryption
1421#define AUP_KeK (0x03000000) // key wrapping/unwrapping
1422#define AUP_MAC (0x04000000) // MAC generation/verification
1423#define AUP_KDF (0x05000000) // key derivation function
1424#define AUP_CRYPTOGRAM (0x06000000) // cryptogram generation/verification
1425#define AUP_KEY_TRANSLATE (0x07000000) // key translation
1426#define AUP_EFT_CVK (0x08000000) // CVV generation/verification
1427#define AUP_EFT_VISA_PVK (0x09000000) // PVV generation
1428#define AUP_EFT_IBM_3624 (0x0a000000) // PIN generation/validation
1429#define AUP_EFT_PEK (0x0b000000) // PIN encryption/decryption
1430#define AUP_EFT_BDK (0x0c000000) // DUKPT
1431#define AUP_EFT_IPEK (0x0d000000) // DUKPT IPEK
1432#define AUP_EMV_IMK (0x0e000000) // ICC MK, IDN derivation
1433#define AUP_EMV_IMKDAC (0x0f000000) // ICC DAC derivation
1434#define AUP_EMV_IMKENC (0x10000000) // ICC data encryption - PinBlock
1435#define AUP_EMV_IMKMAC (0x11000000) // ICC data cryptogram - EmvMac
1436#define AUP_EMV_KeK (0x12000000) // ICC MK wrapping
1437#define AUP_EMV_IMKKDF (0x13000000) // EMV key derivation
1438#define AUP_EMV_IMKACRYPTO (0x14000000) // ARPC calculation
1439#define AUP_EFT_KeK (0x15000000) // EFT key wrapping/unwrapping
1440#define AUP_EMV_DIG_SIG (0x16000000) // EMV signature generation/verification
1441#define AUP_EFT_TR31_KBPK (0x17000000) // TR31 key-block protection key
1442#define AUP_EFT_TR34_PK (0x18000000) // TR34 sign/envelope
1443#define AUP_SPB_PK (0x19000000) // Brazilian National banking system sig gen/verify and key-wrapping key
1444
1445#define AUP_RESERVED_MASK (0xFF000000) // Mask of reserved Usage profile bits.
1446
1447/* DRemoveKey */
1448#define REMOVE_FROM_HSM (0x00000020) // Erase a key from the HSM and destroys it's handle.
1449#define REMOVE_FROM_HCM (REMOVE_FROM_HSM) // DEPRECATED. use REMOVE_FROM_HSM
1450
1451/* SetKeyParam/GetKeyParam */
1452
1453#define DKP_ALGID (1) /* Key algorithm ID. pbData == nAlgId */
1454#define DKP_IV (2) /* Initialization Vector. pbData == pbIV */
1455#define DKP_PADDING (3) /* Padding format. pbData == dwPadding */
1456#define DKP_MODE (4) /* Operation mode. pbData == dwOpMode */
1457#define DKP_OWNER (5) /* Key owner. pbData == szUserId (separated by ";" ) */
1458#define DKP_USER (6) /* Key user. pbData == szUserId (separated by ";" )*/
1459#define DKP_READ_LOCK (7) /* Key read lock status. pbData == NULL */
1460#define DKP_ENCRYPTED (8) /* Encrypted object. */
1461#define DKP_KEYLEN (9) /* Key size (bytes). */
1462#define DKP_TEMPORARY_KEY (10) /* Temporary key. pbData == dwTempKey */
1463#define DKP_MAP_VALUE (11) /* Values of a MAP object.pbData == MAP_2_OBJ_INFO*/
1464#define DKP_BLOCKED (12) /* Block object. pbData == nBlocked (TRUE|FALSE)*/
1465#define DKP_CERT_X509_INFO (13) /* Returns information of a x.509 certificate. pbData == CERT_X509_INFO */
1466#define DKP_SESSION (14) /* Session associated to the key handle. pbData == HSESSIONCTX */
1467#define DKP_KEY_ID (15) /* Key name associated to the key handle. pbData == szKeyId */
1468#define DKP_PUB_KEY_EXP (16) /* Public exponent for the key. pbData == DBLOB */
1469#define DKP_SP80057_INFO (17) /* Object's SP80057 info. pbData == OBJ_SP80057_INFO */
1470#define DKP_KEY_INFO (18) /* Key info. pbData == GET_USR_KEY_OFFLINE */
1471#define DKP_BLOCK_SIZE (19) /* Key block size (bytes). */
1472#define DKP_OBJ_ATTRIBUTES (20) /* Object attributes. pbData == DWORD */
1473#define DKP_OBJ_STATS (21) /* Object statistics. pbData == DN_OBJ_STATS */
1474
1475//Flags
1476#define REMOVE_ATTRIBUTE (0x00000040)
1477
1478/* SetHashParam/GetHashParam */
1479
1480#define DHP_ALGID (1) /* Hash algorithm. */
1481#define DHP_HASH_VALUE (2) /* Hash value. */
1482#define DHP_HASH_SIZE (4) /* Hash size (bytes). */
1483#define DHP_RESET (5) /* Reset hash state. */
1484
1485/* HashSessionKey */
1486
1487#define DHS_LITTLE_ENDIAN (1)
1488
1489/* DSetObjParam */
1490#define OP_OBJ_BLOCKED (1) /* User blocked */
1491#define OP_OBJ_UNBLOCKED (2) /* Used unblocked */
1492
1493/* LogParam */
1494
1495#define LP_LOG_PATH (0x00000001) /* Log file full path. */
1496#define LP_LOG_LEVEL (0x00000002) /* Log level. */
1497
1498#define LOG_ERROR_LEVEL (0)
1499#define LOG_DEBUG_LEVEL (3)
1500
1501#define LOG_DISABLED_LEVEL (1000)
1502
1503/*
1504 DGetHSMLogInit
1505 Remote log start and offset options
1506*/
1507
1508#define GET_LOG_START_FULL (0x00000000) //Deprecated - Use RLOG_GET_LOG_START_FULL instead.
1509#define GET_LOG_END_FULL (0x00000000) //Deprecated - Use RLOG_GET_LOG_END_FULL instead.
1510
1511#define RLOG_GET_LOG_START_FULL (0x00000000)
1512#define RLOG_GET_LOG_END_FULL (0x00000000)
1513
1514#define RLOG_GET_ZLOG_START_FULL (RLOG_GET_LOG_START_FULL)
1515#define RLOG_GET_ZLOG_END_FULL (0xFFFFFFFF)
1516
1517// Set both to get full compressed OEM log (pkzip format).
1518#define RLOG_GET_OEM_ZLOG_START_FULL (RLOG_GET_LOG_START_FULL)
1519#define RLOG_GET_OEM_ZLOG_END_FULL (RLOG_GET_ZLOG_END_FULL -1)
1520
1521
1522/* Permissions */
1523
1524#define ACL_NOP (0x00000000) // "may the Force be with ya'!"
1525#define ACL_OBJ_DEL (ACL_NOP + 1) // delete objects
1526#define ACL_OBJ_READ (ACL_OBJ_DEL << 1) // read obj content
1527#define ACL_OBJ_LIST (ACL_OBJ_READ) // list usr objs
1528#define ACL_OBJ_CREATE (ACL_OBJ_DEL << 2) // create obj
1529#define ACL_OBJ_UPDATE (ACL_OBJ_DEL << 3) // update obj (hdr and alike)
1530#define ACL_OBJ_WRITE (ACL_OBJ_UPDATE) // update obj
1531#define ACL_USR_CREATE (ACL_OBJ_DEL << 4) // create usr
1532#define ACL_USR_DELETE (ACL_USR_CREATE) // makes no sense only to create
1533#define ACL_USR_REMOTE_INFO (ACL_OBJ_DEL << 5) // can usr use remote log/info?
1534#define ACL_USR_LIST (ACL_OBJ_DEL << 6) // can usr get user-list?
1535#define ACL_SYS_OPERATOR (ACL_OBJ_DEL << 7) // operate as master (adm mode)
1536#define ACL_SYS_BACKUP (ACL_OBJ_DEL << 8) // extract full appliance backup
1537#define ACL_SYS_RESTORE (ACL_SYS_BACKUP) // restore full appliance backup
1538#define ACL_SYS_UDATE_HSM (ACL_OBJ_DEL << 9) // firmware and stuff like that
1539#define ACL_NS_AUTHORIZATION (ACL_OBJ_DEL << 10) // user must be authorized with "m of n"
1540#define ACL_LOCAL_CRYPTO (ACL_OBJ_DEL << 11) // user keys crypto ops must be done locally
1541#define ACL_VIRTUAL_X509_AUTH (ACL_OBJ_DEL << 28) // presence means SA (user must use 2F PKI)
1542#define ACL_VIRTUAL_OTP_AUTH (ACL_OBJ_DEL << 29) // presence means SA (user must use 2-F OTP)
1543#define ACL_CHANGE_PWD_NEXT_TIME (ACL_OBJ_DEL << 30) // can force usrs to change pwd on next login
1544
1545// Deprecated use ACL_USR_REMOTE_INFO
1546#define ACL_USR_REMOTE_LOG ACL_USR_REMOTE_INFO
1547
1548#define ACL_DEFAULT_OWNER (ACL_OBJ_DEL | ACL_OBJ_READ | ACL_OBJ_CREATE | \
1549 ACL_OBJ_UPDATE)
1550
1551#define ACL_SYS_PERMISSIONS (ACL_USR_CREATE | ACL_USR_REMOTE_INFO | ACL_USR_LIST | \
1552 ACL_SYS_OPERATOR | ACL_SYS_BACKUP | \
1553 ACL_SYS_UDATE_HSM)
1554
1555#define ACL_CREATION_TIME_ONLY (ACL_NS_AUTHORIZATION | ACL_LOCAL_CRYPTO)
1556
1557// DNSAuthSetState
1558
1559//
1560// NSAuth specific ACLs; NSAuth always grants ACL_OBJ_READ by default;
1561//
1562#define NSAUTH_ACL_NOP (ACL_NOP)
1563#define NSAUTH_ACL_OBJ_OPEN (ACL_OBJ_READ)
1564#define NSAUTH_ACL_OBJ_EXPORT (ACL_OBJ_CREATE)
1565#define NSAUTH_ACL_OBJ_DEL (ACL_OBJ_DEL)
1566#define NSAUTH_ACL_OBJ_BLOCK (ACL_OBJ_UPDATE)
1567#define NSAUTH_ACL_NS_DEL (ACL_USR_DELETE)
1568
1569/* DGenerateCVV/DVerifyCVV */
1570
1571#define MIN_CVV_LEN (3 + 1)
1572#define MAX_PAN_LEN (24 + 1)
1573#define MAX_EXP_DATE_LEN (4 + 1)
1574#define MAX_SVC_LEN (3 + 1)
1575
1576/* DEFTExportTR31 */
1577
1578// A.5.1, Table 6, inverted (little-endian);
1579#define EFT_ME_TR31_EXP_USAGE_AUTO (0x0000)
1580#define EFT_ME_TR31_EXP_USAGE_B0 (0x3042)
1581#define EFT_ME_TR31_EXP_USAGE_B1 (0x3142)
1582#define EFT_ME_TR31_EXP_USAGE_B2 (0x3242)
1583#define EFT_ME_TR31_EXP_USAGE_C0 (0x3043)
1584#define EFT_ME_TR31_EXP_USAGE_D0 (0x3044)
1585#define EFT_ME_TR31_EXP_USAGE_D1 (0x3144)
1586#define EFT_ME_TR31_EXP_USAGE_D2 (0x3244)
1587#define EFT_ME_TR31_EXP_USAGE_E0 (0x3045)
1588#define EFT_ME_TR31_EXP_USAGE_E1 (0x3145)
1589#define EFT_ME_TR31_EXP_USAGE_E2 (0x3245)
1590#define EFT_ME_TR31_EXP_USAGE_E3 (0x3345)
1591#define EFT_ME_TR31_EXP_USAGE_E4 (0x3445)
1592#define EFT_ME_TR31_EXP_USAGE_E5 (0x3545)
1593#define EFT_ME_TR31_EXP_USAGE_E6 (0x3645)
1594#define EFT_ME_TR31_EXP_USAGE_I0 (0x3049)
1595#define EFT_ME_TR31_EXP_USAGE_K0 (0x304B)
1596#define EFT_ME_TR31_EXP_USAGE_K1 (0x314B)
1597#define EFT_ME_TR31_EXP_USAGE_K2 (0x324B)
1598#define EFT_ME_TR31_EXP_USAGE_K3 (0x334B)
1599#define EFT_ME_TR31_EXP_USAGE_M0 (0x304D)
1600#define EFT_ME_TR31_EXP_USAGE_M1 (0x314D)
1601#define EFT_ME_TR31_EXP_USAGE_M2 (0x324D)
1602#define EFT_ME_TR31_EXP_USAGE_M3 (0x334D)
1603#define EFT_ME_TR31_EXP_USAGE_M4 (0x344D)
1604#define EFT_ME_TR31_EXP_USAGE_M5 (0x354D)
1605#define EFT_ME_TR31_EXP_USAGE_M6 (0x364D)
1606#define EFT_ME_TR31_EXP_USAGE_M7 (0x374D)
1607#define EFT_ME_TR31_EXP_USAGE_M8 (0x384D)
1608#define EFT_ME_TR31_EXP_USAGE_P0 (0x3050)
1609#define EFT_ME_TR31_EXP_USAGE_S0 (0x3053)
1610#define EFT_ME_TR31_EXP_USAGE_S1 (0x3153)
1611#define EFT_ME_TR31_EXP_USAGE_S2 (0x3253)
1612#define EFT_ME_TR31_EXP_USAGE_V0 (0x3056)
1613#define EFT_ME_TR31_EXP_USAGE_V1 (0x3156)
1614#define EFT_ME_TR31_EXP_USAGE_V2 (0x3256)
1615#define EFT_ME_TR31_EXP_USAGE_V3 (0x3356)
1616#define EFT_ME_TR31_EXP_USAGE_V4 (0x3456)
1617
1618// A.5.3, Table 8
1619#define EFT_ME_TR31_EXP_MODE_AUTO (0x00)
1620#define EFT_ME_TR31_EXP_MODE_B (0x42)
1621#define EFT_ME_TR31_EXP_MODE_C (0x43)
1622#define EFT_ME_TR31_EXP_MODE_D (0x44)
1623#define EFT_ME_TR31_EXP_MODE_E (0x45)
1624#define EFT_ME_TR31_EXP_MODE_G (0x47)
1625#define EFT_ME_TR31_EXP_MODE_N (0x4E)
1626#define EFT_ME_TR31_EXP_MODE_S (0x53)
1627#define EFT_ME_TR31_EXP_MODE_T (0x55)
1628#define EFT_ME_TR31_EXP_MODE_V (0x56)
1629#define EFT_ME_TR31_EXP_MODE_X (0x58)
1630#define EFT_ME_TR31_EXP_MODE_Y (0x59)
1631
1632// A.5.5, Table 10
1633#define EFT_ME_TR31_EXP_AUTO (0x00)
1634#define EFT_ME_TR31_EXP_X9_24 (0x45) // ANSI X9.24 approved kek form
1635#define EFT_ME_TR31_EXP_NON_EXPORTABLE (0x4E)
1636#define EFT_ME_TR31_EXP_KEK_EXPORTABLE (0x53)
1637
1638/* DGeneratePVV */
1639
1640#define EFT_MIN_PVKI (0x00)
1641#define EFT_MAX_PVKI (0x06)
1642#define EFT_PVV_LEN (4)
1643
1644/* DGeneratePIN */
1645
1646#define GP_DEFAULT_PIN (1)
1647#define GP_USER_DEF_PIN (2)
1648#define GP_RANDOM_PIN (3)
1649
1650/* DEFTExportKey/DEFTKeKImport */
1651
1652#define EK_EFT_KEK_EXPORT_RAW (1) // BLOB() == envelope + checksum[3];
1653#define EK_EFT_KEK_EXPORT_VISA1 (2) // Variant-1 ZCMK, BLOB() == envelope + checksum[3];
1654#define EK_EFT_KEK_EXPORT_LMK (3) // BLOB() == 3DES_CBC(SVMK, Key)
1655#define EK_EFT_KEK_EXPORT_JCB (4) // BLOB() == envelope + checksum[8];
1656
1657/* DPINBlockTranslate */
1658
1659// translate types
1660#define TP_TRANSLATE_TYPE_AUTO (0xFF)
1661#define TP_TRANSLATE_TYPE_IBM_3624 (0x36)
1662#define TP_TRANSLATE_TYPE_ISO_0 (1) // == VISA 1; HSM default
1663#define TP_TRANSLATE_TYPE_ISO_1 (2)
1664#define TP_TRANSLATE_TYPE_ISO_3 (3)
1665
1666/* Other constants */
1667
1668#define MAX_USR_PWD (16)
1669#define MAX_USR_LEN (16)
1670#define MAX_CN_LEN (256)
1671#define MAX_PATH_LEN (256)
1672#define MAX_MODULE_NAME_LEN (128)
1673#define MAX_MODULE_VERSION_LEN (32)
1674#define MAX_ADDR_LEN (128)
1675#define MAX_CHANNEL_CIPHER_NAME_LEN (128)
1676#define MIN_PIN_LEN (8)
1677#define MIN_BACKUP_OBJ_PIN_LEN (8)
1678#define MAX_BACKUP_OBJ_PIN_LEN (32)
1679#define MIN_BACKUP_PIN_LEN (8)
1680#define MAX_BACKUP_PIN_LEN (32)
1681#define MAX_OBJ_NAME_LEN (32)
1682#define MAX_PIN_LEN (6)
1683#define MAX_MODULE_NAME_VERSION_LEN (1024)
1684#define MAX_IP_LEN (15)
1685#define MAX_NET_NAME (16)
1686#define MAX_HOTP_PIN (4)
1687#define MAX_HOTP_IMEI (24)
1688#define MAX_HOTP_APP_NAME (13)
1689#define MAX_HOTP_LOGO_LEN (1632)
1690#define MAX_P11_OBJ_ID (128)
1691#define MAX_OBJ_ID_BIN_LEN (32 + 1)
1692#ifndef MAX_OBJ_ID
1693#define MAX_OBJ_ID MAX_OBJ_ID_BIN_LEN
1694#endif
1695#ifndef MAX_OBJ_ID_LEN
1696#define MAX_OBJ_ID_LEN (MAX_USR_LEN + 1 + MAX_OBJ_ID)
1697#endif
1698#ifndef MAX_OBJ_ID_FQN_LEN
1699#define MAX_OBJ_ID_FQN_LEN (MAX_OBJ_ID_LEN)
1700#endif
1701#define MAX_P11_DATE_TXT (8)
1702#define MIN_EFT_PIN_LEN (4)
1703#define MAX_EFT_PIN_LEN (12)
1704#define MIN_KSI_LEN (5)
1705#define MIN_CTR_LEN (5)
1706#define MAX_HSM_DOMAIN_NAME (32)
1707#define MAX_HSM_MODEL_NAME (32)
1708#define MAX_HSM_ID_NAME (32)
1709
1710
1711/* MOD EFT*/
1712
1713#define EFT_AES_KEY_CHECKSUM_LEN (3)
1714#define EFT_VISA_KEY_CHECKSUM_LEN (3)
1715#define EFT_JCB_KEY_CHECKSUM_LEN (8)
1716#define EFT_EXP_DATE_LEN (4)
1717
1718#define EFT_EMV_SDA_SEQ_LEN (2)
1719#define EFT_EMV_SDA_DAC_LEN (2)
1720#define EFT_EMV_ARC_LEN (2)
1721#define EFT_EMV_CSU_LEN (4)
1722#define EFT_EMV_PAD_LEN (8)
1723
1724#define EFT_EMV_IDN_LEN (2)
1725#define EFT_EMV_IDN_ATC_LEN (2)
1726#define EFT_EMV_IDN_UN_LEN (4)
1727
1728#define EFT_EMV_CSR_VISA_TRACK_NUM_LEN (3)
1729#define EFT_EMV_CSR_VISA_SERVICE_ID_LEN (4)
1730#define EFT_EMV_CSR_VISA_ISSUER_ID_LEN (4)
1731#define EFT_EMV_CSR_VISA_PUB_KEY_INDEX_LEN (3)
1732
1733#define EFT_EMV_CSR_VISA_HASH_SIZE (20)
1734#define EFT_EMV_CSR_MASTER_HASH_SIZE (28)
1735
1736
1737
1738/* DGenerateICCMK */
1739
1740#define EFT_EMV_GEN_ICC_MK_OP_CBC_EXP (0x01)
1741#define EFT_EMV_GEN_ICC_MK_OP_ECB_EXP (0x02)
1742
1743/* DMAC_ISO9797_1_Met2*/
1744
1745#define EMV_MAC_TYPE_ALG1 (1)
1746#define EMV_MAC_TYPE_ALG3 (2)
1747
1748/* DGenerateEMV_MAC/DGenerateEMV_HMAC/DCalculateARPC */
1749
1750#define EMV_OP_ISO_9797_1_M2_COMMON (0x01)
1751#define EMV_OP_ISO_9797_1_M2_MCHIP (0x02)
1752#define EMV_OP_ISO_9797_1_M2_VISA (0x03)
1753#define EMV_OP_ISO_9797_1_M2_VISA_CRYPTOGRAM (0x04)
1754#define EMV_OP_ISO_9797_1_M2_VISA_ICC_V1_4_PAN_AUTO (0x05)
1755#define EMV_OP_ISO_9797_1_M2_RAW (0x06)
1756#define EMV_OP_ISO_9797_1_M1_VISA_CRYPTOGRAM_PADD_V10 (0x7F)
1757#define EMV_OP_ISO_9797_1_M2_ELO (0x07)
1758#define EMV_OP_ISO_9797_1_M2_JCB (0x08)
1759#define EMV_OP_ISO_9797_1_M1_JCB (0x09)
1760#define EMV_OP_ISO_9797_1_M1_JCB_CRYPTOGRAM (0x0A)
1761
1762/* DGenerateDDA_ICCCert */
1763
1764#define EFT_EMV_DDA_OP_RSA_SIGN1 (0x01) // rsa + sha1
1765
1766/* DGenerateEMV_CSR */
1767
1768#define EFT_EMV_OP_CSR_VISA (0x01)
1769#define EFT_EMV_OP_CSR_MASTER (0x02)
1770#define EFT_EMV_OP_CSR_ELO (0x03)
1771#define EFT_EMV_OP_CSR_JCB (0x04)
1772
1773
1774/* DGenerateISO9796Cert2 */
1775
1776#define CORE_P_ISO_9796_USER_ID_LEN (32)
1777#define CORE_P_ISO_9796_USER_NAME_LEN (32)
1778#define CORE_P_ISO_9796_KEY_LEN (512) // 128
1779#define CORE_P_ISO_9796_MIN_KEY_LEN (64)
1780#define CORE_P_ISO_9796_EXPONENT_LEN (8)
1781#define CORE_P_ISO_9796_MIN_EXPONENT_LEN (1)
1782
1783
1784/* DGenerateEMV_PinBlock */
1785
1786#define PBC_EMV_PIN_BLOCK_OP_COMMON (EMV_OP_ISO_9797_1_M2_COMMON)
1787#define PBC_EMV_PIN_BLOCK_OP_MCHIP (EMV_OP_ISO_9797_1_M2_MCHIP)
1788#define PBC_EMV_PIN_BLOCK_OP_VISA (EMV_OP_ISO_9797_1_M2_VISA)
1789#define PBC_EMV_PIN_BLOCK_OP_VISA_CRYPTOGRAM (EMV_OP_ISO_9797_1_M2_VISA_CRYPTOGRAM)
1790#define PBC_EMV_PIN_BLOCK_OP_ELO (EMV_OP_ISO_9797_1_M2_ELO)
1791#define PBC_EMV_PIN_BLOCK_OP_JCB (EMV_OP_ISO_9797_1_M2_JCB)
1792
1793#define PBC_EMV_PIN_BLOCK_MAX_OUTPUT (64)
1794
1795
1796/* DDeriveKeyFromBuffer */
1797
1798#define EMV_DERIVE_KEY_OP_XOR (0x01)
1799#define EMV_DERIVE_KEY_OP_ECB (0x02)
1800
1801
1802/* DGeneratePKCS10CSR */
1803
1804#define CORE_P10_CSR_VERSION1 (0x00)
1805#define CORE_P10_CSR_DN_MAX_LEN (2048)
1806
1807#define P10_CSR_DER (1)
1808#define P10_CSR_PEM (2)
1809
1810#define CORE_P10_HASH_SHA1 (0x01)
1811#define CORE_P10_HASH_SHA224 (0x02)
1812#define CORE_P10_HASH_SHA256 (0x03)
1813#define CORE_P10_HASH_SHA384 (0x04)
1814#define CORE_P10_HASH_SHA512 (0x05)
1815#define CORE_P10_HASH_SHA2_224 CORE_P10_HASH_SHA224
1816#define CORE_P10_HASH_SHA2_256 CORE_P10_HASH_SHA256
1817#define CORE_P10_HASH_SHA2_384 CORE_P10_HASH_SHA384
1818#define CORE_P10_HASH_SHA2_512 CORE_P10_HASH_SHA512
1819#define CORE_P10_HASH_SHA3_224 (0x06)
1820#define CORE_P10_HASH_SHA3_256 (0x07)
1821#define CORE_P10_HASH_SHA3_384 (0x08)
1822#define CORE_P10_HASH_SHA3_512 (0x09)
1823
1824/* DPKCS8ExportKey */
1825
1826// ASCII
1827#define CORE_P8_EXPORT_PWD_LEN (16)
1828#define ND_MIN_P8_PWD_LEN (8)
1829#define ND_MAX_P8_PWD_LEN (CORE_P8_EXPORT_PWD_LEN)
1830
1831/* DImportPKCS12Buffer */
1832
1833#define DN_MAX_P12_PWD_LEN (CORE_P8_EXPORT_PWD_LEN)
1834
1835/* DExportPKCS12 */
1836
1837#define DN_EXPORT_P12_LEGACY (1)
1838
1839/* SPB */
1840
1841#define DN_SPB_MSG_HEADER_V2_LEN (588)
1842#define ND_SPB_MSG_HEADER_V2_LEN DN_SPB_MSG_HEADER_V2_LEN
1843#define DN_SPB_MSG_HEADER_V3_LEN ND_SPB_MSG_HEADER_V2_LEN
1844#define DN_SPB_MAX_NOTIFY_DATA_SEG (32 * 1024)
1845#define ND_SPB_MAX_NOTIFY_DATA_SEG DN_SPB_MAX_NOTIFY_DATA_SEG
1846#define DN_SPB_V3_TAG_LEN (16)
1847#define DN_SPB_MAX_RCV_NOTIFY_DATA_SEG (ND_SPB_MAX_NOTIFY_DATA_SEG + DN_SPB_V3_TAG_LEN)
1848
1849//dwFlags
1850#define ND_SPB_USE_CIP1 (0x80000000)
1851#define ND_SPB_USE_ANY (0x40000000)
1852#define ND_SPB_RAW (0x20000000)
1853
1854/* DSPBEncode */
1855
1856//dwFlags
1857#define ND_SPB_ENCODE_GEN_01 (0x01)
1858#define ND_SPB_ENCODE_HEADER_V3 (0x02)
1859
1860/* DSPBDecode */
1861
1862//dwFlags
1863#define ND_SPB_OUT_NO_PADDING (0x01)
1864#define ND_SPB_OUT_WITH_PADDING (0x02)
1865
1866#define ND_SPB_ISPB_LEN (8)
1867#define ND_SPB_CA_LEN (2)
1868#define ND_SPB_DOMAIN_MAX_LEN (5)
1869#define ND_SPB_SN_MAX_LEN (32)
1870#define ND_SPB_ID_MAX_LEN (ND_SPB_SN_MAX_LEN + 1 + ND_SPB_CA_LEN + 1)
1871#define ND_SPB_ID_MAX_FQN_LEN (MAX_USR_LEN + 1 + ND_SPB_SN_MAX_LEN + 1 + ND_SPB_CA_LEN + 1)
1872#define ND_SPB_MAX_SUBJECT (1024)
1873#define ND_SPB_MAX_ISSUER (1024)
1874#define ND_SPB_MAX_ALG_ID (256)
1875
1876
1877//strong auth
1878#define SA_TP_MAX_DES_LEN (16 + 1)
1879#define SA_TP_MAX_OFFSET_LEN (6 + 1)
1880#define SA_TP_MAX_SERIAL_LEN (10 + 1)
1881#define SA_TP_MAX_MKEY_LEN (32 + 1)
1882#define SA_TP_MAX_OTP_LEN (6 + 1)
1883
1884#define SA_HOTP_CHAP_LEN (10)
1885
1886/* Module OATH */
1887
1888/* DOATHIssueHOTPBlob */
1889#define ISSUE_OATH_MIN_OTP_LEN (6)
1890#define ISSUE_OATH_MAX_OTP_LEN (16)
1891#define ISSUE_OATH_MAX_OTP_RETRY (129)
1892
1893//bSeedLen
1894#define ISSUE_OATH_SHA1_LEN (20)
1895#define ISSUE_OATH_SHA256_LEN (32)
1896#define ISSUE_OATH_SHA512_LEN (64)
1897
1898//bTruncationOffset
1899#define ISSUE_OATH_DYN_TRUNC (OATH_SA_v1_HOTP_DYN_TRUNC_OFF)
1900
1901//wTimeStep
1902#define ISSUE_OATH_DEFAULT_TIME_STEP (OATH_SA_v2_default_TIME_STEP)
1903#define ISSUE_OATH_HOTP_TS (0)
1904
1905//otT0
1906#define ISSUE_OATH_HOTP_T0 (OATH_SA_v2_default_T0_Epoch)
1907
1908//otMovingFactor
1909#define ISSUE_OATH_INIT_MF (0)
1910
1911#define ISSUE_OATH_OUTPUT_BLOB_V1_LEN (160)
1912#define ISSUE_OATH_OUTPUT_BLOB_V2_LEN (180)
1913#define ISSUE_OATH_OUTPUT_BLOB_LEN (ISSUE_OATH_OUTPUT_BLOB_V1_LEN)
1914#define ISSUE_OATH_OUTPUT_MAX_BLOB_LEN (ISSUE_OATH_OUTPUT_BLOB_V2_LEN)
1915
1916#define OATH_MAX_PSK_LEN (255)
1917
1918#define ISSUE_OATH_GENERATE_HOTP (1)
1919#define ISSUE_OATH_GENERATE_TOTP (2)
1920#define ISSUE_OATH_IMPORT_HOTP (3)
1921#define ISSUE_OATH_IMPORT_TOTP (4)
1922
1923
1924#define OATH_UPDATE_BLOB (0x80000000)
1925
1926#define ISSUE_OATH_BLOB_V2_IV_LEN (AES_BLOCK)
1927#define ISSUE_OATH_BLOB_V2_TAG_LEN (AES_BLOCK)
1928
1929/* DOATHCheckOTP */
1930
1931#define MAX_OTP_LOOK_AHEAD_INTERVAL (255)
1932
1933
1934#define DEFAULT_PORT (4433)
1935
1936
1937/* DListObjsFilter */
1938
1939#define LST_NO_FILTER (1)
1940#define LST_FILTER (2)
1941
1942/* DSPBCalculateObjectId */
1943
1944#define SPB_GENERATE_KEY_NAME (1)
1945#define SPB_GENERATE_CER_NAME (2)
1946
1947
1948/* DIPFilterOperation */
1949
1950#define D_IPF_ENABLE (1)
1951#define D_IPF_DISABLE (2)
1952#define D_IPF_LIST (33)
1953#define D_IPF_ADD (44)
1954#define D_IPF_DEL (55)
1955
1956
1957/* DCert2CertInfo */
1958
1959#define P2C_SPB_CERT_INFO (1)
1960#define P2C_CERT_BASIC_INFO (2)
1961
1962//CERT_X509_BASIC_INFO
1963#define DN_MAX_SUBJECT (1024)
1964#define DN_MAX_ISSUER (1024)
1965#define DN_MAX_SN (1024)
1966#define DN_MAX_EMAIL (1024)
1967#define DN_MAX_ALG_ID (256)
1968
1969
1970/* DGenerateDUKPT */
1971
1972// flags/modes; duk, pek, and mek are mutually exclusive;
1973#define NEW_DUKPT_MODE_DUK (0x00000000)
1974#define NEW_DUKPT_MODE_EXP (1 << 31)
1975#define NEW_DUKPT_MODE_DE (1 << 30)
1976#define NEW_DUKPT_MODE_PEK (1 << 29)
1977#define NEW_DUKPT_MODE_MEK (1 << 28)
1978#define NEW_DUKPT_MODE_TMP (1 << 27)
1979#define NEW_DUKPT_MODE_IPEK (1 << 26)
1980
1981
1982/* DGetNetInfo */
1983
1984#define NET_INFO_MAX_SROUTE_COUNT (48)
1985#define NET_INFO_MAX_SROUTE_LEN (52)
1986#define NET_INFO_MAX_SNMP_T_COUNT (16)
1987#define NET_INFO_MAX_SNMP_SC_STR (255)
1988#define NET_INFO_MAX_SNMP_SL_STR (255)
1989#define NET_INFO_MAX_SNMP_C_STR (64)
1990
1991//Flags
1992#define NET_INFO_INFO_0 (0)
1993#define NET_INFO_INFO_1 (1)
1994
1995/* Bond mode - comes in bond gateway info. */
1996#define NET_INFO_BOND_HOT_STANDBY "hot standby"
1997#define NET_INFO_BOND_BALANCE "balance"
1998#define NET_INFO_BOND_AGGREGATION "aggregation"
1999
2000
2001
2002/* DCertEncodingConvert and DGetHSMTLSCert*/
2003
2004#define CERT_OUT_DER 1
2005#define CERT_OUT_PEM 2
2006
2007
2008
2009/* DGenEcdhKey - dwOP*/
2010
2011#define DN_GEN_KEY_KDF_RAW_SECRET (0x01)
2012#define DN_GEN_KEY_X9_63_SHA256 (0x02)
2013
2014
2015#define DN_ECDH_GEN_KEY_MAX_DATA (1024)
2016#define DN_GEN_ECDH_MAX_SHARED_LEN (128)
2017
2018/* DCreateHash */
2019
2020#define DN_HASH_OFFLINE (1)
2021
2022/* DFindHSM */
2023
2024//Service Type
2025#define DN_FIND_SRVC_TYPE_IP (1)
2026#define DN_FIND_SRVC_TYPE_AAP (2)
2027#define DN_FIND_SRVC_TYPE_ALL (3)
2028
2029//Filter
2030#define DN_FIND_FILTER_TYPE_POCKET (0x01)
2031#define DN_FIND_FILTER_TYPE_XP (0x02) //Not implemented
2032#define DN_FIND_FILTER_TYPE_ST (0x04) //Not implemented
2033#define DN_FIND_FILTER_TYPE_LEGACY (0x08) //Not implemented
2034#define DN_FIND_FILTER_TYPE_UNKNOWN (0x10) //Not implemented
2035#define DN_FIND_FILTER_TYPE_HSM (0x40000000)
2036#define DN_FIND_FILTER_TYPE_ALL (0x80000000)
2037
2038#define DN_SLP_POCKET_ID "$pocket"
2039#define DN_SLP_HSM_MODEL_POCKET "DMP"
2040#define DN_SLP_HSM_MODEL_XP "DXP"
2041#define DN_SLP_HSM_MODEL_ST "DST"
2042#define DN_SLP_HSM_MODEL_LEGACY "lhM"
2043#define DN_SLP_HSM_MODEL_UNKNOWN "DHSM"
2044
2045
2046/* DManageAToken */
2047
2048#define DN_USR_A_TOKEN_KLEN (16)
2049#define DN_RND_CHAP_LEN (16)
2050
2051#define DN_A_TOKEN_OP_ISSUE (1)
2052#define DN_A_TOKEN_OP_REVOKE (2)
2053#define DN_A_TOKEN_OP_LIST (3)
2054#define DN_A_TOKEN_OP_L_ISSUE (4)
2055#define DN_A_TOKEN_OP_L_REVOKE (5)
2056
2057#define DN_A_TOKEN_INFINITE (~0)
2058
2059
2060/* DBatchSign */
2061
2062#define DN_BATCH_SIGN_BLOCK_HEADER ((DWORD *2) + MAX_OBJ_ID_FQN_LEN)
2063
2064
2065/* DSetLBList and DGetLBList */
2066
2067#define DN_LB_LIST (1)
2068#define DN_MAX_LB_HSM_COUNT (16)
2069#define DN_MAX_LB_SETS (16)
2070
2071/* DGetUserKey */
2072
2073#define D_GET_USR_KEY_OFFLINE (1)
2074#define D_GET_USR_KEY_NO_PUB (2)
2075
2076/* DSVaultGenToken and DSVaultGetData */
2077
2078#define D_SVAULT_MIN_TL (6)
2079#define D_SVAULT_MAX_TL (256)
2080
2081#define D_SVAULT_T_TKR2 (1)
2082
2083#define D_SVAULT_F_MASK_TOKEN (1)
2084#define D_SVAULT_F_MASK_SECRET (2)
2085
2086#define D_SVAULT_CKS_NULL (0)
2087#define D_SVAULT_CKS_CPF (1)
2088#define D_SVAULT_CKS_CNPJ (2)
2089#define D_SVAULT_CKS_PAN (3)
2090#define D_SVAULT_CKS_IEL (4)
2091
2092#define D_SVAULT_BASE10 (10)
2093#define D_SVAULT_BASE16 (16)
2094#define D_SVAULT_BASE26 (26)
2095#define D_SVAULT_BASE52 (52)
2096#define D_SVAULT_BASE62 (62)
2097
2098#define D_SVAULT_TOKEN_BLOB_LEN (805)
2099
2100/* DSVaultGetData */
2101
2102#define D_SVAULT_GET_OP_SECRET (1)
2103#define D_SVAULT_GET_OP_TOKEN (2)
2104
2105/* DBchainCreateBip32Ckd */
2106
2107#define DN_BCHAIN_SECURE_BIP32_INDEX_BASE 0x80000000
2109/* DBchainGetAddress */
2110
2111#define DN_BCHAIN_MAX_ADDR_LEN (128)
2112#define DN_BCHAIN_MAX_HRP (64)
2114// Type
2115#define DN_BCHAIN_AT_BTC_P2PKH (1)
2116#define DN_BCHAIN_AT_BTC_P2SH (2)
2117#define DN_BCHAIN_AT_BTC_B32_PKH (3)
2118#define DN_BCHAIN_AT_BTC_B32_SH (4)
2119#define DN_BCHAIN_AT_ETH_EOA (5)
2120#define DN_BCHAIN_AT_ETH_EOA_MC_CKS (6)
2121#define DN_BCHAIN_AT_ETH_EOA_ICAP (7)
2122#define DN_BCHAIN_AT_ALGORAND (8)
2123#define DN_BCHAIN_AT_TRON_HEX (9)
2124#define DN_BCHAIN_AT_TRON_B58 (10)
2125#define DN_BCHAIN_AT_XRP (11)
2126#define DN_BCHAIN_AT_SOL (12)
2127// Version
2128#define DN_BCHAIN_VER_UNUSED (0x00)
2129#define DN_BCHAIN_VER_BTC_A1_MAIN_NET (0x00)
2130#define DN_BCHAIN_VER_XRP_CLASSIC (0x00)
2131#define DN_BCHAIN_VER_BTC_AMN_TEST_NET (0x6F)
2132#define DN_BCHAIN_VER_BTC_A3_MAIN_NET (0x05)
2133#define DN_BCHAIN_VER_BTC_B32_WITVER (0x00)
2134#define DN_BCHAIN_VER_HTR_MAINNET (0x28)
2135#define DN_BCHAIN_VER_HTR_TESTNET (0x49)
2136#define DN_BCHAIN_VER_HTR_P2SH_MAINNET (0x64)
2137#define DN_BCHAIN_VER_HTR_P2SH_TESTNET (0x87)
2138// HRP
2139#define DN_BCHAIN_HRP_UNUSED ""
2140#define DN_BCHAIN_HRP_BTC_MAIN_NET "bc"
2141#define DN_BCHAIN_HRP_BTC_TEST_NET "tb"
2143/* DBchainSignHash */
2144
2145#define DN_BCHAIN_MAX_SIG_LEN (128)
2147// Type
2148#define DN_BCHAIN_SIG_DER_ECDSA (1)
2149#define DN_BCHAIN_SIG_RAW_ECDSA (2)
2150#define DN_BCHAIN_SIG_BIP340 (3)
2151#define DN_BCHAIN_DER_RFC_6979_ECDSA (4)
2152#define DN_BCHAIN_RAW_RFC_6979_ECDSA (5)
2154#define DN_BCHAIN_SIG_RAW_ECDSA_R_LEN (32)
2155#define DN_BCHAIN_SIG_RAW_ECDSA_S_LEN (32)
2156#define DN_BCHAIN_SIG_RAW_ECDSA_V_LEN (1)
2158#define DN_BCHAIN_SIG_RAW_ECDSA_R_LEN (32)
2159#define DN_BCHAIN_SIG_RAW_ECDSA_S_LEN (32)
2160#define DN_BCHAIN_SIG_RAW_ECDSA_V_LEN (1)
2162// Hash mode
2163#define DN_BCHAIN_HASH_BTC_H160 (1)
2164#define DN_BCHAIN_HASH_RIPEMD160 (2)
2165#define DN_BCHAIN_HASH_SHA256 (3)
2166#define DN_BCHAIN_HASH_BTC_SHA256_2X (4)
2167#define DN_BCHAIN_HASH_KECCAK256 (5)
2169// Hash length
2170#define DN_BCHAIN_HASH_BTC_H160_LEN (20)
2171#define DN_BCHAIN_HASH_RIPEMD160_LEN (20)
2172#define DN_BCHAIN_HASH_SHA256_LEN (32)
2173#define DN_BCHAIN_HASH_BTC_SHA256_2X_LEN (32)
2174#define DN_BCHAIN_HASH_KECCAK256_LEN (32)
2176#define DN_BCHAIN_MAX_HASH_LEN (DN_BCHAIN_HASH_KECCAK256_LEN)
2178/* DBchainEdDsaSign and DBchainEdDsaVerify */
2179
2180#define DN_BCHAIN_EDDSA_MAX_CSTRL (255)
2181#define DN_BCHAIN_EDDSA_CSTR_UNUSED ""
2182#define DN_BCHAIN_EDDSA_MAX_DATA_LEN (4 * 1024 * 1024)
2184#define DN_BCHAIN_EDDSA_SIG_PURE (254)
2185#define DN_BCHAIN_EDDSA_SIG_ALGORAND (253)
2186#define DN_BCHAIN_EDDSA_SIG_XRP (252)
2187#define DN_BCHAIN_EDDSA_SIG_SOL (251)
2189/* DBchainPkImport and DBchainPkExport */
2190#define DN_BCHAIN_KEY_WIF (1)
2191#define DN_BCHAIN_KEY_MINI (2)
2192#define DN_BCHAIN_KEY_HEX (3)
2193#define DN_BCHAIN_KEY_SEC1 (4)
2194#define DN_BCHAIN_KEY_XPRIV (5)
2195#define DN_BCHAIN_KEY_ED25519_B64 (6)
2196#define DN_BCHAIN_KEY_ED25519_XPRIV (7)
2198// Version
2199#define DN_BCHAIN_VER_WIF_MAIN_NET (0x80)
2200#define DN_BCHAIN_VER_WIF_TEST_NET (0xEF)
2202/* DBchainGetPubKey and DBchainVerify */
2203#define DN_BCHAIN_PBK_SEC1_UNCOMP (1)
2204#define DN_BCHAIN_PBK_SEC1_COMP (2)
2205#define DN_BCHAIN_PBK_BIP340 (3)
2206#define DN_BCHAIN_PBK_ED25519 (4)
2207#define DN_BCHAIN_PBK_AT_ALGORAND (5)
2208#define DN_BCHAIN_PBK_BIP32_XPUB (6)
2209#define DN_BCHAIN_PBK_AT_SOL (7)
2211#define DN_BCHAIN_X_LEN (32)
2212#define DN_BCHAIN_Y_LEN (32)
2213#define DN_BCHAIN_MAX_PBK_LEN (128)
2215/* DBchainHashData */
2216
2217#define DN_BCHAIN_MAX_HDATA_LEN (2 * 1024 * 1024)
2219/*
2220 *
2221 * Unaligned structures
2222 *
2223 */
2224
2228typedef struct tag_SVAULT_GEN_TOKEN
2229{
2260 char szSecret[D_SVAULT_MAX_TL + 1];
2263
2268typedef struct tag_HSM_ADDR
2269{
2270 char szAddr[MAX_ADDR_LEN];
2271 int nPort;
2272 time_t tmNow;
2273 int nqtdcache; /* Amount of sessions in cache.*/
2274}HSM_ADDR;
2275
2280typedef struct tag_LOAD_BALANCE_LIST
2281{
2285
2291typedef struct tag_SLP_SRVR_INFO
2292{
2293 int nPort;
2294 char szIP[MAX_IP_LEN + 1];
2295 char szId[MAX_HSM_ID_NAME + 1];
2296 char szModel[MAX_HSM_MODEL_NAME + 1];
2298
2303typedef struct tag_DBLOB
2304{
2305 void *pvData;
2307} DBLOB;
2308
2309/* DCert2CertInfo */
2310
2311typedef struct tag_SPB_CERT_X509_INFO
2312{
2314
2315 char szAlgId[ND_SPB_MAX_ALG_ID];
2316
2317 char szISPB[ND_SPB_ISPB_LEN+1];
2318 char szCA[ND_SPB_CA_LEN+1];
2319 char szSN[ND_SPB_SN_MAX_LEN+1];
2320
2321 char szSubject[ND_SPB_MAX_SUBJECT];
2322 char szIssuer[ND_SPB_MAX_ISSUER];
2323
2324 struct tm tmNotBefore;
2325 struct tm tmNotAfter;
2326
2329
2330typedef struct tag_CERT_X509_BASIC_INFO
2331{
2333
2334 char szAlgId[DN_MAX_ALG_ID];
2335
2336 char szSubject[DN_MAX_SUBJECT];
2337 char szIssuer[DN_MAX_ISSUER];
2338 char szSN[DN_MAX_SN];
2339
2340 struct tm tmNotBefore;
2341 struct tm tmNotAfter;
2342
2345 char szEmail[DN_MAX_EMAIL];
2347
2348
2349typedef struct tag_IP_FILTER_INFO
2350{
2351 char szUser[MAX_USR_LEN + 1];
2352 char szIp[MAX_IP_LEN + 1];
2354
2355
2356/* DECPrivateKey2Info and DECPublicKey2Info */
2357
2358#define DN_EC_MAX_BIG_NUM (1024)
2359
2360//Field type definitions
2361#define DN_EC_KEY_FIELD_TYPE_NOT_DEFINED (0)
2362#define DN_EC_KEY_FIELD_TYPE_PRIME_FIELD (1)
2363#define DN_EC_KEY_FIELD_TYPE_BINARY_FIELD (2)
2364
2365//Out format options
2366#define DN_BN_2_ARRAY_OUT_BIN (1)
2367#define DN_BN_2_ARRAY_OUT_HEX (2)
2368#define DN_EC_KEY_PUB_X962_EC_POINT (3)
2369
2370//In format options
2371#define DN_EC_KEY_IN_FORMAT_DER (1)
2372
2373typedef struct tag_DN_EC_BIG_NUMBER
2374{
2378
2379typedef struct tag_DN_EC_POINT_INFO
2380{
2381 DN_EC_BIG_NUMBER bnX;//Point's x-coordinate
2382 DN_EC_BIG_NUMBER bnY;//Point's y-coordinate
2384
2385typedef struct tag_DN_EC_GROUP_INFO
2386{
2387 int nFieldType; //See definitions above
2388
2389 DN_EC_BIG_NUMBER bnP;//In Fp fields this is p for F2M fields it's m
2390
2391 DN_EC_BIG_NUMBER bnA;//Parameter a of the equation
2392 DN_EC_BIG_NUMBER bnB;//Parameter b of the equation
2393
2395
2396 DN_EC_BIG_NUMBER bnOrder;//Order n of the generator g
2397 DN_EC_POINT_INFO stGeneratorPoint;//Generator g / base point
2399
2400typedef struct tag_DN_EC_PUB_KEY_INFO
2401{
2405
2406typedef struct tag_DN_EC_PRIV_KEY_INFO
2407{
2411
2415typedef struct tag_RSA_PUB_KEY_PARTS
2416{
2420
2424typedef struct tag_DN_RSA_BIG_NUMBER
2425{
2429
2438
2439#define DN_USER_INFO_CERT_OP_ASSOCIATE (1)
2440#define DN_USER_INFO_CERT_OP_UNASSOCIATE (2)
2441
2445typedef struct tag_USER_INFO_CERT
2446{
2447 char szUserId[MAX_USR_LEN + 1];
2455
2459typedef struct tag_TLS_BUNDLE_INFO
2460{
2462 char szCERT[MAX_OBJ_ID_FQN_LEN];
2464
2474
2478typedef struct tag_GET_USR_KEY_OFFLINE
2479{
2480 char szKeyId[MAX_OBJ_ID_LEN];
2487
2515
2520typedef struct tag_DN_OBJ_COUNT
2521{
2524} DN_OBJ_COUNT;
2525
2530typedef struct tag_DN_USER_OBJ_COUNT
2531{
2532 char szUserId[MAX_OBJ_ID_FQN_LEN];
2536
2537#define DN_MAX_PRIVATE_KEY_ATTR_LEN (RSA_8192_LEN + 1)
2538
2558
2559
2560#define DN_SC_MAX_ATR_LEN (255)
2561#define DN_SC_MAX_CARD_FAMILY_LEN (128)
2562#define DN_SC_MAX_CARD_PRODUCT_NAME_LEN (128)
2563#define DN_SC_MAX_CARD_OS_VERSION_LEN (64)
2593
2594#ifdef _WIN32
2595 #pragma pack(push, 1) /* Align by 1 for portability issues.*/
2596#else
2597 #pragma pack(1)
2598#endif
2599
2600/* Aligned structures */
2601
2602typedef struct tag_OBJ_HDR_V1
2603{
2608} OBJ_HDR_V1;
2609
2610/*
2611 Estrutura contendo os atributos SP80057 de um objeto do HSM.
2612*/
2628
2629
2630/*
2631 Estados de objetos KMIP/SP.800-57.
2632*/
2633#define DN_SL_SP80057_STATE_UNKNOWN (0)
2634#define DN_SL_SP80057_STATE_PRE_ACTIVE (1)
2635#define DN_SL_SP80057_STATE_ACTIVE (2)
2636#define DN_SL_SP80057_STATE_DEACTIVATED (3)
2637#define DN_SL_SP80057_STATE_COMPROMISED (4)
2638#define DN_SL_SP80057_STATE_DESTROYED (5)
2639#define DN_SL_SP80057_STATE_DESTROYED_C (6)
2640
2641/*
2642 Máscara de uso de objetos SP.800-57.
2643*/
2644#define DN_SP80057_UM_SIGN (0x00000001)
2645#define DN_SP80057_UM_VERIFY (0x00000002)
2646#define DN_SP80057_UM_ENCRYPT (0x00000004)
2647#define DN_SP80057_UM_DECRYPT (0x00000008)
2648#define DN_SP80057_UM_WRAP_KEY (0x00000010)
2649#define DN_SP80057_UM_UNWRAP_KEY (0x00000020)
2650#define DN_SP80057_UM_EXPORT (0x00000040)
2651#define DN_SP80057_UM_MAC_GENERATE (0x00000080)
2652#define DN_SP80057_UM_MAC_VERIFY (0x00000100)
2653#define DN_SP80057_UM_DERIVE_KEY (0x00000200)
2654#define DN_SP80057_UM_CONTENT_COMMITMENT (0x00000400)
2655#define DN_SP80057_UM_KEY_AGREEMENT (0x00000800)
2656#define DN_SP80057_UM_CERTIFICATE_SIGN (0x00001000)
2657#define DN_SP80057_UM_CRL_SIGN (0x00002000)
2658#define DN_SP80057_UM_GENERATE_CRYPTOGRAM (0x00004000)
2659#define DN_SP80057_UM_VALIDATE_CRYPTOGRAM (0x00008000)
2660#define DN_SP80057_UM_TRANSLATE_ENCRYPT (0x00010000)
2661#define DN_SP80057_UM_TRANSLATE_DECRYPT (0x00020000)
2662#define DN_SP80057_UM_TRANSLATE_WRAP (0x00040000)
2663#define DN_SP80057_UM_TRANSLATE_UNWRAP (0x00080000)
2664
2665
2666/* DListObjsFilter */
2667
2668typedef struct tag_OBJ_LIST_FILTER
2669{
2673
2674#define OBJ_LIST_VERB_VERSION ( 1 << 0 )
2675#define OBJ_LIST_VERB_TYPE ( 1 << 1 )
2676#define OBJ_LIST_VERB_ATTRIB ( 1 << 2 )
2677#define OBJ_LIST_OBJS_OR ( 1 << 31 )
2678
2693
2728
2763
2794
2798typedef struct tag_ISSUE_OATH_BLOB_t_v1
2799{
2801 DWORD pad_cks_tag[3];
2803
2807typedef struct tag_ISSUE_OATH_BLOB_t_v2
2808{
2813
2817typedef struct tag_OATH_PSKC_TRANSLATE_OUTPUT
2818{
2820 char szKeyId[OATH_MAX_PSK_LEN+1];
2822
2839
2840typedef struct tag_MOD_OATH_SA_v2
2841{
2851} OATH_SA_v2;
2852
2853
2854typedef struct tag_STAT_CLUSTER_IP
2855{
2856 char szIp[MAX_IP_LEN + 1];
2858
2859
2860//GMT
2861typedef struct tag_P11_DATE{
2862 char year[4]; /* the year ("1900" - "9999") */
2863 char month[2]; /* the month ("01" - "12") */
2864 char day[2]; /* the day ("01" - "31") */
2865} P11_DATE;
2866
2878
2879typedef struct tag_HOTP_INFO_EX
2880{
2881 DWORD dwStructId; //Structure identifier -> SA_ST_ID_HOTP_INFO_EX
2882 char szObjId[MAX_OBJ_NAME_LEN + 1]; //HSM HOTP object name
2883 DWORD dwObjAttr; //HSM object attributes
2884 DWORD dwObjHotpFlags; //SoftToken type -> SA_ATTR_OATH_USE_IMEI, SA_ATTR_OATH_USE_TIME ...
2885 char szStPin[MAX_HOTP_PIN + 1]; //SoftToken PIN
2886 char szStIMEI[MAX_HOTP_IMEI + 1]; //SoftToken related device's serial number
2887 char szStAppName[MAX_HOTP_APP_NAME + 1]; //SoftToken application name
2888 DBLOB *pdbStLogoImage; //SoftToken logo image
2889}HOTP_INFO_EX; //DESCONTINUADO!
2890
2891
2892//DGetNetInfo
2893typedef struct tag_SYS_NET_INFO
2894{
2895 BYTE pbMac[6];
2896 char szIp[MAX_IP_LEN + 1];
2897 char szMask[MAX_IP_LEN + 1];
2898 char szDefGateway[MAX_IP_LEN + 1];
2901 char szName[MAX_NET_NAME + 1];
2902} SYS_NET_INFO;
2903
2904typedef struct tag_SYS_NET_INFO_1
2905{
2908
2910 char szCommunity[NET_INFO_MAX_SNMP_C_STR + 1];
2911 char szSysContact[NET_INFO_MAX_SNMP_SC_STR + 1];
2912 char szSyaLocation[NET_INFO_MAX_SNMP_SL_STR + 1];
2915
2920typedef struct tag_SYS_HEALTH
2921{
2924}SYS_HEALTH;
2925
2932
2947
2960
2961
2962#define DN_MAX_HSM_ALIAS (128)
2963#define DN_UPACK_MAX_DESCRIPTION (255 + 1)
2964
2969typedef struct tag_SYS_PENDING_INFO
2970{
2972 char szPendingUpackDescription[DN_UPACK_MAX_DESCRIPTION];
2973 char szHsmAlias[DN_MAX_HSM_ALIAS+1];
2975
2976
2977typedef struct tag_SYS_HW_STR_INFO
2978{
2979 char szSerialNumber[GET_INFO_MAX_SN_LEN + 1];
2980 char szHardwareString[GET_INFO_MAX_HW_STR_LEN + 1];
2981 char szTpKey[GET_INFO_MAX_TPKEY_LEN + 1];
2983
2984typedef struct tag_SYS_NTP_SVR_INFO
2985{
2986 char szAddr[MAX_IP_LEN + 1];
2987 char szNtpqInfo[GET_INFO_MAX_NTPQ_LEN + 1];
2990 char szKeyType[GET_INFO_MAX_NTP_KT_LEN + 1];
2991 char szKeyMat[GET_INFO_MAX_NTP_KM_LEN + 1];
2993
2994typedef struct tag_SYS_NTP_INFO
2995{
2999
3000
3001
3002typedef struct tag_SYS_REPL_INFO
3003{
3010 DWORD dwaPeers[GET_INFO_MAX_REPL_NODES + 1]; //Zero terminated IPv4 array. Last item == 0x00000000
3011 DWORD dwaPendingAcks[GET_INFO_MAX_REPL_NODES + 1]; //Zero terminated IPv4 array. Last item == 0x00000000
3018 DWORD dwaNodes[GET_INFO_MAX_REPL_NODES + 1]; //Zero terminated IPv4 array. Last item == 0x00000000
3020
3021
3039
3040
3041typedef struct tag_REPL_NODE_MSG
3042{
3043 BYTE bOP; //RNM_PROBE, RNM_DOWN...
3046
3047
3048typedef struct tag_HOTP_CHAP
3049{
3050 DWORD dwStructId; //Structure Id -> SA_ST_ID_HOTP_CHAP
3051 char szChallenge[SA_HOTP_CHAP_LEN + 1]; //Server created challenge
3052}HOTP_CHAP;//DEPRECATED!
3053
3054typedef struct tag_HOTP_SYNC
3055{
3056 DWORD dwStructId; //Structure Id -> SA_ST_ID_HOTP_SYNC
3057 char szObjId[MAX_OBJ_NAME_LEN + 1]; //HOTPToken to synchronize
3058 char szOTP1[SA_TP_MAX_OTP_LEN]; //Expected response from HOTPToken
3059 char szOTP2[SA_TP_MAX_OTP_LEN]; //Server Counter Response
3060}HOTP_SYNC;
3061
3062typedef struct tag_HIP_PARAM
3063{
3067}HIP_PARAM; //DEPRECATED!
3068
3069typedef struct tag_HIP_OUTPUT
3070{
3071 char szHipChallenge[1];
3073 BYTE pbImage[1];
3074}HIP_OUTPUT; //DEPRECATED!
3075
3079typedef struct tag_USER_BLOCK
3080{
3081 char szUserId[MAX_USR_LEN+1];
3084}USER_BLOCK;
3085
3089typedef struct tag_DN_A_TOKEN
3090{
3091 char pcUserName[MAX_USR_LEN];
3093}DN_A_TOKEN;
3094
3099typedef struct tag_DN_A_TOKEN_FULL
3100{
3104
3116
3135
3136/* HTTP session parameters */
3137
3138#define MAX_HTTP_ADDR_LEN (2048)
3139#define MAX_HTTP_API_TOKEN_LEN (128)
3140
3150
3155typedef struct tag_AUTH_ATOKEN
3156{
3157 char szAddr[MAX_ADDR_LEN];
3158 int nPort;
3161
3166typedef struct tag_AUTH_WIN_CREDENTIAL
3167{
3168 char szAddr[MAX_ADDR_LEN];
3169 int nPort;
3171
3183
3193
3194/*
3195 Estados de autorização de partição do usuário.
3196*/
3197
3198#define ND_PA_ACL_OBJ_OPEN (ACL_OBJ_READ)
3199#define ND_PA_ACL_OBJ_EXPORT (ACL_OBJ_CREATE)
3200#define ND_PA_ACL_OBJ_DEL (ACL_OBJ_DEL)
3201#define ND_PA_ACL_OBJ_BLOCK (ACL_OBJ_UPDATE)
3202#define ND_PA_ACL_NS_DEL (ACL_USR_DELETE)
3203
3204#define NSAUTH_ACL_FULL (~0)
3205
3206/*
3207 Estados de autorização de partição do usuário.
3208*/
3209#define ND_PA_STATE_Unknown (0)
3210#define ND_PA_STATE_Absent (1)
3211#define ND_PA_STATE_Null (2)
3212#define ND_PA_STATE_Associated (3)
3213#define ND_PA_STATE_Authorized (4)
3214
3218typedef struct tag_USER_PA_INFO
3219{
3220 char szUserId[MAX_USR_LEN + 1];
3239
3247
3248typedef struct tab_EXT_MAP_2_OBJ_INFO
3249{
3251 char szObjId1[MAX_OBJ_ID_FQN_LEN];
3253 char szObjId2[MAX_OBJ_ID_FQN_LEN];
3255
3256
3262
3263typedef struct tag_PKCS11_OBJ_MAP
3264{
3267
3268 DWORD Class; // CKO_DATA, etc;
3269
3273
3274 //The three BYTEs below are overloaded
3275 //must use the MACROs to set the desired parameters.
3276 //Macros defined below.
3277
3278 BYTE Trusted; // boolean/overloaded
3279 BYTE WrapWithTrusted; // boolean/overloaded
3280 BYTE Local; // boolean/overloaded
3281
3286
3287//Trusted -> CKA_TRUSTED, CKA_DERIVE, CKA_ENCRYPT,
3288//CKA_DECRYPT, CKA_WRAP, CKA_UNWRAP
3289#define PKCS11_SET_FLAG(x, p) ((x) |= (1 << (p)))
3290#define PKCS11_UNSET_FLAG(x, p) ((x) &= ~(1 << (p)))
3291#define PKCS11_GET_FLAG(x, p) ((x) & (1 << (p)))
3292
3293//Enable driven option. Disabled by default.
3294#define PKCS11_SET_OBJ_MAP_CKA_TRUSTED(x) PKCS11_SET_FLAG(x, 7)
3295#define PKCS11_UNSET_OBJ_MAP_CKA_TRUSTED(x) PKCS11_UNSET_FLAG(x, 7)
3296#define PKCS11_GET_OBJ_MAP_CKA_TRUSTED(x) PKCS11_GET_FLAG(x, 7)
3297
3298//Disable driven option. Enabled by default.
3299#define PKCS11_SET_OBJ_MAP_CKA_DERIVE(x) PKCS11_UNSET_FLAG(x, 6)
3300#define PKCS11_UNSET_OBJ_MAP_CKA_DERIVE(x) PKCS11_SET_FLAG(x, 6)
3301#define PKCS11_GET_OBJ_MAP_CKA_DERIVE(x) (!PKCS11_GET_FLAG(x, 6))
3302
3303#define PKCS11_SET_OBJ_MAP_CKA_ENCRYPT(x) PKCS11_UNSET_FLAG(x, 5)
3304#define PKCS11_UNSET_OBJ_MAP_CKA_ENCRYPT(x) PKCS11_SET_FLAG(x, 5)
3305#define PKCS11_GET_OBJ_MAP_CKA_ENCRYPT(x) (!PKCS11_GET_FLAG(x, 5))
3306
3307#define PKCS11_SET_OBJ_MAP_CKA_DECRYPT(x) PKCS11_UNSET_FLAG(x, 4)
3308#define PKCS11_UNSET_OBJ_MAP_CKA_DECRYPT(x) PKCS11_SET_FLAG(x, 4)
3309#define PKCS11_GET_OBJ_MAP_CKA_DECRYPT(x) (!PKCS11_GET_FLAG(x, 4))
3310
3311#define PKCS11_SET_OBJ_MAP_CKA_WRAP(x) PKCS11_UNSET_FLAG(x, 3)
3312#define PKCS11_UNSET_OBJ_MAP_CKA_WRAP(x) PKCS11_SET_FLAG(x, 3)
3313#define PKCS11_GET_OBJ_MAP_CKA_WRAP(x) (!PKCS11_GET_FLAG(x, 3))
3314
3315#define PKCS11_SET_OBJ_MAP_CKA_UNWRAP(x) PKCS11_UNSET_FLAG(x, 2)
3316#define PKCS11_UNSET_OBJ_MAP_CKA_UNWRAP(x) PKCS11_SET_FLAG(x, 2)
3317#define PKCS11_GET_OBJ_MAP_CKA_UNWRAP(x) (!PKCS11_GET_FLAG(x, 2))
3318
3319//WrapWithTrusted
3320
3321//Enable driven option. Disabled by default.
3322#define PKCS11_SET_OBJ_MAP_CKA_WRAP_WITH_TRUSTED(x) PKCS11_SET_FLAG(x, 7)
3323#define PKCS11_UNSET_OBJ_MAP_CKA_WRAP_WITH_TRUSTED(x) PKCS11_UNSET_FLAG(x, 7)
3324#define PKCS11_GET_OBJ_MAP_CKA_WRAP_WITH_TRUSTED(x) PKCS11_GET_FLAG(x, 7)
3325
3326//Local
3327//Enable driven option. Disabled by default.
3328#define PKCS11_SET_OBJ_MAP_CKA_LOCAL(x) PKCS11_SET_FLAG(x, 7)
3329#define PKCS11_UNSET_OBJ_MAP_CKA_LOCAL(x) PKCS11_UNSET_FLAG(x, 7)
3330#define PKCS11_GET_OBJ_MAP_CKA_LOCAL(x) PKCS11_GET_FLAG(x, 7)
3331
3332//DAdmOperation options - AO_SET_PWD_SEC_POLICY/AO_GET_PWD_SEC_POLICY
3333
3334#define PWD_SEC_POLICY_USE_MIN_PWD_LEN (8)
3335#define PWD_SEC_POLICY_USE_MAX_PWD_LEN (16)
3337typedef struct tag_PWD_SEC_POLICY
3338{
3339 //USE
3340 BYTE bMaxInvalidLogins; //Number of attempts. 0 == sets to HSM internal default.
3341 BYTE bExpiration; //Number of days. 0 == disable policy.
3342 BYTE bHistory; //Number of passwords to track. 0 == disable policy.
3343 //FORMAT
3344 BYTE bMinLength; //Minimal number of chars (ASCII).
3345 BYTE bMinSpecial; //Minimal number of non-alpha chars.
3346 BYTE bUpper; //Minimal number of upper-case chars.
3347 BYTE bLower; //Minimal number of lower-case chars.
3349
3353typedef struct tag_EFT_VISA_KEY_PARTS
3354{
3355 BYTE pbKeyPart1[3 * DES_BLOCK];
3356 BYTE pbKeyPart1Checksum[EFT_VISA_KEY_CHECKSUM_LEN];
3357 BYTE pbKeyPart2[3 * DES_BLOCK];
3358 BYTE pbKeyPart2Checksum[EFT_VISA_KEY_CHECKSUM_LEN];
3359 BYTE pbKeyPart3[3 * DES_BLOCK];
3360 BYTE pbKeyPart3Checksum[EFT_VISA_KEY_CHECKSUM_LEN];
3363
3367typedef struct tag_EFT_AES_KEY_PARTS
3368{
3369 BYTE pbKeyPart1[ALG_AES_256_LEN];
3370 BYTE pbKeyPart2[ALG_AES_256_LEN];
3371 BYTE pbKeyPart3[ALG_AES_256_LEN];
3374
3378typedef struct tag_EFT_AES_KEY_PARTS_DATA
3379{
3383
3387typedef struct tag_EFT_FULL_CKS_KEY_PARTS
3388{
3389 BYTE pbKeyPart1[3 * DES_BLOCK];
3390 BYTE pbKeyPart1Checksum[DES_BLOCK];
3391 BYTE pbKeyPart2[3 * DES_BLOCK];
3392 BYTE pbKeyPart2Checksum[DES_BLOCK];
3393 BYTE pbKeyPart3[3 * DES_BLOCK];
3394 BYTE pbKeyPart3Checksum[DES_BLOCK];
3395 BYTE pbMKCheckSum[DES_BLOCK];
3397
3402typedef struct tag_DN_CALC_ARPC_EMV_METHOD_1
3403{
3404 char szIssuerMK[MAX_OBJ_ID_BIN_LEN];
3405 char szPAN[MAX_PAN_LEN];
3407 BYTE pbARQC[DES_BLOCK];
3409 BYTE pbNONCE[DES_BLOCK];
3412
3413typedef struct tag_DN_CALC_ARPC_EMV_METHOD_2
3414{
3415 char szIssuerMK[MAX_OBJ_ID_BIN_LEN];
3416 char szPAN[MAX_PAN_LEN];
3418 BYTE pbNONCE[DES_BLOCK];
3421 BYTE pbARQC[DES_BLOCK];
3427
3428
3442
3448typedef struct tag_DS_BIND_INFO
3449{
3452 char szHSM[D_MAX_DS_BIND_B62_ID + 1];
3455 char szAccount[D_MAX_DS_BIND_B62_ID + 1];
3460 char szURL[D_MAX_DS_BIND_URL + 1];
3462} DS_BIND_INFO;
3463
3464#define DN_RCC_MAX_NODE_COUNT (16)
3465#define DN_RCC_MAX_REPL_MC_VER (256)
3466
3471typedef struct tag_CROSS_CHECK_NODE
3472{
3477 char szVersion[DN_RCC_MAX_REPL_MC_VER];
3479
3480/*
3481 Blockchain module
3482*/
3483
3484/* DBchainCreateXPrv */
3485
3486// Types
3487#define DN_BCHAIN_BTC_MINIKEY (1)
3488#define DN_BCHAIN_BIP32_SEED_XPRV (2)
3489#define DN_BCHAIN_BIP39_SEED_XPRV (3)
3490#define DN_BCHAIN_BIP32_XPRV (4)
3491#define DN_BCHAIN_BIP32_ED25519_XPRV (5)
3493// Version
3494#define DN_BCHAIN_VER_BIP32_MAINNET (DN_BCHAIN_VER_WIF_MAIN_NET)
3495#define DN_BCHAIN_VER_BIP32_TESTNET (DN_BCHAIN_VER_WIF_TEST_NET)
3496#define DN_BCHAIN_VER_BIP32_HTR_MAINNET (1)
3497#define DN_BCHAIN_VER_BIP32_HTR_TESTNET (2)
3499#define DN_BCHAIN_BIP32_SEED_LEN_MAX (765)
3503typedef struct tag_DN_BCHAIN_BIP32_SEED_XPRV_DATA
3504{
3509
3510#define DN_BCHAIN_BIP39_SEED_LEN_MAX (765)
3511#define DN_BCHAIN_BIP39_PWD_LEN_MAX (255)
3516typedef struct tag_DN_BCHAIN_BIP39_SEED_XPRV_DATA
3517{
3522
3523#define DN_BCHAIN_KEY_INFO_ST_SL (0)
3524#define DN_BCHAIN_KEY_INFO_ST_BLKC (1)
3526/* DBchainCreateBip32Ckd */
3527
3531typedef struct tag_DN_BCHAIN_KEY_INFO
3532{
3535 BYTE pbBip32Ver[4];
3537 BYTE pbParentFingerprint[4];
3538 BYTE pbChildNumber[4];
3540
3541/* DBchainVerify */
3542
3546typedef struct tag_DN_BCHAIN_PBK
3547{
3552
3553/*
3554 DMofNSplit
3555*/
3556
3557#define DN_M_OF_N_S_LEN (24)
3558#define DN_M_OF_N_ES_LEN (32)
3559#define DN_M_OF_N_S_MIN (2)
3560#define DN_M_OF_N_S_MAX (16)
3561#define DN_M_OF_N_PART_LEN (3 + DN_M_OF_N_S_LEN)
3566typedef struct tag_DN_M_OF_N_PART_DETAILS
3567{
3573
3577typedef struct tag_DN_M_OF_N_PART
3578{
3581
3585typedef struct tag_DN_M_OF_N_SPLIT_INFO
3586{
3592
3603
3607typedef struct tag_DN_OBJ_STATS
3608{
3611} DN_OBJ_STATS;
3612
3618#define DN_GLOBAL_OBJ_STATS_COUNT (39)
3620#define DN_GLOBAL_OBJ_STATS_INDEX_RSA (0)
3621#define DN_GLOBAL_OBJ_STATS_INDEX_DSA (1)
3622#define DN_GLOBAL_OBJ_STATS_INDEX_ECC (2)
3623#define DN_GLOBAL_OBJ_STATS_INDEX_ECX (3)
3624#define DN_GLOBAL_OBJ_STATS_INDEX_AES (4)
3625#define DN_GLOBAL_OBJ_STATS_INDEX_DES (5)
3626#define DN_GLOBAL_OBJ_STATS_INDEX_CSP (6)
3627#define DN_GLOBAL_OBJ_STATS_INDEX_BCHAIN (7)
3628#define DN_GLOBAL_OBJ_STATS_INDEX_X509 (8)
3629#define DN_GLOBAL_OBJ_STATS_INDEX_PKCS7 (9)
3635typedef struct tag_DN_GLOBAL_OBJ_STATS
3636{
3640
3641/* DSKeepProbeSecret */
3642
3646typedef struct tag_SKeepProbeInfo
3647{
3651
3652/* DSKeepSplitSecret e outros */
3653#define DN_SKEEP_M_OF_N_S_MIN (2)
3654#define DN_SKEEP_M_OF_N_S_MAX (16)
3655#define DN_SKEEP_M_OF_N_S_LEN (64)
3660typedef struct tag_SKeepRecoverInfo
3661{
3663 char szSecret[DN_SKEEP_M_OF_N_S_LEN + 1];
3665
3669typedef struct tag_SKeepShare
3670{
3671 char szShare[DN_SKEEP_M_OF_N_S_LEN + 1];
3672} SKeepShare;
3673
3674// DSCReadShadow
3675#define DN_SC_M_OF_N_SHADOW_MATERIAL_V1_LEN (24)
3676#define DN_SC_M_OF_N_SHADOW_MATERIAL_V2_LEN (56)
3677#define DN_SC_M_OF_N_SHADOW_EXTRA_DATA_LEN (3)
3679#define DN_SC_M_OF_N_SHADOW_V1_MAX_LEN (DN_SC_M_OF_N_SHADOW_MATERIAL_V1_LEN + DN_SC_M_OF_N_SHADOW_EXTRA_DATA_LEN)
3680#define DN_SC_M_OF_N_SHADOW_V2_MAX_LEN (DN_SC_M_OF_N_SHADOW_MATERIAL_V2_LEN + DN_SC_M_OF_N_SHADOW_EXTRA_DATA_LEN)
3682#define DN_SC_M_OF_N_SHADOW_MATERIAL_MAX_LEN (DN_SC_M_OF_N_SHADOW_MATERIAL_V2_LEN)
3683#define DN_SC_M_OF_N_SHADOW_MAX_LEN (DN_SC_M_OF_N_SHADOW_V2_MAX_LEN)
3685#define DN_SC_MAX_PIN_LEN (8)
3687#define DN_SC_M_OF_N_SHADOW_V1_TYPE (1)
3688#define DN_SC_M_OF_N_SHADOW_V2_TYPE (2)
3693typedef struct tag_DN_SC_M_OF_N_SHADOW_DETAILS
3694{
3700
3704typedef struct tag_DN_SC_M_OF_N_SHADOW
3705{
3709
3710#ifdef _WIN32
3711 #pragma pack(pop)
3712#else
3713 #pragma pack()
3714#endif
3715
3716/* Library exported functions */
3717
3718#ifdef __cplusplus
3719 extern "C" {
3720#endif /* __cplusplus */
3721
3727#define DN_INIT_PARAM_CONF_FAST_FAIL (128)
3739 DWORD dwReserved
3740);
3741
3758 void *pvList,
3759 DWORD dwListCount,
3760 DWORD dwReserved);
3761
3777 void *pvList,
3778 DWORD *pdwListCount,
3779 DWORD dwReserved);
3780
3817 HSESSIONCTX * phSession,
3818 DWORD dwParam,
3819 BYTE * pbData,
3820 DWORD dwDataLen,
3821 DWORD dwFlags
3822);
3823
3841 HSESSIONCTX hSession,
3842 DWORD dwParam,
3843 BYTE * pbData,
3844 DWORD dwDataLen,
3845 DWORD dwFlags
3846);
3847
3868 HSESSIONCTX hSession,
3869 DWORD dwParam,
3870 BYTE* pbData,
3871 DWORD* pdwDataLen,
3872 DWORD dwFlags
3873);
3874
3889 HSESSIONCTX * phSession,
3890 DWORD dwFlags
3891);
3892
3901
3917typedef int (AAP_API * funcListKeyCallback)(char *szKeyName, void *pParam, BOOL bFinal);
3918
3923 HSESSIONCTX hSession,
3924 funcListKeyCallback fncallback,
3925 void *pParam
3930);
3931
3936 HSESSIONCTX hSession,
3937 funcListKeyCallback fncallback,
3938 void *pParam
3943);
3944
3967 HSESSIONCTX hSession,
3968 char * szBackupFile,
3969 char * szPin,
3970 int nDirection
3971);
3972
4000 DWORD dwOP,
4001 char *szObjectId,
4002 char *szPin,
4003 BYTE *pbData,
4004 DWORD *pdwDataLen,
4005 DWORD dwReserved );
4006
4014typedef int (AAP_API * funcLogEventCallback)(char *szEvent, void *pParam, BOOL bFinal);
4015
4028 HSESSIONCTX hSession,
4029 funcLogEventCallback fncallback,
4030 void *pParam
4031);
4032
4074 HSESSIONCTX hSession,
4075 DWORD dwParam,
4076 BYTE * pbData,
4077 DWORD dwDataLen,
4078 DWORD dwFlags
4079);
4080
4097int AAP_API DGetHSMTLSCert(char *szAddress,
4098 int nPort,
4099 DWORD dwOutFormat,
4100 BYTE **ppbOutCert,
4101 DWORD *pdwOutCertLen,
4102 DWORD dwFlags);
4103
4104#define DN_NT_MAX_TARGET_LEN (255)
4105#define DN_NTOOL_PING (1)
4106#define DN_NTOOL_TRACERT (2)
4107#define DN_NTOOL_CROSS_CHECK (100)
4108
4127 DWORD dwOption,
4128 const char *szTarget,
4129 void **pvResult,
4130 DWORD *pdwResultLen,
4131 DWORD dwFlags);
4132
4133#define DN_WRITE_FILE_OPT_CERT_CHAIN (1)
4134#define DN_WRITE_FILE_OPT_NO_CONVERSION (2)
4135
4160 const char *szFileId,
4161 BYTE *pbFile,
4162 DWORD dwFileSize,
4163 DWORD dwOptions);
4164
4175typedef int (AAP_API * funcReadLocalFileCallback)(BYTE *pbData, DWORD * pdwDataLen, void *pParam, BOOL *pbFinal);
4176
4199 HSESSIONCTX hSession,
4200 char * szFileId,
4201 DWORD dwFileSize,
4202 funcReadLocalFileCallback fncallback,
4203 void *pParam
4204);
4205
4216typedef int (AAP_API * funcWriteLocalFileCallback)(BYTE *pbData, DWORD dwDataLen, void *pParam, BOOL bFinal);
4217
4231 HSESSIONCTX hSession,
4232 char * szFileId,
4233 funcWriteLocalFileCallback fncallback,
4234 void *pParam
4235);
4236
4251 const char *szFileId,
4252 BYTE **ppbData,
4253 DWORD *pdwDataLen,
4254 DWORD dwReserved);
4255
4265 HSESSIONCTX hSession,
4266 char *szObjId);
4267
4282 HSESSIONCTX hSession,
4283 DWORD dwStart,
4284 DWORD dwOffset,
4285 DWORD *pdwLogSize,
4286 BYTE **ppbLog
4287);
4288
4299 HSESSIONCTX hSession
4300);
4301
4326int AAP_API DFindHSM( DWORD dwServiceType,
4327 DWORD dwFilter,
4328 void **ppvOutputData,
4329 DWORD *pdwOutputDataLen,
4330 DWORD dwFlags );
4331
4340typedef int (AAP_API * funcListAKeysCallback)(void *pvToken, void *pParam, BOOL bFinal);
4341
4389 BYTE bOP,
4390 DN_A_TOKEN_FULL *pstATokenFull,
4391 funcListAKeysCallback fnCallBack,
4392 void *pvCallbackParam,
4393 DWORD dwParam);
4394
4395#define DN_ATOKEN_CACHE_GET_COUNT (0)
4396#define DN_ATOKEN_CACHE_GC (1)
4397
4424 DWORD dwOP,
4425 void *pOutData,
4426 DWORD dwParam);
4427
4437 const char *szBindKey,
4438 DWORD dwReserved);
4447 DWORD dwReserved);
4448
4457int AAP_API DSCReadShadow(const char *szPin, DN_SC_M_OF_N_SHADOW *pstShadow, DWORD dwReserved);
4458
4459
4467int AAP_API DSCGetInfo(DN_SC_INFO *pstInfo, DWORD dwReserved);
4468
4476
4486int AAP_API DSCChangePIN(const char *szCurrentPIN, const char *szNewPIN, DWORD dwReserved);
4487
4498int AAP_API DSCWriteShadow(DN_SC_M_OF_N_SHADOW *pstShadow, const char *szPIN,
4499 BOOL bOverwrite, DWORD dwReserved);
4500
4508int AAP_API DSCErase(const char *szPIN, DWORD dwReserved);
4509
4510#define DN_SC_MAX_LABEL_LEN (32)
4521int AAP_API DSCSetLabel(const char *pin, const char *label, DWORD reserved);
4522
4532int AAP_API DSCGetLabel(const char *pin, char *label, DWORD reserved);
4533
4534// DNSAuthSetState
4535#define DN_S_NSAUTH_ASSOC (1)
4536#define DN_S_NSAUTH_RESET (2)
4537#define DN_S_NSAUTH_AUTH (3)
4538#define DN_S_NSAUTH_eAUTH (4)
4539#define DN_S_NSAUTH_CHECK (5)
4569int AAP_API DNSAuthSetState(HSESSIONCTX hSession, DWORD dwAcl, BYTE bState,
4570 DN_SC_M_OF_N_SHADOW *pstShadows, DWORD dwShadowsCount,
4571 DWORD dwReserved);
4572
4573/* Error codes */
4574
4578int AAP_API DGetErrorString(int nErrorValue,
4579 char *szErrorCode,
4580 char *szErrorDesc);
4581
4585typedef enum tag_RetCodeMsgType
4586{
4588 DESC_MSG
4590
4604const char *AAP_API DGetReturnCodeString(int nErrorValue,
4605 RetCodeMsgType eErrorType);
4606
4610 BYTE bOP,
4611 char *szUser,
4612 char *szIP,
4613 int(AAP_API *ListIpFilterCallback)(void *pInData, DWORD dwInDataLen, void *pParam, BOOL bFinal),
4614 void *pParam,
4615 DWORD *pdwStatus,
4616 DWORD dwReserved);
4617
4619 char *szOldObjName,
4620 char *szNewObjName,
4621 DWORD dwFlags);
4622
4623int AAP_API DUPackPush(HSESSIONCTX hSession, DWORD dwPackSize,
4624 BYTE *pbPack);
4625
4626int AAP_API DUPackInfo(DWORD dwPackSize, BYTE *pbPack,
4627 DWORD *pdwUPackVersion, BYTE **ppbUPackDescr,
4628 BYTE **ppbUPackSignature);
4629
4630int AAP_API DGetObjInfo(const HSESSIONCTX hSession, const char *szObjId,
4631 const int nAlgId, const BYTE *pbData,
4632 DWORD *pdwDataLen);
4633
4634int AAP_API DGenerateMapObj(const HSESSIONCTX hSession, const char *szMapId,
4635 const char *szObj1Id, const int nObj1AlgId,
4636 const char *szObj2Id, const int nObj2AlgId);
4637
4638int AAP_API DRemoveMapObj(const HSESSIONCTX hSession, const char *szMapObjId);
4639
4641 int(AAP_API *ListUserSessionsCallback)(DWORD dwStartTime, char *szInfo, void *pParam, BOOL bFinal),
4642 void *pParam);
4643
4645 DWORD dwFilterType,
4646 void *pvFilter,
4647 int(AAP_API *ListObjCallback)(void *pvIN, void *pParam, BOOL bFinal),
4648 void *pParam);
4649
4651 int(AAP_API *ListLoadedModulesCallback)(char *szModuleInfo,
4652 void *pParam,
4653 BOOL bFinal),
4654 void *pParam);
4655
4686 HSESSIONCTX hSession,
4687 struct USER_INFO userInfo);
4688
4702 HSESSIONCTX hSession,
4703 char *szUserId);
4704
4728 HSESSIONCTX hSession,
4729 DWORD dwParam,
4730 BYTE *pbData,
4731 DWORD dwDataLen,
4732 DWORD dwFlags);
4733
4752 HSESSIONCTX hSession,
4753 DWORD dwParam,
4754 BYTE *pbData,
4755 DWORD *pdwDataLen,
4756 DWORD dwFlags);
4757
4767typedef int(AAP_API *funcListUsersCallback)(char *szUserName, void *pParam, BOOL bFinal);
4768
4779 HSESSIONCTX hSession,
4780 funcListUsersCallback fncallback,
4781 void *pParam);
4782
4783// OATH SA
4784
4805 const char *szUserId,
4806 const DWORD dwParam,
4807 BYTE *pbData,
4808 const DWORD dwDataLen);
4809
4823 const DWORD dwParam,
4824 const char *szUserId);
4825
4839 char *szUser,
4840 char *szOTP1,
4841 char *szOTP2,
4842 DWORD dwParam);
4843
4846/* PKCS#11 */
4847
4848int AAP_API DGeneratePkcs11Map(HSESSIONCTX hSession, char *szP11MapId,
4849 BYTE bTemporary, DWORD dwBlobType,
4850 DWORD dwFlags, BYTE *pbData,
4851 DWORD dwDataLen);
4852
4853int AAP_API DUpdatePkcs11Map(HSESSIONCTX hSession, char *szP11MapId,
4854 DWORD dwBlobType, DWORD dwFlags,
4855 DWORD dwUpdateMask, BYTE *pbData,
4856 DWORD dwDataLen);
4857
4858int AAP_API DGetPkcs11Map(HSESSIONCTX hSession, char *szP11MapId,
4859 DWORD dwBlobType, DWORD dwFlags,
4860 BYTE **ppbData, DWORD *pdwDataLen);
4861
4863 int(AAP_API *ListKeyCallback)(char *szKeyName,
4864 void *pParam,
4865 BOOL bFinal),
4866 void *pParam);
4867
4868
4869#define MNG_OBJ_META_A_KEY_TYPE (1)
4870#define MNG_OBJ_META_A_CLASS (2)
4871#define MNG_OBJ_META_A_EXTRACTABLE (3)
4872#define MNG_OBJ_META_A_SENSITIVE (4)
4873#define MNG_OBJ_META_A_N_EXTRACTABLE (5)
4874#define MNG_OBJ_META_A_LOCAL (6)
4875#define MNG_OBJ_META_A_CERT_TYPE (7)
4876#define MNG_OBJ_META_A_RSA_MODULUS (8)
4877#define MNG_OBJ_META_A_RSA_PUB_EXP (9)
4878#define MNG_OBJ_META_A_PUB_KEY_INFO (10)
4879#define MNG_OBJ_META_A_EC_PARAMS (11)
4880#define MNG_OBJ_META_A_SUBJECT (12)
4881#define MNG_OBJ_META_A_ISSUER (13)
4882#define MNG_OBJ_META_A_SN (14)
4883#define MNG_OBJ_META_A_TOKEN (15)
4884#define MNG_OBJ_META_A_MODIFIABLE (16)
4885#define MNG_OBJ_META_A_DERIVE (17)
4886#define MNG_OBJ_META_A_WRAP (18)
4887#define MNG_OBJ_META_A_UNWRAP (19)
4888#define MNG_OBJ_META_A_SIGN (20)
4889#define MNG_OBJ_META_A_VERIFY (21)
4890#define MNG_OBJ_META_A_ENCRYPT (22)
4891#define MNG_OBJ_META_A_DECRYPT (23)
4892#define MNG_OBJ_META_A_OBJ_ID (24)
4893#define MNG_OBJ_META_A_MODULUS_BITS (25)
4894#define MNG_OBJ_META_A_PRIVATE (26)
4895#define MNG_OBJ_META_A_LABEL (27)
4896#define MNG_OBJ_META_A_ID (28)
4897#define MNG_OBJ_META_A_APPLICATION (29)
4898#define MNG_OBJ_META_A_TRUSTED (30)
4899#define MNG_OBJ_META_A_JMIDP_SEC_DOMAIN (31)
4900#define MNG_OBJ_META_A_CERT_CATEGORY (32)
4901#define MNG_OBJ_META_A_KEY_GEN_MECHANISM (33)
4902#define MNG_OBJ_META_A_WRAP_WITH_TRUSTED (34)
4903#define MNG_OBJ_META_A_HSM_ASSOCIATE (35)
4904#define MNG_OBJ_META_A_SIGN_RECOVER (36)
4905#define MNG_OBJ_META_A_VERIFY_RECOVER (37)
4906
4907#define MNG_OBJ_META_A_HSM_OBJ_VERSION (502)
4908#define MNG_OBJ_META_A_HSM_OBJ_TYPE (503)
4909#define MNG_OBJ_META_A_HSM_OBJ_ATTR (504)
4910#define MNG_OBJ_META_A_HSM_OBJ_LEN (505)
4911#define MNG_OBJ_META_A_HSM_OBJ_ID (506)
4912#define MNG_OBJ_META_A_HSM_OBJ_PVALUE (507)
4913#define MNG_OBJ_META_A_HSM_OBJ_CNG_UTF8_ID (508) // Client side attribute
4914
4915#define MNG_OBJ_META_READ_ONLY_ATTR(a) ((MNG_OBJ_META_A_KEY_TYPE == (a)) || \
4916 (MNG_OBJ_META_A_CLASS == (a)) || \
4917 (MNG_OBJ_META_A_EXTRACTABLE == (a)) || \
4918 (MNG_OBJ_META_A_SENSITIVE == (a)) || \
4919 (MNG_OBJ_META_A_N_EXTRACTABLE == (a)) || \
4920 (MNG_OBJ_META_A_LOCAL == (a)) || \
4921 (MNG_OBJ_META_A_CERT_TYPE == (a)) || \
4922 (MNG_OBJ_META_A_RSA_MODULUS == (a)) || \
4923 (MNG_OBJ_META_A_RSA_PUB_EXP == (a)) || \
4924 (MNG_OBJ_META_A_PUB_KEY_INFO == (a)) || \
4925 (MNG_OBJ_META_A_EC_PARAMS == (a)) || \
4926 (MNG_OBJ_META_A_ISSUER == (a)) || \
4927 (MNG_OBJ_META_A_SN == (a)) || \
4928 (MNG_OBJ_META_A_TOKEN == (a)) || \
4929 (MNG_OBJ_META_A_MODIFIABLE == (a)) || \
4930 (MNG_OBJ_META_A_MODULUS_BITS == (a)) || \
4931 (MNG_OBJ_META_A_PRIVATE == (a)) || \
4932 (MNG_OBJ_META_A_HSM_OBJ_VERSION == (a)) || \
4933 (MNG_OBJ_META_A_HSM_OBJ_TYPE == (a)) || \
4934 (MNG_OBJ_META_A_HSM_OBJ_ATTR == (a)) || \
4935 (MNG_OBJ_META_A_HSM_OBJ_LEN == (a)) || \
4936 (MNG_OBJ_META_A_HSM_OBJ_ID == (a)) || \
4937 (MNG_OBJ_META_A_HSM_OBJ_PVALUE == (a)) || \
4938 (MNG_OBJ_META_A_DERIVE == (a)) || \
4939 (MNG_OBJ_META_A_WRAP == (a)) || \
4940 (MNG_OBJ_META_A_UNWRAP == (a)) || \
4941 (MNG_OBJ_META_A_SIGN == (a)) || \
4942 (MNG_OBJ_META_A_VERIFY == (a)) || \
4943 (MNG_OBJ_META_A_ENCRYPT == (a)) || \
4944 (MNG_OBJ_META_A_DECRYPT == (a)) || \
4945 (MNG_OBJ_META_A_SIGN_RECOVER == (a)) || \
4946 (MNG_OBJ_META_A_VERIFY_RECOVER == (a)))
4947
4948/* DManageObjMetadata */
4949
4950#define MNG_OBJ_META_GET (1)
4951#define MNG_OBJ_META_UPDATE (3)
4952#define MNG_OBJ_META_DEL (4)
4953
4954
4956 DWORD dwParam );
4957
4959 DWORD dwParam );
4960
4962 DWORD dwOption,
4963 void *pvOptionData,
4964 DWORD dwOptionDataLen,
4965 DWORD dwParam );
4966
4968 DWORD dwOption,
4969 DWORD dwParam );
4970
4972 DWORD dwOption,
4973 void *pvOptionData,
4974 DWORD *pdwOptionDataLen,
4975 DWORD dwParam );
4976
4978 char *szData,
4979 DWORD dwDataLen,
4980 DWORD dwParam);
4981
4983 char *szData,
4984 DWORD *pdwDataLen,
4985 DWORD dwParam);
4986
4988 BYTE bOP,
4989 char *szObjName,
4990 HOBJMETACTX hInMeta,
4991 HOBJMETACTX *phOutMeta,
4992 DWORD dwParam );
4993
4995 HOBJMETACTX hInMeta,
4996 HOBJMETASEARCHCTX *phMetaSearchCtx,
4997 DWORD dwParam );
4998
5000 HOBJMETACTX *phOutMeta,
5001 DWORD dwOutMetaMaxCount,
5002 DWORD *pdwOutMetaDataCount,
5003 DWORD dwParam );
5004
5006 DWORD dwParam );
5007
5008#define MNG_OBJ_META_TYPE_ULONG (1)
5009#define MNG_OBJ_META_TYPE_STR (2)
5010#define MNG_OBJ_META_TYPE_BOOL (3)
5011#define MNG_OBJ_META_TYPE_INT_BOOL (4)
5012
5013typedef struct tag_OBJ_MET_ATTR
5014{
5016 const char *pszString;
5019
5021 void *pvData,
5022 DWORD *pdwDataLen,
5023 DWORD dwReserved );
5024
5026
5027
5028#define DN_MAX_OBJ_JSON_STRING (15 * 1024)
5030#define DN_JSON_OUT_TYPE_PRETTY (0)
5031#define DN_JSON_OUT_TYPE_RAW (1)
5032#define DN_JSON_OUT_TYPE_COMPACT (2)
5051 const char *szId,
5052 DWORD dwOutType,
5053 char **pszOutJson,
5054 DWORD *pdwOutJsonLen);
5055
5068 const char *szId,
5069 const char *szJson,
5070 DWORD dwJsonLen,
5071 DWORD dwReserved);
5072/* P11 HSM Info */
5073
5075 HP11ATTRCTX *phOutMeta,
5076 DWORD dwParam );
5077
5078#define MNG_HSM_P11_INFO_SLOT_DESC (1)
5079#define MNG_HSM_P11_INFO_MANUFACTURER_ID (2)
5080#define MNG_HSM_P11_INFO_SLOT_FLAGS (3)
5081#define MNG_HSM_P11_INFO_HDW_VERSION (4)
5082#define MNG_HSM_P11_INFO_FMW_VERSION (5)
5083#define MNG_HSM_P11_INFO_LABEL (6)
5084#define MNG_HSM_P11_INFO_MODEL (7)
5085#define MNG_HSM_P11_INFO_SERIAL_NUMBER (8)
5086#define MNG_HSM_P11_INFO_TOKEN_FLAGS (9)
5087#define MNG_HSM_P11_INFO_UTC_TIME (10)
5088#define MNG_HSM_P11_INFO_MAX_SESSION_COUNT (11)
5089#define MNG_HSM_P11_INFO_SESSION_COUNT (12)
5090#define MNG_HSM_P11_INFO_MAX_RW_SESS_COUNT (13)
5091#define MNG_HSM_P11_INFO_RW_SESS_COUNT (14)
5092#define MNG_HSM_P11_INFO_MAX_PIN_LEN (15)
5093#define MNG_HSM_P11_INFO_MIN_PIN_LEN (16)
5094#define MNG_HSM_P11_INFO_TOTAL_PUB_MEMORY (17)
5095#define MNG_HSM_P11_INFO_FREE_PUB_MEMORY (18)
5096#define MNG_HSM_P11_INFO_TOTAL_PRIV_MEMORY (19)
5097#define MNG_HSM_P11_INFO_FREE_PRIV_MEMORY (20)
5098#define MNG_HSM_P11_INFO_SVMK_FINGERPRINT (21)
5099#define MNG_HSM_INFO_TAMPERED_HSM (22)
5100#define MNG_HSM_INFO_OP_MODE (23)
5101#define MNG_HSM_INFO_DS_BOUND (24)
5102#define MNG_HSM_INFO_DS_HSM (25)
5103#define MNG_HSM_INFO_DS_ACCOUNT (26)
5104#define MNG_HSM_INFO_DS_URL (27)
5105#define MNG_HSM_INFO_DNS1 (28)
5106#define MNG_HSM_INFO_DNS2 (29)
5107#define MNG_HSM_INFO_REMOOT (30)
5108
5110 DWORD dwOption,
5111 void *pvOptionData,
5112 DWORD *pdwOptionDataLen,
5113 DWORD dwParam );
5114
5116 DWORD dwParam );
5117
5119
5120
5121
5122/* Users */
5123
5124
5125int AAP_API DGetUserAcl ( HSESSIONCTX hSession, char *szUser,
5126 DWORD *pdwUserAcl );
5127
5128int AAP_API DListUserTrusts(HSESSIONCTX hSession, char *szUserId,
5129 BYTE bType,
5130 int (AAP_API * ListUserTrustCallback)(char *szUserName,
5131 DWORD dwACL,
5132 void *pParam,
5133 BOOL bFinal),
5134 void *pParam);
5135
5136
5137/* Statistics */
5138
5139int AAP_API DGetHsmInfo(HSESSIONCTX hSession, BOOL *pbFinal,
5140 DWORD dwParam, BYTE * pbData,
5141 DWORD* pdwDataLen, DWORD dwFlags);
5142
5143
5144/* Local operations */
5145
5147 BYTE * pbData, DWORD dwDataLen,
5148 DWORD dwFlags);
5149
5151 BYTE * pbData, DWORD *pdwDataLen,
5152 DWORD dwFlags);
5153
5154int AAP_API DGetLibVersion(HSESSIONCTX hSession, char * szVersion,
5155 DWORD *pdwVersionLen, DWORD dwFlags);
5156
5157
5158/* Key management */
5159
5160int AAP_API DECParam2AlgId(BYTE *pbECParam, DWORD dwECParamLen,
5161 int *pnAlgId, DWORD dwFlags);
5162
5163int AAP_API DECPubKeyDER2AlgId( BYTE *pbECPubKeyDER,
5164 DWORD dwECPubKeyDERLen,
5165 int *pnAlgId,
5166 DWORD dwFlags );
5167
5339 HSESSIONCTX hSession,
5340 char *szKeyId,
5341 int nAlgId,
5342 DWORD dwFlags,
5343 HKEYCTX * phKey
5344);
5345
5359 int nAlgId,
5360 BYTE *pbData,
5361 DWORD *pdwDataLen,
5362 DWORD dwReserved);
5363
5382 HSESSIONCTX hSession,
5383 char *szKeyId,
5384 DWORD dwFlags,
5385 HKEYCTX * phKey
5386);
5387
5388
5389
5390#define D_IMPORT_ALG_PRIV_KEY_RSA (0xFFFFFFE1) /* Importa uma chave privada RSA. */
5391#define D_IMPORT_ALG_PRIV_KEY_ECC (0xFFFFFFE0) /* Importa uma chave privada ECC(Curvas Elípticas com exceção de ECX). */
5392#define D_IMPORT_ALG_PRIV_KEY_P8 (0xFFFFFFDF) /* Importa uma chave no formato P8 */
5393#define D_IMPORT_ALG_PRIV_KEY_ECX (0xFFFFFFDE) /* Import uma chave privada ECX */
5394
5474 HSESSIONCTX hSession,
5475 char *szKeyId,
5476 HKEYCTX hKEKey,
5477 DWORD dwBlobType,
5478 int nAlgId,
5479 DWORD dwFlags,
5480 BYTE * pbData,
5481 DWORD dwDataLen,
5482 HKEYCTX * phKey
5483);
5484
5500 HKEYCTX hKey,
5501 HKEYCTX hKEKey,
5502 DWORD dwBlobType,
5503 DWORD dwFlags,
5504 BYTE * pbData,
5505 DWORD * pdwDataLen
5506);
5507
5541 HSESSIONCTX hSession,
5542 char *szKeyId,
5543 char *szSecret,
5544 DWORD dwKeyAlg,
5545 DWORD dwAttrib,
5546 BYTE *pbKeyEnvelope,
5547 DWORD dwKeyEnvelopeLen
5548);
5549
5563 HSESSIONCTX hSession,
5564 char *szKeyId,
5565 char *szSecret,
5566 BYTE **ppbKeyEnvelope,
5567 DWORD *pdwKeyEnvelopeLen
5568);
5569
5590 HKEYCTX hKey,
5591 DWORD dwParam,
5592 BYTE * pbData,
5593 DWORD dwDataLen,
5594 DWORD dwFlags
5595);
5596
5621 HKEYCTX hKey,
5622 DWORD dwParam,
5623 BYTE * pbData,
5624 DWORD *pdwDataLen,
5625 DWORD dwFlags
5626);
5627
5640 HHASHCTX hHash,
5641 char * szKeyId,
5642 int nAlgId,
5643 DWORD dwFlags,
5644 HKEYCTX * phKey
5645);
5646
5659 HKEYCTX hKey,
5660 DWORD dwFlags,
5661 HKEYCTX * phKey
5662);
5663
5676 HKEYCTX hKey,
5677 HHASHCTX hHash,
5678 DWORD dwFlags
5679);
5680
5693 HKEYCTX * phKey,
5694 DWORD dwFlags
5695);
5696
5734 char *szPrivateKeyName,
5735 BYTE bVersion,
5736 char *szDN,
5737 DWORD dwOutType,
5738 DWORD *pdwCSRLen,
5739 BYTE **ppbCSR,
5740 DWORD dwParam);
5741
5766 char *szPriKey,
5767 char *szPubKey,
5768 char *szCert,
5769 void *pvReserved,
5770 DWORD dwReserved);
5771
5794 const char *szPkcs12Pwd,
5795 const char *szKeyId,
5796 const char *szCertId,
5797 const char *szReserved,
5798 BYTE **ppbPkcs12,
5799 DWORD *pdwPkcs12Len,
5800 DWORD dwFlags);
5801
5820 BYTE *pbPkcs12,
5821 DWORD dwPkcs12Len,
5822 const char *szPkcs12Pwd,
5823 const char *szKeyId,
5824 DWORD dwKeyAttr,
5825 const char *szCertId,
5826 const char *szPubKeyId,
5827 DWORD dwFlags);
5828
5844 const char *szPkcs12File,
5845 const char *szPkcs12Pwd,
5846 const char *szKeyId,
5847 const DWORD dwKeyAttr,
5848 const char *szCertId);
5849
5850#define DN_FORM_DER (1)
5867int AAP_API DRSAPublicKey2Info(BYTE *pbKey, DWORD dwKeyLen, DWORD dwInForm,
5868 void *pvPubKeyInfo, DWORD dwReserved);
5869
5886int AAP_API DRSAPrivateKey2Info(const BYTE *pbRsa, DWORD dwRsaLen, DWORD dwInForm,
5887 DN_RSA_PRIVATE_KEY_INFO *stRsaInfo, DWORD dwReserved);
5888
5890typedef struct tag_DN_EXPORT_BYOK_AZURE{
5891 char *szKeKKid;
5895
5896#define DN_BYOK_TYPE_AZURE (1)
5897#define DN_BYOK_TYPE_AWS (2)
5917int AAP_API DByokExport(HSESSIONCTX hSession, const char *cszKeyId,
5918 const char *cszKekId, DWORD dwType,
5919 const void *pvData, BYTE **ppbOutData,
5920 DWORD *pdwOutDataLen, DWORD dwReserved);
5921
5945 DWORD dwOp,
5946 BYTE *pbInData,
5947 BYTE *pbTokenBlob,
5948 DWORD *pdwTokenBlobLen,
5949 char *szToken,
5950 DWORD dwReserved);
5951
5997 DWORD dwOp,
5998 const char *szMK,
5999 const char *szMask,
6000 BYTE *pbTokenBlob,
6001 DWORD dwTokenBlobLen,
6002 char *szData,
6003 DWORD *pdwDataLen,
6004 DWORD dwReserved);
6005
6008int AAP_API DRemoveKey(HSESSIONCTX hSession, char *szKeyId);
6009
6011 DWORD dwCertLen,
6012 DWORD dwOutType,
6013 void *pvCertInfo,
6014 DWORD dwFlags );
6015
6016/* Symmetric/Asymmetric operations */
6017
6047 HKEYCTX hKey,
6048 HHASHCTX hHash,
6049 BOOL bFinal,
6050 DWORD dwFlags,
6051 BYTE* pbData,
6052 DWORD* pdwDataLen,
6053 DWORD dwBufLen
6054);
6055
6077 HKEYCTX hKey,
6078 HHASHCTX hHash,
6079 BOOL bFinal,
6080 DWORD dwFlags,
6081 BYTE* pbData,
6082 DWORD* pdwDataLen
6083);
6084
6118 HSESSIONCTX hSession,
6119 int nAlgId,
6120 HKEYCTX hKey,
6121 DWORD dwFlags,
6122 HHASHCTX *hHash
6123);
6124
6136 HHASHCTX hHash,
6137 BYTE* pbData,
6138 DWORD dwDataLen,
6139 DWORD dwFlags
6140);
6141
6158 HHASHCTX hHash,
6159 DWORD dwParam,
6160 BYTE * pbData,
6161 DWORD dwDataLen,
6162 DWORD dwFlags
6163);
6164
6182 HHASHCTX hHash,
6183 DWORD dwParam,
6184 BYTE* pbData,
6185 DWORD* pdwDataLen,
6186 DWORD dwFlags
6187);
6188
6221 HHASHCTX hHash,
6222 HKEYCTX hKey,
6223 DWORD dwFlags,
6224 BYTE* pbSignature,
6225 DWORD* pdwSigLen
6226);
6227
6228
6237 HHASHCTX * phHash
6238);
6239
6258 HHASHCTX hHash,
6259 BYTE* pbSignature,
6260 DWORD dwSigLen,
6261 HKEYCTX hPubKey,
6262 DWORD dwFlags
6263);
6264
6277 HHASHCTX hHash,
6278 DWORD dwFlag,
6279 HHASHCTX * phHash
6280);
6281
6292 HSESSIONCTX hSession,
6293 BYTE *pbData,
6294 DWORD dwDataLen
6295);
6296
6316 HSESSIONCTX hSession,
6317 DWORD dwOP,
6318 char *szPriKey,
6319 void *pvInData,
6320 DWORD dwInDataLen,
6321 BYTE *pbOutData,
6322 DWORD *pdwOutDataLen,
6323 DWORD dwFlags
6324);
6325
6338 char *szCRL,
6339 char *szCertId,
6340 char *szVerifyInfo);
6341
6360 BYTE bM,
6361 BYTE bN,
6362 BYTE *pbSecret,
6363 DWORD dwSecretLen,
6364 DN_M_OF_N_SPLIT_INFO *pstSplitInfo,
6365 DWORD dwReserved);
6366
6383 DN_M_OF_N_PART *pstParts,
6384 DWORD dwPartsCount,
6385 BYTE *pbSecret,
6386 DWORD dwReserved);
6387
6406int AAP_API DGenerateSVMK(HSESSIONCTX hSession, int nVersion, const BYTE *pbKey,
6407 BYTE bM, BYTE bN, DN_SC_M_OF_N_SHADOW *pstShadows,
6408 DWORD dwReserved);
6409
6426 BYTE bShadowsCount, BYTE *pbKey, DWORD dwReserved);
6427
6430/* PIN - CVV */
6431
6461 HSESSIONCTX hSession,
6462 char *szSrcPEK,
6463 char *szDstPEK,
6464 BYTE bTransBlockType,
6465 char *szPAN,
6466 BYTE *pbInPinBlock,
6467 BYTE *pbOutPinBlock,
6468 DWORD dwParam);
6469
6488 HSESSIONCTX hSession,
6489 char *szKeyId,
6490 char *szPAN,
6491 char *szExpirationDate,
6492 char *szServiceCode,
6493 char *szCVV,
6494 DWORD dwParam
6495);
6496
6511 HSESSIONCTX hSession,
6512 char *szKeyId,
6513 char *szPAN,
6514 char *szExpirationDate,
6515 char *szServiceCode,
6516 char *szCVV,
6517 DWORD dwParam
6518);
6519
6541 HSESSIONCTX hSession,
6542 char *szPGK,
6543 char *szPAN,
6544 DWORD dwOperation,
6545 int nPinLen,
6546 char *szInPin,
6547 char *szOffset,
6548 char *szOutPin,
6549 DWORD dwParam
6550);
6551
6566 HSESSIONCTX hSession,
6567 char *szPTK,
6568 char *szPGK,
6569 char *szPAN,
6570 char *szOffset,
6571 BYTE *pbInPinBlock,
6572 DWORD dwParam
6573);
6574
6587 int nKeyAlgId,
6588 EFT_VISA_KEY_PARTS *pstKeyParts,
6589 DWORD dwParam
6590);
6591
6613 HSESSIONCTX hSession,
6614 BYTE *pbKSI,
6615 BYTE *pbDID_CTR,
6616 char *szDUKPT,
6617 DWORD dwParam
6618);
6619
6630 BYTE *pbKSI,
6631 char *szBDKName,
6632 DWORD dwParam
6633);
6634
6646 BYTE *pbKSI,
6647 BYTE *pbDID_CTR,
6648 char *szDUKPTName,
6649 DWORD dwParam
6650);
6651
6666 HSESSIONCTX hSession,
6667 char *szPGK,
6668 BYTE bPVKI,
6669 char *szPAN,
6670 char *szPIN,
6671 char *szPVV,
6672 DWORD dwParam
6673);
6674
6688 HSESSIONCTX hSession,
6689 char *szIMKDAC,
6690 char *szPAN,
6691 BYTE *pbSEQ,
6692 BYTE *pbDAC,
6693 DWORD dwParam
6694);
6695
6709 HSESSIONCTX hSession,
6710 char *szIMKDAC,
6711 char *szPAN,
6712 BYTE *pbSEQ,
6713 BYTE *pbDAC,
6714 DWORD dwParam
6715);
6716
6732 HSESSIONCTX hSession,
6733 char *szIK,
6734 BYTE *pbDAC,
6735 DWORD dwSDA_DATALen,
6736 BYTE *pbSDA_DATA,
6737 DWORD *pdwSigLen,
6738 BYTE *pbSig,
6739 DWORD dwParam
6740);
6741
6761 HSESSIONCTX hSession,
6762 BYTE bOP,
6763 char *szIK,
6764 char *szPAN,
6765 DWORD dwDDA_DATALen,
6766 BYTE *pbDDA_DATA,
6767 DWORD *pdwSigLen,
6768 BYTE *pbSig,
6769 DWORD dwParam
6770);
6771
6792 HSESSIONCTX hSession,
6793 BYTE bOP,
6794 char *szIK,
6795 char *szKeK,
6796 char *szPAN,
6797 BYTE *pbSEQ,
6798 DWORD *pdwEnvelopeLen,
6799 BYTE *pbEnvelope,
6800 DWORD dwParam
6801);
6802
6808 HSESSIONCTX hSession,
6809 BYTE bOP,
6810 char *szIK,
6811 char *szPAN,
6812 BYTE *pbSEQ,
6813 BYTE *pbNONCE,
6814 DWORD dwDataLen,
6815 BYTE *pbData,
6816 BYTE *pbMAC,
6817 DWORD dwParam
6818);
6819
6864 HSESSIONCTX hSession,
6865 BYTE bOP,
6866 char *szIK,
6867 char *szPAN,
6868 BYTE *pbSEQ,
6869 BYTE *pbNONCE,
6870 DWORD dwDataLen,
6871 BYTE *pbData,
6872 BYTE *pbMAC,
6873 DWORD dwParam
6874);
6875
6891 HSESSIONCTX hSession,
6892 char *szIK,
6893 char *szPAN,
6894 BYTE *pbSEQ,
6895 BYTE *pbATC,
6896 BYTE *pbUN,
6897 BYTE *pbIDN,
6898 DWORD dwParam
6899);
6900
6939 HSESSIONCTX hSession,
6940 BYTE bEncOP,
6941 char *szEncIK,
6942 BYTE *pbEncNONCE,
6943 BYTE bMacOP,
6944 char *szMacIK,
6945 BYTE *pbMacNONCE,
6946 char *szPAN,
6947 BYTE *pbSEQ,
6948 DWORD dwDataLen,
6949 BYTE *pbData,
6950 DWORD *pdwEncDataLen,
6951 BYTE *pbEncData,
6952 BYTE *pbMAC,
6953 DWORD dwParam
6954);
6955
6980 HSESSIONCTX hSession,
6981 BYTE bOP,
6982 char *szIK,
6983 BYTE *pbTrackNum,
6984 BYTE *pbServiceID,
6985 BYTE *pbIssuerID,
6986 BYTE *pbExpDate,
6987 DWORD *pdwCSRLen,
6988 BYTE *pbCSR,
6989 DWORD dwParam
6990);
6991
7015 HSESSIONCTX hSession,
7016 BYTE bOP,
7017 char *szIK,
7018 BYTE *pbTrackNum,
7019 BYTE *pbServiceID,
7020 BYTE *pbIssuerID,
7021 BYTE *pbExpDate,
7022 DBLOB *pdbCSR,
7023 BYTE *pbHash,
7024 DWORD dwParam
7025);
7026
7067 HSESSIONCTX hSession,
7068 BYTE bOP,
7069 BYTE *pbNONCE,
7070 char *szTransportKey,
7071 char *szISSUER_MK,
7072 char *szISSUER_SMC_MK,
7073 char *szPAN,
7074 BYTE *pbSEQ,
7075 BYTE *pbOLD_PB,
7076 BYTE *pbNEW_PB,
7077 BYTE *pbOutBlock,
7078 DWORD *pdwOutBlockLen,
7079 DWORD dwParam
7080);
7081
7087 HSESSIONCTX hSession,
7088 char *szSrcKey,
7089 WORD wBufferLen,
7090 BYTE *pbBuffer,
7091 BYTE bOP,
7092 DWORD dwAttrib,
7093 char *szDstKey,
7094 HKEYCTX *phKey,
7095 DWORD dwParam
7096);
7097
7115 HSESSIONCTX hSession,
7116 char *szIssuerMK,
7117 char *szPAN,
7118 BYTE *pbSEQ,
7119 BYTE *pbARQC,
7120 BYTE *pbARC,
7121 BYTE *pbARPC,
7122 DWORD dwParam
7123);
7124
7125
7126#define DN_CALC_ARPC_EMV_4_2_M1_ICC (1)
7127#define DN_CALC_ARPC_EMV_4_2_M1_SK (2)
7128#define DN_CALC_ARPC_EMV_4_2_M2 (3)
7129
7149 DWORD dwOp,
7150 void *pvInData,
7151 BYTE *pbARPC,
7152 DWORD dwParam );
7153
7167 DWORD dwType,
7168 BYTE *pbKey,
7169 DWORD dwAlg,
7170 const BYTE *pbMsg,
7171 DWORD dwMsgLen,
7172 BYTE *pbMAC
7173);
7174
7175#define DN_EFT_AES_KCV_TYPE_CMAC (1)
7199int AAP_API DEFTImportKey(HSESSIONCTX hSession, char *szKeyId,
7200 int nKeyAlgId, void *pstKeyParts,
7201 DWORD dwParam);
7202
7219#define DN_EFT_GET_KCV_TYPE_X9_24 (1)
7220#define DN_EFT_GET_KCV_TYPE_CMAC (2)
7223 const char *szKeyId, void *pvKeyParts,
7224 DWORD dwReserved);
7225
7226int AAP_API DEFTExportKey(HSESSIONCTX hSession, BYTE bExportMode,
7227 char *szKEKId, char *szKeyId,
7228 BYTE *pbEncryptedBlock, DWORD *pdwEncryptedBlockLen,
7229 BYTE *pbKeyCheckValue, DWORD dwParam);
7230
7231int AAP_API DEFTKeKImport( HSESSIONCTX hSession, BYTE bOP, DWORD dwAlgId,
7232 char *szKeKName, char *szKeyName, DWORD dwAttr,
7233 BYTE *pbKCV1, BYTE *pbKCV2, BYTE *pbKCV3,
7234 BYTE *pbKCVFinal, BYTE *pbBlob, DWORD dwFlags );
7235
7236/* DEFTExportZPK */
7237
7238#define DN_EXP_ZPK_FLAG_FULL_CKS (1)
7258int AAP_API DEFTExportZPK(HSESSIONCTX hSession, char *szKeyId,
7259 int *pnKeyAlg, int *pnKeySize,
7260 EFT_VISA_KEY_PARTS *pstKeyParts, DWORD dwParam);
7261
7262#define DN_EFT_GET_KCV_MAX_LEN (3)
7277int AAP_API DEFTGetKcv(HSESSIONCTX hSession, BYTE bType, const char *szKeyId,
7278 BYTE *pbKcv, DWORD *pdwKcvLen, DWORD dwReserved);
7279
7280
7281#define DN_EFT_GEN_OFFLINE_KCV_TYPE_X9_24 (1)
7282#define DN_EFT_GEN_OFFLINE_KCV_TYPE_CMAC (2)
7284#define DN_EFT_KCV_TYPE_X9_24_LEN (3)
7285#define DN_EFT_KCV_TYPE_CMAC_LEN (3)
7304int AAP_API DEFTGenKCVOffline(DWORD dwType, int nAlgId, const BYTE *pbKey,
7305 DWORD dwKeyLen, BYTE *pbKCV, DWORD *pdwKCVLen,
7306 DWORD reserved);
7391 const char *szKBPK,
7392 const char *szKey,
7393 void *pvReserved,
7394 WORD wUsage,
7395 BYTE bMode,
7396 BYTE bExport,
7397 BYTE *pbOutBlock,
7398 DWORD *pdwOutBlockLen,
7399 DWORD dwParam);
7400
7421 const char *szKBPK,
7422 const char *szKey,
7423 DWORD dwKeyAttributes,
7424 BYTE *pbKeyBlock,
7425 DWORD dwKeyBlockLen,
7426 DWORD dwParam);
7429/* Digital signature */
7430
7431int AAP_API DPowerSignHash(HSESSIONCTX hSession, char *szKeyId,
7432 int nHashAlgId, DWORD dwDataLen,
7433 BYTE *pbDataBuffer, DWORD *pdwSignLen,
7434 BYTE **ppbSignData);
7435
7470 HSESSIONCTX hSession,
7471 const char *szKeyName,
7472 const char *szKeyCert,
7473 const char *szCerts,
7474 DWORD dwAttrib,
7475 BYTE *pbContent,
7476 DWORD dwContentLen,
7477 DWORD *pdwSignatureLen,
7478 BYTE **ppbSignature,
7479 DWORD dwParam
7480);
7481
7485/* (CNS) Social Connectivity */
7487 char *szKeyID, char *szUsrID, char *szUsrName,
7488 WORD wModulusLen, BYTE *pbModulus,
7489 BYTE bExponentLen, BYTE *pbExponent,
7490 DWORD *pdwCertLen, BYTE *pbCert, DWORD dwParam );
7491
7492/* Hash */
7493int AAP_API DSignHashedData( HKEYCTX hKey, BYTE *pbData, DWORD dwDataLen,
7494 int nHashId, DWORD dwFlags, BYTE* pbSignature,
7495 DWORD* pdwSigLen );
7496
7498 DWORD dwPadding,
7499 BYTE*pbBlock,
7500 BYTE *pbData,
7501 DWORD* pdwDataLen,
7502 DWORD dwBlockSize,
7503 DWORD dwFlag );
7504
7506 BYTE *pbBlock,
7507 DWORD dwBlockCount,
7508 DWORD dwFlags );
7509
7510/* Base64 */
7511
7513 DWORD dwDataLen,
7514 char *szBase64,
7515 DWORD *pdwBase64Len,
7516 BOOL bNoNewLines );
7517
7519 DWORD dwBase64Len,
7520 BYTE *pbData,
7521 DWORD *pdwDataLen);
7522
7523
7558 HKEYCTX hKey,
7559 HHASHCTX hHash,
7560 char *szCertId,
7561 DWORD dwSizeUnsignedXml,
7562 BYTE *pbUnsignedXml,
7563 DWORD dwFilterLen,
7564 BYTE *pbFilter,
7565 DWORD *pdwSizeSignedXml,
7566 BYTE **ppbSignedXml
7567);
7568
7629 BYTE bHashMode,
7630 DWORD dwFlags,
7631 const char *szKeyId,
7632 const char *szCertId,
7633 DWORD dwSizeUnsignedXml,
7634 BYTE *pbUnsignedXml,
7635 DWORD dwFilterLen,
7636 BYTE *pbFilter,
7637 DWORD *pdwSizeSignedXml,
7638 BYTE **ppbSignedXml);
7639
7645int AAP_API DVerifySignedXml ( HSESSIONCTX hSession, char *szCertsId,
7646 DWORD dwSizeSignedXml, BYTE *pbSignedXml,
7647 DWORD dwFilterLen, BYTE *pbFilter);
7648
7669 HSESSIONCTX hSession,
7670 char *szCertsId,
7671 DWORD dwSizeSignedXml,
7672 BYTE *pbSignedXml,
7673 DWORD dwFilterLen,
7674 BYTE *pbFilter,
7675 char *szCRL
7676);
7677
7713 const char *szKeyId,
7714 const char *szCertId,
7715 DWORD dwFlags,
7716 DWORD dwSizeUnsignedPIXEnvelope,
7717 BYTE *pbUnsignedPIXEnvelope,
7718 DWORD *pdwSizeSignedPIXEnvelope,
7719 BYTE **ppbSignedPIXEnvelope);
7720
7721
7736 const char *szChainId,
7737 const char *szCRL,
7738 DWORD dwFlags,
7739 DWORD dwSizeSignedPIXEnvelope,
7740 BYTE* pbSignedPIXEnvelope);
7741
7762 const char *szKeyId,
7763 const char *szCertId,
7764 DWORD dwFlags,
7765 DWORD dwSizeUnsignedDictEnvelope,
7766 BYTE *pbUnsignedDictEnvelope,
7767 DWORD *pdwSizeSignedDictEnvelope,
7768 BYTE **ppbSignedDictEnvelope);
7769
7770
7785 const char *szChainId,
7786 const char *szCRL,
7787 DWORD dwFlags,
7788 DWORD dwSizeSignedDictEnvelope,
7789 BYTE* pbSignedDictEnvelope);
7790
7824 const char *szKeyId,
7825 DWORD dwFlags,
7826 DWORD dwHeaderLen,
7827 BYTE *pbHeader,
7828 DWORD dwPayloadLen,
7829 BYTE *pbPayload,
7830 DWORD *pdwJWSLen,
7831 BYTE *pbJWS);
7832
7851 const char *szChain,
7852 const char *szCRL,
7853 DWORD dwJWSLen,
7854 BYTE *pbJWS,
7855 DWORD dwFlags,
7856 DWORD *pdwHeaderLen,
7857 BYTE *pbHeader,
7858 DWORD *pdwPayloadLen,
7859 BYTE *pbPayload);
7860
7900 const char * szKeyId,
7901 const char * szCertId,
7902 const char * szPIXCertChainId,
7903 const char * szURL,
7904 DWORD dwCountRequestHeaderList,
7905 const char * pszRequestHeaderList[],
7906 DWORD dwSizeRequestData,
7907 BYTE* pbRequestData,
7908 DWORD dwTimeOut,
7909 DWORD * pdwSizeResponseHeaders,
7910 BYTE ** ppbResponseHeaders,
7911 DWORD * pdwSizeResponseBody,
7912 BYTE ** ppbResponseBody,
7913 DWORD dwParam);
7914
7915
7955 const char * szKeyId,
7956 const char * szCertId,
7957 const char * szPIXCertChainId,
7958 const char * szURL,
7959 DWORD dwCountRequestHeaderList,
7960 const char * pszRequestHeaderList[],
7961 DWORD dwSizeRequestData,
7962 BYTE* pbRequestData,
7963 DWORD dwTimeOut,
7964 DWORD * pdwSizeResponseHeaders,
7965 BYTE ** ppbResponseHeaders,
7966 DWORD * pdwSizeResponseBody,
7967 BYTE ** ppbResponseBody,
7968 DWORD dwParam);
7969
8006 const char * szKeyId,
8007 const char * szCertId,
8008 const char * szPIXCertChainId,
8009 const char * szURL,
8010 DWORD dwCountRequestHeaderList,
8011 const char * pszRequestHeaderList[],
8012 DWORD dwTimeOut,
8013 DWORD * pdwSizeResponseHeaders,
8014 BYTE ** ppbResponseHeaders,
8015 DWORD * pdwSizeResponseBody,
8016 BYTE ** ppbResponseBody,
8017 DWORD dwParam);
8018
8055 const char * szKeyId,
8056 const char * szCertId,
8057 const char * szPIXCertChainId,
8058 const char * szURL,
8059 DWORD dwCountRequestHeaderList,
8060 const char * pszRequestHeaderList[],
8061 DWORD dwTimeOut,
8062 DWORD * pdwSizeResponseHeaders,
8063 BYTE ** ppbResponseHeaders,
8064 DWORD * pdwSizeResponseBody,
8065 BYTE ** ppbResponseBody,
8066 DWORD dwParam);
8067
8070/* Library version */
8071
8072int AAP_API DVersion ( DWORD dwType, DWORD *pdwMajor,
8073 DWORD *pdwMinor, DWORD *pdwRevision,
8074 DWORD *pdwBuild );
8075
8094 DWORD dwsize
8095);
8096
8105 void *p
8106);
8107
8110//Free and clean CERT_X509_INFO structure members
8112
8113
8114/* Logs and monitoring */
8115
8116int AAP_API DLogLineFormat ( char *szIn, char *szOut );
8117
8119 HSESSIONCTX hSession,
8120 DWORD *pdwLogLen
8121);
8122
8124 DWORD dwStart,
8125 DWORD dwOffset,
8126 HLOGCTX *phLogCtx,
8127 DWORD dwParam );
8128
8130 BYTE *pbLog,
8131 DWORD *pdwLogSize );
8132
8134
8135
8136int AAP_API DGetStatInfo ( HSESSIONCTX hSession, DWORD *pdwSessions,
8137 DWORD *pdwCPU, DWORD *pdwUnit,
8138 DWORD *pdwMemTotal, DWORD *pdwMemUsed,
8139 DWORD *pdwSwapTotal, DWORD *pdwSwapUsed );
8140
8141int AAP_API DGetNetInfo ( HSESSIONCTX hSession, BYTE **ppbNetInfo, DWORD *pdwNetInfoCount, DWORD dwFlags );
8142
8143
8144/* Digital certificate */
8145
8147 DWORD dwCertLen,
8148 DWORD dwOutFormat,
8149 BYTE **ppbOutCert,
8150 DWORD *pdwOutCertLen,
8151 DWORD dwReserved );
8152
8153
8155 DWORD dwECLen,
8156 DWORD dwInForm,
8157 void *pvPrivKeyInfo,
8158 DWORD dwOutForm,
8159 DWORD dwReserved );
8160
8161
8163 DWORD dwECLen,
8164 DWORD dwInForm,
8165 void *pvPubKeyInfo,
8166 DWORD dwOutForm,
8167 DWORD dwReserved );
8168
8195 HSESSIONCTX hSession,
8196 char *szMasterKeyId,
8197 DWORD dwParamBlobType,
8198 void *pvParamBlob,
8199 DWORD dwParamBlobLen,
8200 BYTE *pbOTPBlob,
8201 DWORD *pdwOTPBlobLen,
8202 DWORD dwFlags
8203);
8204
8205
8206
8207
8237 HSESSIONCTX hSession,
8238 char *szMasterKeyId,
8239 char *szOTP,
8240 BYTE *pbOATHBlob,
8241 DWORD *pdwOATHBlobLen,
8242 DWORD dwFlags
8243);
8244
8259 HSESSIONCTX hSession,
8260 char *szMasterKeyId,
8261 BYTE bOTPLen,
8262 BYTE *pbOATHBlob,
8263 DWORD dwOATHBlobLen,
8264 char *szOTP,
8265 DWORD dwFlags
8266);
8267
8288 const HSESSIONCTX hSession,
8289 char *szMasterKey,
8290 BYTE *pbInBlob,
8291 DWORD dwInBlobLen,
8292 DWORD dwOutBlobType,
8293 BYTE *pbOutInfo,
8294 DWORD *pdwOutInfoLen,
8295 DWORD dwParam
8296);
8297
8321 HSESSIONCTX hSession,
8322 char *szMasterKeyId,
8323 char *szOTP1,
8324 char *szOTP2,
8325 BYTE *pbOATHBlob,
8326 DWORD *pdwOATHBlobLen,
8327 DWORD dwFlags
8328);
8329
8346 HSESSIONCTX hSession,
8347 char *szMasterKey,
8348 BYTE *pbPSK,
8349 BYTE bPSKLen,
8350 BYTE *pbPSKC,
8351 DWORD dwPSKCLen,
8352 void **pvBlobList,
8353 DWORD *pdwBlobListQuantity,
8354 DWORD dwParam
8355);
8356
8359//DOATHIssueHOTPBlob is DEPRECATED. Use DOATHIssueBlob instead.
8361 HSESSIONCTX hSession,
8362 char *szMasterKeyId,
8363 DWORD dwParamBlobType,
8364 void *pvParamBlob,
8365 DWORD dwParamBlobLen,
8366 BYTE *pbOTPBlob,
8367 DWORD *pdwOTPBlobLen,
8368 DWORD dwFlags
8369);
8370
8371//DOATHCheckHOTP is DEPRECATED. Use DOATHCheckOTP instead.
8373 char *szMasterKeyId,
8374 char *szOTP,
8375 BYTE *pbOATHBlob,
8376 DWORD *pdwOATHBlobLen,
8377 DWORD dwFlags );
8378
8379//Users
8381 DWORD dwSecretLen,
8382 ND_OATH_uint64_t nuiMovingFactor,
8383 int nCodeDigits,
8384 BOOL bAddChecksum,
8385 int nTruncOff,
8386 char *szResult);
8387
8388
8421 HSESSIONCTX hSession,
8422 char *szSrcISPB,
8423 char *szDstISPB,
8424 DWORD dwTotalDataLen,
8425 BYTE bErrorCode,
8426 BYTE bSpecialTreatment,
8427 HSPBCTX *hSPBCtx,
8428 DWORD dwFlags
8429);
8430
8445 HSPBCTX hSPBCtx,
8446 BYTE *pbDataIn,
8447 DWORD dwDataInLen,
8448 BYTE *pbDataOut,
8449 DWORD *pdwDataOutLen
8450);
8451
8462 HSPBCTX *hSPBCtx,
8463 BYTE *pbSPBHeader,
8464 DWORD *pdwSPBHeaderLen
8465);
8466
8506 HSESSIONCTX hSession,
8507 char *szSrcISPB,
8508 char *szDstISPB,
8509 BYTE *pbHeader,
8510 DWORD dwHeaderLen,
8511 BYTE bAcceptExpiredCert,
8512 BYTE bAutoUpdateCert,
8513 DWORD dwMessageDataLen,
8514 HSPBCTX *hSPBCtx,
8515 DWORD dwFlags
8516);
8517
8533 HSPBCTX hSPBCtx,
8534 BYTE *pbDataIn,
8535 DWORD dwDataInLen,
8536 BYTE **ppbDataOut,
8537 DWORD *pdwDataOutLen
8538);
8539
8548 HSPBCTX *hSPBCtx
8549);
8550
8563 HSESSIONCTX hSession,
8564 char *szID,
8565 char *szPrivateKeyName,
8566 DWORD dwKeyParam,
8567 DWORD dwParam
8568);
8569
8603 HSESSIONCTX hSession,
8604 char *szPrivateKeyName,
8605 BYTE bVersion,
8606 char *szSPBSubject,
8607 DWORD dwOutType,
8608 DWORD *pdwCSRLen,
8609 BYTE **ppbCSR,
8610 DWORD dwParam
8611);
8612
8637 HSESSIONCTX hSession,
8638 BYTE bActivate,
8639 const char *szUser,
8640 BYTE *pbCertificate,
8641 DWORD dwCertificateLen,
8642 const char *szDomain,
8643 DWORD dwParam);
8644
8662 BYTE bActivate,
8663 const char *szUser,
8664 const char *szPkcs12File,
8665 const char *szPkcs12Pwd,
8666 const char *szDomain,
8667 DWORD dwKeyAttr);
8668
8684 const char *szPkcs12Pwd,
8685 const char *szISPB,
8686 const char *szReserved,
8687 BYTE **ppbPkcs12,
8688 DWORD *pdwPkcs12Len,
8689 DWORD dwReserved);
8690
8702 HSESSIONCTX hSession,
8703 const char *szIdCert,
8704 const char *szDomain,
8705 DWORD dwParam
8706);
8707
8720 HSESSIONCTX hSession,
8721 const char *szIdCert,
8722 BYTE **ppbCertificate,
8723 DWORD *pdwCertificateLen,
8724 DWORD dwParam
8725);
8726
8743 char *szISPB,
8744 char *szDomain,
8745 DWORD dwKeyType,
8746 char *szOutObjName,
8747 DWORD dwParam
8748);
8749
8762 HSESSIONCTX hSession,
8763 const char *szIdCert,
8764 EXT_MAP_2_OBJ_INFO *pstExtMap,
8765 DWORD dwParam
8766);
8767
8785 HSESSIONCTX hSession,
8786 char *szISPB,
8787 char *szKeyId,
8788 char *szCertId,
8789 DWORD dwParam
8790);
8791
8794/* Esta API pertence ao grupo SPB, mas precisa da documentacao*/
8796 HSESSIONCTX hSession,
8797 char *szDomain,
8798 BOOL bActive,
8799 DBLOB **pdbList,
8800 DWORD *pdwListLen,
8801 DWORD dwParam
8802);
8803
8838int AAP_API DBchainCreateXPrv(HSESSIONCTX hSession, BYTE bType, DWORD dwAttributes,
8839 const char *szId, const BYTE *pcbData, DWORD dwDataLen,
8840 DWORD dwReserved);
8841
8862int AAP_API DBchainCreateBip32Ckd(HSESSIONCTX hSession, BYTE bVersion, DWORD dwIndex,
8863 DWORD dwAttributes, const char *cszPar,
8864 const char *cszDst, DN_BCHAIN_KEY_INFO *pKeyInfo,
8865 DWORD dwReserved);
8866
8917 const char *cszHrp, const char *cszPk,
8918 BYTE *pbAddress, DWORD *pdwAddressLen,
8919 DWORD dwReserved);
8920
8949int AAP_API DBchainSignHash(HSESSIONCTX hSession, BYTE bType, BYTE bHashMode,
8950 BYTE *pbHash, DWORD dwHashLen, const char *cszPk,
8951 BYTE *pbSig, DWORD *pdwSigLen, DWORD dwReserved);
8952
8989int AAP_API DBchainVerify(HSESSIONCTX hSession, BYTE bSigType, BYTE bHashMode,
8990 const BYTE *pbHash, DWORD dwHashLen, const BYTE *pbSig,
8991 DWORD dwSigLen, BYTE bInPbkType, const BYTE *pbInPbk,
8992 BYTE bInPbkLen, DWORD dwReserved);
8993
9016int AAP_API DBchainEdDsaSign(HSESSIONCTX hSession, BYTE bType, const char *cszCtxStr,
9017 BYTE *pbData, DWORD dwDataLen, const char *cszPk,
9018 BYTE *pbSig, DWORD *pdwSigLen, DWORD dwReserved);
9019
9052int AAP_API DBchainEdDsaVerify(HSESSIONCTX hSession, BYTE bType, const char *cszCtxStr,
9053 BYTE *pbData, DWORD dwDataLen, BYTE bPbkType,
9054 BYTE *pbPbk, DWORD dwPbkLen, BYTE *pbSig,
9055 DWORD dwSigLen, DWORD dwReserved);
9079int AAP_API DBchainPkImport(HSESSIONCTX hSession, BYTE bFormat, DWORD dwAttributes,
9080 const char *cszId, const BYTE *pcbData, DWORD dwDataLen,
9081 DWORD dwReserved);
9082
9111int AAP_API DBchainPkExport(HSESSIONCTX hSession, BYTE bFormat, BYTE bVersion,
9112 BYTE bCompressed, const char *cszId, BYTE **ppbData,
9113 DWORD *pdwDataLen, DWORD dwReserved);
9114
9137 const char *cszId, BYTE *pbData,
9138 DWORD *pdwDataLen, DWORD dwReserved);
9139
9167 BYTE bHashMode, const BYTE *pbHash,
9168 DWORD dwHashLen, const BYTE *pbSig,
9169 DWORD dwSigLen, DN_BCHAIN_PBK *pPbk,
9170 DWORD dwReserved);
9171
9183 const char *cszId, void *pvData,
9184 DWORD *pdwDataLen);
9185
9206int AAP_API DBchainHashData(HSESSIONCTX hSession, BYTE bMode, BYTE *pbData,
9207 DWORD dwDataLen, BYTE *pbHash, DWORD *pdwHashLen,
9208 DWORD dwReserved);
9209
9222int AAP_API DBchainEd2X(HSESSIONCTX hSession, const char *cszPk,
9223 const char *cszTo, DWORD dwAttr, DWORD dwReserved);
9224
9232/* DSKeepNewSecret e DSKeepProbeSecret */
9233// Security level
9234#define DN_SKEEP_LEVEL_UNKNOWN (0)
9235#define DN_SKEEP_SEC_LEVEL_64b (1)
9236#define DN_SKEEP_SEC_LEVEL_96b (2)
9237#define DN_SKEEP_SEC_LEVEL_112b (3)
9238#define DN_SKEEP_SEC_LEVEL_128b (4)
9239#define DN_SKEEP_SEC_LEVEL_160b (5)
9241// Type
9242#define DN_SKEEP_TYPE_NMIND (0)
9243#define DN_SKEEP_TYPE_SCRD (1)
9244#define DN_SKEEP_TYPE_2FA (2)
9245#define DN_SKEEP_TYPE_CRT (4)
9274int AAP_API DSKeepNewSecret(HSESSIONCTX hSession, const char *cszId,
9275 BYTE bSecLevel, WORD wAuthType, DWORD dwReserved);
9276
9291int AAP_API DSKeepSplitSecret(HSESSIONCTX hSession, const char *cszId,
9292 BYTE bSecLevel, WORD wAuthType, BYTE bM, BYTE bN,
9293 SKeepShare *pstShares, DWORD dwReserved);
9294
9304int AAP_API DSKeepProbeSecret(HSESSIONCTX hSession, const char *cszId,
9305 SKeepProbeInfo *pstInfo, DWORD dwReserved);
9306
9318int AAP_API DSKeepMatchSecret(HSESSIONCTX hSession, const char *cszId,
9319 const SKeepShare *cpstShares, DWORD dwSharesCount,
9320 DWORD dwReserved);
9321
9333int AAP_API DSKeepRecoverSecret(HSESSIONCTX hSession, const char *cszId,
9334 const SKeepShare *cpstShares, DWORD dwSharesCount,
9335 SKeepRecoverInfo *pstRecoverInfo, DWORD dwReserved);
9336
9347int AAP_API DSKeepRemoveSecret(HSESSIONCTX hSession, const char *cszId,
9348 BYTE bSecLevel, WORD wAuthType, DWORD dwReserved);
9349
9350#define DN_SKEEP_SHARE_CKS_LEN (4)
9352#define DN_SKEEP_GEN_SHARE_CKS (1)
9365int AAP_API DSKeepCalcShareCks(DWORD dwType, const char *cszShare, char *szCks);
9366
9369#ifdef __cplusplus
9370 }
9371#endif
9372
9373#endif /* #ifndef DINAMO_H_INCLUDED */
#define MAX_IP_LEN
Definição dinamo.h:1684
int BOOL
Definição dinamo.h:49
void * HSESSIONCTX
Definição dinamo.h:68
void * HLOGCTX
Definição dinamo.h:74
char *AAP_API DByteArray2Base64(BYTE *pbData, DWORD dwDataLen, char *szBase64, DWORD *pdwBase64Len, BOOL bNoNewLines)
void * HOBJMETASEARCHCTX
Definição dinamo.h:77
int AAP_API DSetObjMetadataJson(HOBJMETACTX hInMeta, char *szData, DWORD dwDataLen, DWORD dwParam)
const OBJ_MET_ATTR * DGetHSMP11TypeInfoList(int *pnOutLen)
#define EFT_AES_KEY_CHECKSUM_LEN
Definição dinamo.h:1713
int AAP_API DGetStatInfo(HSESSIONCTX hSession, DWORD *pdwSessions, DWORD *pdwCPU, DWORD *pdwUnit, DWORD *pdwMemTotal, DWORD *pdwMemUsed, DWORD *pdwSwapTotal, DWORD *pdwSwapUsed)
#define GET_INFO_MAX_NTP_KM_LEN
Definição dinamo.h:793
int AAP_API DSetJsonObjMetadata(HSESSIONCTX hSession, const char *szId, const char *szJson, DWORD dwJsonLen, DWORD dwReserved)
#define DN_MAX_ALG_ID
Definição dinamo.h:1967
int AAP_API DOATHIssueHOTPBlob(HSESSIONCTX hSession, char *szMasterKeyId, DWORD dwParamBlobType, void *pvParamBlob, DWORD dwParamBlobLen, BYTE *pbOTPBlob, DWORD *pdwOTPBlobLen, DWORD dwFlags)
#define NET_INFO_MAX_SROUTE_COUNT
Definição dinamo.h:1984
#define DN_SC_MAX_CARD_PRODUCT_NAME_LEN
Definição dinamo.h:2562
int AAP_API DListPkcs11Maps(HSESSIONCTX hSession, int(AAP_API *ListKeyCallback)(char *szKeyName, void *pParam, BOOL bFinal), void *pParam)
int AAP_API DListUserTrusts(HSESSIONCTX hSession, char *szUserId, BYTE bType, int(AAP_API *ListUserTrustCallback)(char *szUserName, DWORD dwACL, void *pParam, BOOL bFinal), void *pParam)
unsigned short WORD
Definição dinamo.h:48
int AAP_API DGetObjMetadataJson(HOBJMETACTX hInMeta, char *szData, DWORD *pdwDataLen, DWORD dwParam)
#define MAX_NET_NAME
Definição dinamo.h:1685
#define RSA_8192_LEN
Definição dinamo.h:1273
int AAP_API DDestroyHSMP11Info(HP11ATTRCTX *phMeta, DWORD dwParam)
#define DN_SC_MAX_CARD_FAMILY_LEN
Definição dinamo.h:2561
int AAP_API DGetUserAcl(HSESSIONCTX hSession, char *szUser, DWORD *pdwUserAcl)
#define DN_BCHAIN_MAX_PBK_LEN
Definição dinamo.h:2213
int AAP_API DRemoveMapObj(const HSESSIONCTX hSession, const char *szMapObjId)
#define DN_SC_MAX_ATR_LEN
Definição dinamo.h:2560
#define MAX_P11_OBJ_ID
Definição dinamo.h:1690
int AAP_API DGetHSMLogCont(HLOGCTX hLogCtx, BYTE *pbLog, DWORD *pdwLogSize)
int AAP_API DECPublicKey2Info(BYTE *pbEC, DWORD dwECLen, DWORD dwInForm, void *pvPubKeyInfo, DWORD dwOutForm, DWORD dwReserved)
#define D_DS_BIND_PSK_LEN
Definição dinamo.h:626
#define DN_MAX_SUBJECT
Definição dinamo.h:1963
int AAP_API DListUserSessions(HSESSIONCTX hSession, int(AAP_API *ListUserSessionsCallback)(DWORD dwStartTime, char *szInfo, void *pParam, BOOL bFinal), void *pParam)
unsigned long long ND_OATH_uint64_t
Definição dinamo.h:38
unsigned int UINT
Definição dinamo.h:50
int AAP_API DGetObjInfo(const HSESSIONCTX hSession, const char *szObjId, const int nAlgId, const BYTE *pbData, DWORD *pdwDataLen)
int DIPFilterOperation(HSESSIONCTX hSession, BYTE bOP, char *szUser, char *szIP, int(AAP_API *ListIpFilterCallback)(void *pInData, DWORD dwInDataLen, void *pParam, BOOL bFinal), void *pParam, DWORD *pdwStatus, DWORD dwReserved)
#define EFT_EMV_SDA_SEQ_LEN
Definição dinamo.h:1718
int AAP_API DGetNetInfo(HSESSIONCTX hSession, BYTE **ppbNetInfo, DWORD *pdwNetInfoCount, DWORD dwFlags)
#define DN_M_OF_N_PART_LEN
Definição dinamo.h:3561
int AAP_API DListLoadedModules(HSESSIONCTX hSession, int(AAP_API *ListLoadedModulesCallback)(char *szModuleInfo, void *pParam, BOOL bFinal), void *pParam)
#define D_SVAULT_MAX_TL
Definição dinamo.h:2079
#define DN_RCC_MAX_REPL_MC_VER
Definição dinamo.h:3465
#define SA_TP_MAX_OTP_LEN
Definição dinamo.h:1882
int AAP_API DGetHsmInfo(HSESSIONCTX hSession, BOOL *pbFinal, DWORD dwParam, BYTE *pbData, DWORD *pdwDataLen, DWORD dwFlags)
#define DN_M_OF_N_S_MAX
Definição dinamo.h:3560
#define DN_SC_M_OF_N_SHADOW_MATERIAL_MAX_LEN
Definição dinamo.h:3682
#define ND_SPB_ISPB_LEN
Definição dinamo.h:1866
int AAP_API DGetHSMP11InfoAttr(HP11ATTRCTX hInMeta, DWORD dwOption, void *pvOptionData, DWORD *pdwOptionDataLen, DWORD dwParam)
#define ND_SPB_MAX_SUBJECT
Definição dinamo.h:1872
#define GET_INFO_MAX_REPL_NODES
Definição dinamo.h:786
#define OATH_MAX_PSK_LEN
Definição dinamo.h:1916
#define NET_INFO_MAX_SROUTE_LEN
Definição dinamo.h:1985
int AAP_API DCert2CertInfo(BYTE *pbCert, DWORD dwCertLen, DWORD dwOutType, void *pvCertInfo, DWORD dwFlags)
#define DN_GLOBAL_OBJ_STATS_COUNT
Definição dinamo.h:3618
int AAP_API DOATHCheckHOTP(HSESSIONCTX hSession, char *szMasterKeyId, char *szOTP, BYTE *pbOATHBlob, DWORD *pdwOATHBlobLen, DWORD dwFlags)
int AAP_API DLogLineFormat(char *szIn, char *szOut)
void * HCHAPCTX
Definição dinamo.h:73
unsigned char BYTE
Definição dinamo.h:45
#define DN_MAX_SN
Definição dinamo.h:1965
#define ND_SPB_MAX_ALG_ID
Definição dinamo.h:1874
#define DN_USR_A_TOKEN_KLEN
Definição dinamo.h:2048
void AAP_API DGenerateHOTPOffline(BYTE *pbSecret, DWORD dwSecretLen, ND_OATH_uint64_t nuiMovingFactor, int nCodeDigits, BOOL bAddChecksum, int nTruncOff, char *szResult)
#define DN_MAX_HSM_ALIAS
Definição dinamo.h:2962
#define MAX_OBJ_ID_LEN
Definição dinamo.h:1696
int AAP_API DUpdatePkcs11Map(HSESSIONCTX hSession, char *szP11MapId, DWORD dwBlobType, DWORD dwFlags, DWORD dwUpdateMask, BYTE *pbData, DWORD dwDataLen)
int DGetObjMetadataTypeInfo(DWORD dwOption, void *pvData, DWORD *pdwDataLen, DWORD dwReserved)
#define GET_INFO_MAX_SN_LEN
Definição dinamo.h:787
void * HOBJMETACTX
Definição dinamo.h:75
void * HP11ATTRCTX
Definição dinamo.h:76
int AAP_API DCertEncodingConvert(BYTE *pbCert, DWORD dwCertLen, DWORD dwOutFormat, BYTE **ppbOutCert, DWORD *pdwOutCertLen, DWORD dwReserved)
#define MAX_HOTP_PIN
Definição dinamo.h:1686
int AAP_API DGetHSMLogInit(HSESSIONCTX hSession, DWORD dwStart, DWORD dwOffset, HLOGCTX *phLogCtx, DWORD dwParam)
int AAP_API DRenameObj(HSESSIONCTX hSession, char *szOldObjName, char *szNewObjName, DWORD dwFlags)
int AAP_API DGetLogParam(HSESSIONCTX hSession, DWORD dwParam, BYTE *pbData, DWORD *pdwDataLen, DWORD dwFlags)
int AAP_API DGenerateCNSCert(HSESSIONCTX hSession, char *szKeyID, char *szUsrID, char *szUsrName, WORD wModulusLen, BYTE *pbModulus, BYTE bExponentLen, BYTE *pbExponent, DWORD *pdwCertLen, BYTE *pbCert, DWORD dwParam)
#define NET_INFO_MAX_SNMP_C_STR
Definição dinamo.h:1989
void * HCERTCTX
Definição dinamo.h:71
#define DN_SC_M_OF_N_SHADOW_MAX_LEN
Definição dinamo.h:3683
#define GET_INFO_MAX_REPL_DOMAIN_NAME
Definição dinamo.h:785
#define MAX_HSM_ID_NAME
Definição dinamo.h:1708
int AAP_API DGetHSMLogEnd(HLOGCTX *phLogCtx)
unsigned long DN_ULONG
Definição dinamo.h:66
#define DN_MAX_ISSUER
Definição dinamo.h:1964
int AAP_API DGetPkcs11Map(HSESSIONCTX hSession, char *szP11MapId, DWORD dwBlobType, DWORD dwFlags, BYTE **ppbData, DWORD *pdwDataLen)
#define GET_INFO_MAX_NTP_KT_LEN
Definição dinamo.h:792
int AAP_API DGetObjMetadata(HOBJMETACTX hInMeta, DWORD dwOption, void *pvOptionData, DWORD *pdwOptionDataLen, DWORD dwParam)
unsigned int DWORD
Definição dinamo.h:46
#define DN_BCHAIN_BIP39_SEED_LEN_MAX
Definição dinamo.h:3510
#define EFT_EMV_ARC_LEN
Definição dinamo.h:1720
#define DES_BLOCK
Definição dinamo.h:1041
#define DN_BCHAIN_BIP39_PWD_LEN_MAX
Definição dinamo.h:3511
#define MAX_OATH_HMAC_LEN
Definição dinamo.h:836
#define SA_HOTP_CHAP_LEN
Definição dinamo.h:1884
#define DN_MAX_EMAIL
Definição dinamo.h:1966
#define DN_SKEEP_M_OF_N_S_LEN
Definição dinamo.h:3655
#define DN_EC_MAX_BIG_NUM
Definição dinamo.h:2358
#define DN_M_OF_N_S_LEN
Definição dinamo.h:3557
int AAP_API DSignHashedData(HKEYCTX hKey, BYTE *pbData, DWORD dwDataLen, int nHashId, DWORD dwFlags, BYTE *pbSignature, DWORD *pdwSigLen)
void * HHASHCTX
Definição dinamo.h:69
int AAP_API DECParam2AlgId(BYTE *pbECParam, DWORD dwECParamLen, int *pnAlgId, DWORD dwFlags)
#define AAP_API
Definição dinamo.h:42
#define DN_UPACK_MAX_DESCRIPTION
Definição dinamo.h:2963
int AAP_API DSPBGetCertificateList(HSESSIONCTX hSession, char *szDomain, BOOL bActive, DBLOB **pdbList, DWORD *pdwListLen, DWORD dwParam)
unsigned long long int QWORD
Definição dinamo.h:47
int AAP_API DDestroyObjMetadata(HOBJMETACTX *phMeta, DWORD dwParam)
#define DN_M_OF_N_ES_LEN
Definição dinamo.h:3558
int AAP_API DManageObjMetadata(HSESSIONCTX hSession, BYTE bOP, char *szObjName, HOBJMETACTX hInMeta, HOBJMETACTX *phOutMeta, DWORD dwParam)
#define MAX_HTTP_ADDR_LEN
Definição dinamo.h:3138
int AAP_API DGeneratePkcs11Map(HSESSIONCTX hSession, char *szP11MapId, BYTE bTemporary, DWORD dwBlobType, DWORD dwFlags, BYTE *pbData, DWORD dwDataLen)
int AAP_API DUPackPush(HSESSIONCTX hSession, DWORD dwPackSize, BYTE *pbPack)
#define MAX_ADDR_LEN
Definição dinamo.h:1674
#define D_MAX_DS_BIND_B62_ID
Definição dinamo.h:628
#define GET_INFO_MAX_NTPQ_LEN
Definição dinamo.h:791
int AAP_API DGetJsonObjMetadata(HSESSIONCTX hSession, const char *szId, DWORD dwOutType, char **pszOutJson, DWORD *pdwOutJsonLen)
#define GET_INFO_MAX_TPKEY_LEN
Definição dinamo.h:789
#define MAX_HTTP_API_TOKEN_LEN
Definição dinamo.h:3139
#define MAX_MODULE_NAME_VERSION_LEN
Definição dinamo.h:1683
#define MAX_USR_PWD
Definição dinamo.h:1668
int AAP_API DBatchSign(HKEYCTX hKey, BYTE *pbBlock, DWORD dwBlockCount, DWORD dwFlags)
int AAP_API DSetLogParam(HSESSIONCTX hSession, DWORD dwParam, BYTE *pbData, DWORD dwDataLen, DWORD dwFlags)
int AAP_API DVersion(DWORD dwType, DWORD *pdwMajor, DWORD *pdwMinor, DWORD *pdwRevision, DWORD *pdwBuild)
int AAP_API DPowerSignHash(HSESSIONCTX hSession, char *szKeyId, int nHashAlgId, DWORD dwDataLen, BYTE *pbDataBuffer, DWORD *pdwSignLen, BYTE **ppbSignData)
#define MAX_OBJ_ID_FQN_LEN
Definição dinamo.h:1699
#define EFT_EMV_PAD_LEN
Definição dinamo.h:1722
#define EFT_VISA_KEY_CHECKSUM_LEN
Definição dinamo.h:1714
#define D_MAX_DS_BIND_URL
Definição dinamo.h:625
int AAP_API DRemoveKey(HSESSIONCTX hSession, char *szKeyId)
#define ND_SPB_MAX_ISSUER
Definição dinamo.h:1873
#define MAX_HSM_MODEL_NAME
Definição dinamo.h:1707
int AAP_API DCreateObjMetadata(HOBJMETACTX *phOutMeta, DWORD dwParam)
int AAP_API DGetHSMP11Info(HSESSIONCTX hSession, HP11ATTRCTX *phOutMeta, DWORD dwParam)
signed char CHAR
Definição dinamo.h:52
int AAP_API DFindObjMetadataInit(HSESSIONCTX hSession, HOBJMETACTX hInMeta, HOBJMETASEARCHCTX *phMetaSearchCtx, DWORD dwParam)
void AAP_API DCleanCERT_X509_INFO(CERT_X509_INFO *pstCert)
int AAP_API DECPrivateKey2Info(BYTE *pbEC, DWORD dwECLen, DWORD dwInForm, void *pvPrivKeyInfo, DWORD dwOutForm, DWORD dwReserved)
#define NET_INFO_MAX_SNMP_T_COUNT
Definição dinamo.h:1986
#define GET_INFO_MAX_HW_STR_LEN
Definição dinamo.h:788
BOOL DDoRSAPadding(HSESSIONCTX hSession, DWORD dwPadding, BYTE *pbBlock, BYTE *pbData, DWORD *pdwDataLen, DWORD dwBlockSize, DWORD dwFlag)
int AAP_API DUPackInfo(DWORD dwPackSize, BYTE *pbPack, DWORD *pdwUPackVersion, BYTE **ppbUPackDescr, BYTE **ppbUPackSignature)
int AAP_API DGenerateMapObj(const HSESSIONCTX hSession, const char *szMapId, const char *szObj1Id, const int nObj1AlgId, const char *szObj2Id, const int nObj2AlgId)
#define NET_INFO_MAX_SNMP_SC_STR
Definição dinamo.h:1987
void * HKEYCTX
Definição dinamo.h:70
#define MAX_HOTP_APP_NAME
Definição dinamo.h:1688
#define MAX_OBJ_NAME_LEN
Definição dinamo.h:1681
#define MAX_PAN_LEN
Definição dinamo.h:1572
int AAP_API DGetStatLogSize(HSESSIONCTX hSession, DWORD *pdwLogLen)
#define DN_BCHAIN_BIP32_SEED_LEN_MAX
Definição dinamo.h:3499
#define ALG_AES_256_LEN
Definição dinamo.h:1034
int AAP_API DGetLibVersion(HSESSIONCTX hSession, char *szVersion, DWORD *pdwVersionLen, DWORD dwFlags)
int AAP_API DSetObjMetadata(HOBJMETACTX hInMeta, DWORD dwOption, void *pvOptionData, DWORD dwOptionDataLen, DWORD dwParam)
int AAP_API DFindObjMetadataEnd(HOBJMETASEARCHCTX *phMetaSearchCtx, DWORD dwParam)
#define GET_INFO_MAX_NTP_SVRS
Definição dinamo.h:790
#define DN_SC_MAX_CARD_OS_VERSION_LEN
Definição dinamo.h:2563
#define MAX_HOTP_IMEI
Definição dinamo.h:1687
int AAP_API DListObjsFilter(HSESSIONCTX hSession, DWORD dwFilterType, void *pvFilter, int(AAP_API *ListObjCallback)(void *pvIN, void *pParam, BOOL bFinal), void *pParam)
int AAP_API DUnsetObjMetadata(HOBJMETACTX hInMeta, DWORD dwOption, DWORD dwParam)
signed int INT
Definição dinamo.h:51
#define MAX_OBJ_ID_BIN_LEN
Definição dinamo.h:1691
int AAP_API DECPubKeyDER2AlgId(BYTE *pbECPubKeyDER, DWORD dwECPubKeyDERLen, int *pnAlgId, DWORD dwFlags)
const OBJ_MET_ATTR * DGetObjMetadataTypeInfoList(int *pnOutLen)
#define MAX_USR_LEN
Definição dinamo.h:1669
#define ISSUE_OATH_BLOB_V2_IV_LEN
Definição dinamo.h:1926
#define NET_INFO_MAX_SNMP_SL_STR
Definição dinamo.h:1988
#define DN_MAX_PRIVATE_KEY_ATTR_LEN
Definição dinamo.h:2537
unsigned long long ND_uint64_t
Definição dinamo.h:37
#define EFT_EMV_CSU_LEN
Definição dinamo.h:1721
#define ND_SPB_SN_MAX_LEN
Definição dinamo.h:1869
BYTE *AAP_API DBase642ByteArray(char *szBase64, DWORD dwBase64Len, BYTE *pbData, DWORD *pdwDataLen)
void * HSPBCTX
Definição dinamo.h:72
#define DN_RCC_MAX_NODE_COUNT
Definição dinamo.h:3464
#define ND_SPB_CA_LEN
Definição dinamo.h:1867
int AAP_API DFindObjMetadataCont(HOBJMETASEARCHCTX hMetaSearchCtx, HOBJMETACTX *phOutMeta, DWORD dwOutMetaMaxCount, DWORD *pdwOutMetaDataCount, DWORD dwParam)
int AAP_API DBchainEd2X(HSESSIONCTX hSession, const char *cszPk, const char *cszTo, DWORD dwAttr, DWORD dwReserved)
int AAP_API DBchainHashData(HSESSIONCTX hSession, BYTE bMode, BYTE *pbData, DWORD dwDataLen, BYTE *pbHash, DWORD *pdwHashLen, DWORD dwReserved)
int AAP_API DBchainEdDsaSign(HSESSIONCTX hSession, BYTE bType, const char *cszCtxStr, BYTE *pbData, DWORD dwDataLen, const char *cszPk, BYTE *pbSig, DWORD *pdwSigLen, DWORD dwReserved)
int AAP_API DBchainGetAddress(HSESSIONCTX hSession, BYTE bType, BYTE bVer, const char *cszHrp, const char *cszPk, BYTE *pbAddress, DWORD *pdwAddressLen, DWORD dwReserved)
int AAP_API DBchainSignHash(HSESSIONCTX hSession, BYTE bType, BYTE bHashMode, BYTE *pbHash, DWORD dwHashLen, const char *cszPk, BYTE *pbSig, DWORD *pdwSigLen, DWORD dwReserved)
int AAP_API DBchainCreateXPrv(HSESSIONCTX hSession, BYTE bType, DWORD dwAttributes, const char *szId, const BYTE *pcbData, DWORD dwDataLen, DWORD dwReserved)
int AAP_API DBchainCreateBip32Ckd(HSESSIONCTX hSession, BYTE bVersion, DWORD dwIndex, DWORD dwAttributes, const char *cszPar, const char *cszDst, DN_BCHAIN_KEY_INFO *pKeyInfo, DWORD dwReserved)
int AAP_API DBchainPkExport(HSESSIONCTX hSession, BYTE bFormat, BYTE bVersion, BYTE bCompressed, const char *cszId, BYTE **ppbData, DWORD *pdwDataLen, DWORD dwReserved)
int AAP_API DBchainPkImport(HSESSIONCTX hSession, BYTE bFormat, DWORD dwAttributes, const char *cszId, const BYTE *pcbData, DWORD dwDataLen, DWORD dwReserved)
int AAP_API DBchainGetPubKey(HSESSIONCTX hSession, BYTE bType, const char *cszId, BYTE *pbData, DWORD *pdwDataLen, DWORD dwReserved)
int AAP_API DBchainRecoverPbkFromSignature(HSESSIONCTX hSession, BYTE bSigType, BYTE bHashMode, const BYTE *pbHash, DWORD dwHashLen, const BYTE *pbSig, DWORD dwSigLen, DN_BCHAIN_PBK *pPbk, DWORD dwReserved)
int AAP_API DBchainVerify(HSESSIONCTX hSession, BYTE bSigType, BYTE bHashMode, const BYTE *pbHash, DWORD dwHashLen, const BYTE *pbSig, DWORD dwSigLen, BYTE bInPbkType, const BYTE *pbInPbk, BYTE bInPbkLen, DWORD dwReserved)
int AAP_API DBchainGetKeyInfo(HSESSIONCTX hSession, DWORD dwReserved, const char *cszId, void *pvData, DWORD *pdwDataLen)
int AAP_API DBchainEdDsaVerify(HSESSIONCTX hSession, BYTE bType, const char *cszCtxStr, BYTE *pbData, DWORD dwDataLen, BYTE bPbkType, BYTE *pbPbk, DWORD dwPbkLen, BYTE *pbSig, DWORD dwSigLen, DWORD dwReserved)
int AAP_API DGenEcdhKey(HSESSIONCTX hSession, DWORD dwOP, char *szPriKey, void *pvInData, DWORD dwInDataLen, BYTE *pbOutData, DWORD *pdwOutDataLen, DWORD dwFlags)
int AAP_API DCreateHash(HSESSIONCTX hSession, int nAlgId, HKEYCTX hKey, DWORD dwFlags, HHASHCTX *hHash)
int AAP_API DDestroyHash(HHASHCTX *phHash)
int AAP_API DHashData(HHASHCTX hHash, BYTE *pbData, DWORD dwDataLen, DWORD dwFlags)
int AAP_API DMofNRecover(HSESSIONCTX hSession, DN_M_OF_N_PART *pstParts, DWORD dwPartsCount, BYTE *pbSecret, DWORD dwReserved)
int AAP_API DDecrypt(HKEYCTX hKey, HHASHCTX hHash, BOOL bFinal, DWORD dwFlags, BYTE *pbData, DWORD *pdwDataLen)
int AAP_API DGetHashParam(HHASHCTX hHash, DWORD dwParam, BYTE *pbData, DWORD *pdwDataLen, DWORD dwFlags)
int AAP_API DGetRandom(HSESSIONCTX hSession, BYTE *pbData, DWORD dwDataLen)
int AAP_API DRecoverSVMK(HSESSIONCTX hSession, DN_SC_M_OF_N_SHADOW *pstShadows, BYTE bShadowsCount, BYTE *pbKey, DWORD dwReserved)
int AAP_API DEncrypt(HKEYCTX hKey, HHASHCTX hHash, BOOL bFinal, DWORD dwFlags, BYTE *pbData, DWORD *pdwDataLen, DWORD dwBufLen)
int AAP_API DSignHash(HHASHCTX hHash, HKEYCTX hKey, DWORD dwFlags, BYTE *pbSignature, DWORD *pdwSigLen)
int AAP_API DVerifySignature(HHASHCTX hHash, BYTE *pbSignature, DWORD dwSigLen, HKEYCTX hPubKey, DWORD dwFlags)
int AAP_API DMofNSplit(HSESSIONCTX hSession, BYTE bM, BYTE bN, BYTE *pbSecret, DWORD dwSecretLen, DN_M_OF_N_SPLIT_INFO *pstSplitInfo, DWORD dwReserved)
int AAP_API DSetHashParam(HHASHCTX hHash, DWORD dwParam, BYTE *pbData, DWORD dwDataLen, DWORD dwFlags)
int AAP_API DDuplicateHash(HHASHCTX hHash, DWORD dwFlag, HHASHCTX *phHash)
int AAP_API DCRLCertCheck(HSESSIONCTX hSession, char *szCRL, char *szCertId, char *szVerifyInfo)
int AAP_API DGenerateSVMK(HSESSIONCTX hSession, int nVersion, const BYTE *pbKey, BYTE bM, BYTE bN, DN_SC_M_OF_N_SHADOW *pstShadows, DWORD dwReserved)
int AAP_API DEFTImportTR31(HSESSIONCTX hSession, const char *szKBPK, const char *szKey, DWORD dwKeyAttributes, BYTE *pbKeyBlock, DWORD dwKeyBlockLen, DWORD dwParam)
int AAP_API DCalculateARPC(HSESSIONCTX hSession, char *szIssuerMK, char *szPAN, BYTE *pbSEQ, BYTE *pbARQC, BYTE *pbARC, BYTE *pbARPC, DWORD dwParam)
int AAP_API DGenerateEMV_HMAC(HSESSIONCTX hSession, BYTE bOP, char *szIK, char *szPAN, BYTE *pbSEQ, BYTE *pbNONCE, DWORD dwDataLen, BYTE *pbData, BYTE *pbMAC, DWORD dwParam)
int AAP_API DGenerateICCMK(HSESSIONCTX hSession, BYTE bOP, char *szIK, char *szKeK, char *szPAN, BYTE *pbSEQ, DWORD *pdwEnvelopeLen, BYTE *pbEnvelope, DWORD dwParam)
void AAP_API DGenerateBDKName(BYTE *pbKSI, char *szBDKName, DWORD dwParam)
int AAP_API DGeneratePIN(HSESSIONCTX hSession, char *szPGK, char *szPAN, DWORD dwOperation, int nPinLen, char *szInPin, char *szOffset, char *szOutPin, DWORD dwParam)
int AAP_API DEFTImportKey(HSESSIONCTX hSession, char *szKeyId, int nKeyAlgId, void *pstKeyParts, DWORD dwParam)
int AAP_API DGenerateDAC(HSESSIONCTX hSession, char *szIMKDAC, char *szPAN, BYTE *pbSEQ, BYTE *pbDAC, DWORD dwParam)
int AAP_API DDeriveEMV_Key(HSESSIONCTX hSession, char *szSrcKey, WORD wBufferLen, BYTE *pbBuffer, BYTE bOP, DWORD dwAttrib, char *szDstKey, HKEYCTX *phKey, DWORD dwParam)
int AAP_API DEFTCheckKeyParts(int nKeyAlgId, EFT_VISA_KEY_PARTS *pstKeyParts, DWORD dwParam)
int AAP_API DGenerateEMV_PinBlock(HSESSIONCTX hSession, BYTE bOP, BYTE *pbNONCE, char *szTransportKey, char *szISSUER_MK, char *szISSUER_SMC_MK, char *szPAN, BYTE *pbSEQ, BYTE *pbOLD_PB, BYTE *pbNEW_PB, BYTE *pbOutBlock, DWORD *pdwOutBlockLen, DWORD dwParam)
int AAP_API DMAC_ISO9797_1_Met2(DWORD dwType, BYTE *pbKey, DWORD dwAlg, const BYTE *pbMsg, DWORD dwMsgLen, BYTE *pbMAC)
int AAP_API DEFTGetKcv(HSESSIONCTX hSession, BYTE bType, const char *szKeyId, BYTE *pbKcv, DWORD *pdwKcvLen, DWORD dwReserved)
int AAP_API DVerifyPINBlock(HSESSIONCTX hSession, char *szPTK, char *szPGK, char *szPAN, char *szOffset, BYTE *pbInPinBlock, DWORD dwParam)
int AAP_API DGenerateDDA_ICCCert(HSESSIONCTX hSession, BYTE bOP, char *szIK, char *szPAN, DWORD dwDDA_DATALen, BYTE *pbDDA_DATA, DWORD *pdwSigLen, BYTE *pbSig, DWORD dwParam)
void AAP_API DGenerateDUKPTName(BYTE *pbKSI, BYTE *pbDID_CTR, char *szDUKPTName, DWORD dwParam)
int AAP_API DVerifyCVV(HSESSIONCTX hSession, char *szKeyId, char *szPAN, char *szExpirationDate, char *szServiceCode, char *szCVV, DWORD dwParam)
int AAP_API DEFTKeKImport(HSESSIONCTX hSession, BYTE bOP, DWORD dwAlgId, char *szKeKName, char *szKeyName, DWORD dwAttr, BYTE *pbKCV1, BYTE *pbKCV2, BYTE *pbKCV3, BYTE *pbKCVFinal, BYTE *pbBlob, DWORD dwFlags)
int AAP_API DEFTExportKey(HSESSIONCTX hSession, BYTE bExportMode, char *szKEKId, char *szKeyId, BYTE *pbEncryptedBlock, DWORD *pdwEncryptedBlockLen, BYTE *pbKeyCheckValue, DWORD dwParam)
int AAP_API DVerifyDAC(HSESSIONCTX hSession, char *szIMKDAC, char *szPAN, BYTE *pbSEQ, BYTE *pbDAC, DWORD dwParam)
int AAP_API DEFTExportZPK(HSESSIONCTX hSession, char *szKeyId, int *pnKeyAlg, int *pnKeySize, EFT_VISA_KEY_PARTS *pstKeyParts, DWORD dwParam)
int AAP_API DGenerateDUKPT(HSESSIONCTX hSession, BYTE *pbKSI, BYTE *pbDID_CTR, char *szDUKPT, DWORD dwParam)
int AAP_API DGeneratePVV(HSESSIONCTX hSession, char *szPGK, BYTE bPVKI, char *szPAN, char *szPIN, char *szPVV, DWORD dwParam)
int AAP_API DEFTExportAESKeyParts(HSESSIONCTX hSession, BYTE bKcvType, const char *szKeyId, void *pvKeyParts, DWORD dwReserved)
int AAP_API DGenerateEMV_CSR(HSESSIONCTX hSession, BYTE bOP, char *szIK, BYTE *pbTrackNum, BYTE *pbServiceID, BYTE *pbIssuerID, BYTE *pbExpDate, DWORD *pdwCSRLen, BYTE *pbCSR, DWORD dwParam)
int AAP_API DEncryptEMV(HSESSIONCTX hSession, BYTE bEncOP, char *szEncIK, BYTE *pbEncNONCE, BYTE bMacOP, char *szMacIK, BYTE *pbMacNONCE, char *szPAN, BYTE *pbSEQ, DWORD dwDataLen, BYTE *pbData, DWORD *pdwEncDataLen, BYTE *pbEncData, BYTE *pbMAC, DWORD dwParam)
int AAP_API DGenerateEMV_MAC(HSESSIONCTX hSession, BYTE bOP, char *szIK, char *szPAN, BYTE *pbSEQ, BYTE *pbNONCE, DWORD dwDataLen, BYTE *pbData, BYTE *pbMAC, DWORD dwParam)
int AAP_API DGenerateCVV(HSESSIONCTX hSession, char *szKeyId, char *szPAN, char *szExpirationDate, char *szServiceCode, char *szCVV, DWORD dwParam)
int AAP_API DCheckIDN(HSESSIONCTX hSession, char *szIK, char *szPAN, BYTE *pbSEQ, BYTE *pbATC, BYTE *pbUN, BYTE *pbIDN, DWORD dwParam)
int AAP_API DSignSDA(HSESSIONCTX hSession, char *szIK, BYTE *pbDAC, DWORD dwSDA_DATALen, BYTE *pbSDA_DATA, DWORD *pdwSigLen, BYTE *pbSig, DWORD dwParam)
int AAP_API DPINBlockTranslate(HSESSIONCTX hSession, char *szSrcPEK, char *szDstPEK, BYTE bTransBlockType, char *szPAN, BYTE *pbInPinBlock, BYTE *pbOutPinBlock, DWORD dwParam)
int AAP_API DEFTGenKCVOffline(DWORD dwType, int nAlgId, const BYTE *pbKey, DWORD dwKeyLen, BYTE *pbKCV, DWORD *pdwKCVLen, DWORD reserved)
int AAP_API DGenerateEMV_CSREx(HSESSIONCTX hSession, BYTE bOP, char *szIK, BYTE *pbTrackNum, BYTE *pbServiceID, BYTE *pbIssuerID, BYTE *pbExpDate, DBLOB *pdbCSR, BYTE *pbHash, DWORD dwParam)
int AAP_API DEFTExportTR31(HSESSIONCTX hSession, const char *szKBPK, const char *szKey, void *pvReserved, WORD wUsage, BYTE bMode, BYTE bExport, BYTE *pbOutBlock, DWORD *pdwOutBlockLen, DWORD dwParam)
int AAP_API DCalculateARPC_Ex(HSESSIONCTX hSession, DWORD dwOp, void *pvInData, BYTE *pbARPC, DWORD dwParam)
int AAP_API DAssociatePKCS11Key(HSESSIONCTX hSession, char *szPriKey, char *szPubKey, char *szCert, void *pvReserved, DWORD dwReserved)
int AAP_API DRSAPrivateKey2Info(const BYTE *pbRsa, DWORD dwRsaLen, DWORD dwInForm, DN_RSA_PRIVATE_KEY_INFO *stRsaInfo, DWORD dwReserved)
int AAP_API DDuplicateKey(HKEYCTX hKey, DWORD dwFlags, HKEYCTX *phKey)
int AAP_API DSetKeyParam(HKEYCTX hKey, DWORD dwParam, BYTE *pbData, DWORD dwDataLen, DWORD dwFlags)
int AAP_API DGetUserKey(HSESSIONCTX hSession, char *szKeyId, DWORD dwFlags, HKEYCTX *phKey)
int AAP_API DImportPKCS12(const HSESSIONCTX hSession, const char *szPkcs12File, const char *szPkcs12Pwd, const char *szKeyId, const DWORD dwKeyAttr, const char *szCertId)
int AAP_API DPKCS8ExportKey(HSESSIONCTX hSession, char *szKeyId, char *szSecret, BYTE **ppbKeyEnvelope, DWORD *pdwKeyEnvelopeLen)
int AAP_API DGenerateKey(HSESSIONCTX hSession, char *szKeyId, int nAlgId, DWORD dwFlags, HKEYCTX *phKey)
int AAP_API DDeriveKey(HHASHCTX hHash, char *szKeyId, int nAlgId, DWORD dwFlags, HKEYCTX *phKey)
int AAP_API DPKCS8ImportKey(HSESSIONCTX hSession, char *szKeyId, char *szSecret, DWORD dwKeyAlg, DWORD dwAttrib, BYTE *pbKeyEnvelope, DWORD dwKeyEnvelopeLen)
int AAP_API DGenerateKeyMaterial(HSESSIONCTX hSession, int nAlgId, BYTE *pbData, DWORD *pdwDataLen, DWORD dwReserved)
int AAP_API DImportPKCS12Buffer(const HSESSIONCTX hSession, BYTE *pbPkcs12, DWORD dwPkcs12Len, const char *szPkcs12Pwd, const char *szKeyId, DWORD dwKeyAttr, const char *szCertId, const char *szPubKeyId, DWORD dwFlags)
int AAP_API DExportPKCS12(const HSESSIONCTX hSession, const char *szPkcs12Pwd, const char *szKeyId, const char *szCertId, const char *szReserved, BYTE **ppbPkcs12, DWORD *pdwPkcs12Len, DWORD dwFlags)
int AAP_API DRSAPublicKey2Info(BYTE *pbKey, DWORD dwKeyLen, DWORD dwInForm, void *pvPubKeyInfo, DWORD dwReserved)
int AAP_API DGeneratePKCS10CSR(HSESSIONCTX hSession, char *szPrivateKeyName, BYTE bVersion, char *szDN, DWORD dwOutType, DWORD *pdwCSRLen, BYTE **ppbCSR, DWORD dwParam)
int AAP_API DDestroyKey(HKEYCTX *phKey, DWORD dwFlags)
int AAP_API DImportKey(HSESSIONCTX hSession, char *szKeyId, HKEYCTX hKEKey, DWORD dwBlobType, int nAlgId, DWORD dwFlags, BYTE *pbData, DWORD dwDataLen, HKEYCTX *phKey)
int AAP_API DByokExport(HSESSIONCTX hSession, const char *cszKeyId, const char *cszKekId, DWORD dwType, const void *pvData, BYTE **ppbOutData, DWORD *pdwOutDataLen, DWORD dwReserved)
int AAP_API DGetKeyParam(HKEYCTX hKey, DWORD dwParam, BYTE *pbData, DWORD *pdwDataLen, DWORD dwFlags)
int AAP_API DExportKey(HKEYCTX hKey, HKEYCTX hKEKey, DWORD dwBlobType, DWORD dwFlags, BYTE *pbData, DWORD *pdwDataLen)
int AAP_API DHashSessionKey(HKEYCTX hKey, HHASHCTX hHash, DWORD dwFlags)
int AAP_API DManageAToken(HSESSIONCTX hSession, BYTE bOP, DN_A_TOKEN_FULL *pstATokenFull, funcListAKeysCallback fnCallBack, void *pvCallbackParam, DWORD dwParam)
int AAP_API DGetLogEvents(HSESSIONCTX hSession, funcLogEventCallback fncallback, void *pParam)
int AAP_API DDSBindHSM(HSESSIONCTX hSession, const char *szBindKey, DWORD dwReserved)
int(AAP_API * funcListAKeysCallback)(void *pvToken, void *pParam, BOOL bFinal)
Definição dinamo.h:4340
int AAP_API DReadFile(HSESSIONCTX hSession, char *szFileId, funcWriteLocalFileCallback fncallback, void *pParam)
int AAP_API DWriteFileBuffer(HSESSIONCTX hSession, const char *szFileId, BYTE *pbFile, DWORD dwFileSize, DWORD dwOptions)
int AAP_API DGetHSMTLSCert(char *szAddress, int nPort, DWORD dwOutFormat, BYTE **ppbOutCert, DWORD *pdwOutCertLen, DWORD dwFlags)
int(AAP_API * funcReadLocalFileCallback)(BYTE *pbData, DWORD *pdwDataLen, void *pParam, BOOL *pbFinal)
Definição dinamo.h:4175
const char *AAP_API DGetReturnCodeString(int nErrorValue, RetCodeMsgType eErrorType)
int AAP_API DAdmOperation(HSESSIONCTX hSession, DWORD dwParam, BYTE *pbData, DWORD dwDataLen, DWORD dwFlags)
int AAP_API DNSAuthSetState(HSESSIONCTX hSession, DWORD dwAcl, BYTE bState, DN_SC_M_OF_N_SHADOW *pstShadows, DWORD dwShadowsCount, DWORD dwReserved)
int AAP_API DBackupData(HSESSIONCTX hSession, char *szBackupFile, char *szPin, int nDirection)
int AAP_API DDSUnbindHSM(HSESSIONCTX hSession, DWORD dwReserved)
int AAP_API DRemoveObj(HSESSIONCTX hSession, char *szObjId)
int AAP_API DSCWriteShadow(DN_SC_M_OF_N_SHADOW *pstShadow, const char *szPIN, BOOL bOverwrite, DWORD dwReserved)
int AAP_API DSCChangePIN(const char *szCurrentPIN, const char *szNewPIN, DWORD dwReserved)
int(AAP_API * funcListKeyCallback)(char *szKeyName, void *pParam, BOOL bFinal)
Definição dinamo.h:3917
int AAP_API DTruncateLog(HSESSIONCTX hSession)
int AAP_API DSCGetLabel(const char *pin, char *label, DWORD reserved)
int AAP_API DBackupObject(HSESSIONCTX hSession, DWORD dwOP, char *szObjectId, char *szPin, BYTE *pbData, DWORD *pdwDataLen, DWORD dwReserved)
int AAP_API DGetStatLog(HSESSIONCTX hSession, DWORD dwStart, DWORD dwOffset, DWORD *pdwLogSize, BYTE **ppbLog)
BOOL AAP_API DSCIsLibLoaded()
int AAP_API DGetErrorString(int nErrorValue, char *szErrorCode, char *szErrorDesc)
int AAP_API DListObjs(HSESSIONCTX hSession, funcListKeyCallback fncallback, void *pParam)
int AAP_API DListBlobs(HSESSIONCTX hSession, funcListKeyCallback fncallback, void *pParam)
int(AAP_API * funcLogEventCallback)(char *szEvent, void *pParam, BOOL bFinal)
Definição dinamo.h:4014
int AAP_API DHSMTool(HSESSIONCTX hSession, DWORD dwOption, const char *szTarget, void **pvResult, DWORD *pdwResultLen, DWORD dwFlags)
int(AAP_API * funcWriteLocalFileCallback)(BYTE *pbData, DWORD dwDataLen, void *pParam, BOOL bFinal)
Definição dinamo.h:4216
int AAP_API DSCGetInfo(DN_SC_INFO *pstInfo, DWORD dwReserved)
RetCodeMsgType
Definição dinamo.h:4586
int AAP_API DManageATokenCache(HSESSIONCTX hSession, DWORD dwOP, void *pOutData, DWORD dwParam)
int AAP_API DSCSetLabel(const char *pin, const char *label, DWORD reserved)
int AAP_API DFindHSM(DWORD dwServiceType, DWORD dwFilter, void **ppvOutputData, DWORD *pdwOutputDataLen, DWORD dwFlags)
int AAP_API DWriteFile(HSESSIONCTX hSession, char *szFileId, DWORD dwFileSize, funcReadLocalFileCallback fncallback, void *pParam)
int AAP_API DSCReadShadow(const char *szPin, DN_SC_M_OF_N_SHADOW *pstShadow, DWORD dwReserved)
int AAP_API DSCErase(const char *szPIN, DWORD dwReserved)
int AAP_API DReadFileBuffer(HSESSIONCTX hSession, const char *szFileId, BYTE **ppbData, DWORD *pdwDataLen, DWORD dwReserved)
@ DESC_MSG
Definição dinamo.h:4588
@ CODE_MSG
Definição dinamo.h:4587
void *AAP_API DAlloc(DWORD dwsize)
void AAP_API DFree(void *p)
int AAP_API DOATHGetBlobInfo(const HSESSIONCTX hSession, char *szMasterKey, BYTE *pbInBlob, DWORD dwInBlobLen, DWORD dwOutBlobType, BYTE *pbOutInfo, DWORD *pdwOutInfoLen, DWORD dwParam)
int AAP_API DOATHIssueBlob(HSESSIONCTX hSession, char *szMasterKeyId, DWORD dwParamBlobType, void *pvParamBlob, DWORD dwParamBlobLen, BYTE *pbOTPBlob, DWORD *pdwOTPBlobLen, DWORD dwFlags)
int AAP_API DOATHGetNextOTP(HSESSIONCTX hSession, char *szMasterKeyId, BYTE bOTPLen, BYTE *pbOATHBlob, DWORD dwOATHBlobLen, char *szOTP, DWORD dwFlags)
int AAP_API DOATHPskcTranslate(HSESSIONCTX hSession, char *szMasterKey, BYTE *pbPSK, BYTE bPSKLen, BYTE *pbPSKC, DWORD dwPSKCLen, void **pvBlobList, DWORD *pdwBlobListQuantity, DWORD dwParam)
int AAP_API DOATHCheckOTP(HSESSIONCTX hSession, char *szMasterKeyId, char *szOTP, BYTE *pbOATHBlob, DWORD *pdwOATHBlobLen, DWORD dwFlags)
int AAP_API DOATHBlobResync(HSESSIONCTX hSession, char *szMasterKeyId, char *szOTP1, char *szOTP2, BYTE *pbOATHBlob, DWORD *pdwOATHBlobLen, DWORD dwFlags)
int AAP_API DPIXDictVerify(HSESSIONCTX hSession, const char *szChainId, const char *szCRL, DWORD dwFlags, DWORD dwSizeSignedDictEnvelope, BYTE *pbSignedDictEnvelope)
int AAP_API DPIXDelete(HSESSIONCTX hSession, const char *szKeyId, const char *szCertId, const char *szPIXCertChainId, const char *szURL, DWORD dwCountRequestHeaderList, const char *pszRequestHeaderList[], DWORD dwTimeOut, DWORD *pdwSizeResponseHeaders, BYTE **ppbResponseHeaders, DWORD *pdwSizeResponseBody, BYTE **ppbResponseBody, DWORD dwParam)
int AAP_API DPIXSign(HSESSIONCTX hSession, const char *szKeyId, const char *szCertId, DWORD dwFlags, DWORD dwSizeUnsignedPIXEnvelope, BYTE *pbUnsignedPIXEnvelope, DWORD *pdwSizeSignedPIXEnvelope, BYTE **ppbSignedPIXEnvelope)
int AAP_API DPIXPost(HSESSIONCTX hSession, const char *szKeyId, const char *szCertId, const char *szPIXCertChainId, const char *szURL, DWORD dwCountRequestHeaderList, const char *pszRequestHeaderList[], DWORD dwSizeRequestData, BYTE *pbRequestData, DWORD dwTimeOut, DWORD *pdwSizeResponseHeaders, BYTE **ppbResponseHeaders, DWORD *pdwSizeResponseBody, BYTE **ppbResponseBody, DWORD dwParam)
int AAP_API DPIXJWSCheck(HSESSIONCTX hSession, const char *szChain, const char *szCRL, DWORD dwJWSLen, BYTE *pbJWS, DWORD dwFlags, DWORD *pdwHeaderLen, BYTE *pbHeader, DWORD *pdwPayloadLen, BYTE *pbPayload)
int AAP_API DPIXGet(HSESSIONCTX hSession, const char *szKeyId, const char *szCertId, const char *szPIXCertChainId, const char *szURL, DWORD dwCountRequestHeaderList, const char *pszRequestHeaderList[], DWORD dwTimeOut, DWORD *pdwSizeResponseHeaders, BYTE **ppbResponseHeaders, DWORD *pdwSizeResponseBody, BYTE **ppbResponseBody, DWORD dwParam)
int AAP_API DPIXPut(HSESSIONCTX hSession, const char *szKeyId, const char *szCertId, const char *szPIXCertChainId, const char *szURL, DWORD dwCountRequestHeaderList, const char *pszRequestHeaderList[], DWORD dwSizeRequestData, BYTE *pbRequestData, DWORD dwTimeOut, DWORD *pdwSizeResponseHeaders, BYTE **ppbResponseHeaders, DWORD *pdwSizeResponseBody, BYTE **ppbResponseBody, DWORD dwParam)
int AAP_API DPIXVerify(HSESSIONCTX hSession, const char *szChainId, const char *szCRL, DWORD dwFlags, DWORD dwSizeSignedPIXEnvelope, BYTE *pbSignedPIXEnvelope)
int AAP_API DPIXJWSSign(HSESSIONCTX hSession, const char *szKeyId, DWORD dwFlags, DWORD dwHeaderLen, BYTE *pbHeader, DWORD dwPayloadLen, BYTE *pbPayload, DWORD *pdwJWSLen, BYTE *pbJWS)
int AAP_API DPIXDictSign(HSESSIONCTX hSession, const char *szKeyId, const char *szCertId, DWORD dwFlags, DWORD dwSizeUnsignedDictEnvelope, BYTE *pbUnsignedDictEnvelope, DWORD *pdwSizeSignedDictEnvelope, BYTE **ppbSignedDictEnvelope)
int AAP_API DPKCS7Sign(HSESSIONCTX hSession, const char *szKeyName, const char *szKeyCert, const char *szCerts, DWORD dwAttrib, BYTE *pbContent, DWORD dwContentLen, DWORD *pdwSignatureLen, BYTE **ppbSignature, DWORD dwParam)
int AAP_API DSetLBList(DWORD dwParam, void *pvList, DWORD dwListCount, DWORD dwReserved)
int AAP_API DGetSessionParam(HSESSIONCTX hSession, DWORD dwParam, BYTE *pbData, DWORD *pdwDataLen, DWORD dwFlags)
int AAP_API DOpenSession(HSESSIONCTX *phSession, DWORD dwParam, BYTE *pbData, DWORD dwDataLen, DWORD dwFlags)
int AAP_API DCloseSession(HSESSIONCTX *phSession, DWORD dwFlags)
int AAP_API DInitialize(DWORD dwReserved)
int AAP_API DGetLBList(DWORD dwParam, void *pvList, DWORD *pdwListCount, DWORD dwReserved)
int AAP_API DFinalize()
int AAP_API DSetSessionParam(HSESSIONCTX hSession, DWORD dwParam, BYTE *pbData, DWORD dwDataLen, DWORD dwFlags)
int AAP_API DSKeepNewSecret(HSESSIONCTX hSession, const char *cszId, BYTE bSecLevel, WORD wAuthType, DWORD dwReserved)
int AAP_API DSKeepProbeSecret(HSESSIONCTX hSession, const char *cszId, SKeepProbeInfo *pstInfo, DWORD dwReserved)
int AAP_API DSKeepMatchSecret(HSESSIONCTX hSession, const char *cszId, const SKeepShare *cpstShares, DWORD dwSharesCount, DWORD dwReserved)
int AAP_API DSKeepRemoveSecret(HSESSIONCTX hSession, const char *cszId, BYTE bSecLevel, WORD wAuthType, DWORD dwReserved)
int AAP_API DSKeepCalcShareCks(DWORD dwType, const char *cszShare, char *szCks)
int AAP_API DSKeepSplitSecret(HSESSIONCTX hSession, const char *cszId, BYTE bSecLevel, WORD wAuthType, BYTE bM, BYTE bN, SKeepShare *pstShares, DWORD dwReserved)
int AAP_API DSKeepRecoverSecret(HSESSIONCTX hSession, const char *cszId, const SKeepShare *cpstShares, DWORD dwSharesCount, SKeepRecoverInfo *pstRecoverInfo, DWORD dwReserved)
int AAP_API DSPBImportCertificate(HSESSIONCTX hSession, BYTE bActivate, const char *szUser, BYTE *pbCertificate, DWORD dwCertificateLen, const char *szDomain, DWORD dwParam)
int AAP_API DSPBDecodeCont(HSPBCTX hSPBCtx, BYTE *pbDataIn, DWORD dwDataInLen, BYTE **ppbDataOut, DWORD *pdwDataOutLen)
int AAP_API DSPBDecodeEnd(HSPBCTX *hSPBCtx)
int AAP_API DSPBSetISPBMap(HSESSIONCTX hSession, char *szISPB, char *szKeyId, char *szCertId, DWORD dwParam)
int AAP_API DSPBMapInfo(HSESSIONCTX hSession, const char *szIdCert, EXT_MAP_2_OBJ_INFO *pstExtMap, DWORD dwParam)
int AAP_API DSPBExportPKCS12(const HSESSIONCTX hSession, const char *szPkcs12Pwd, const char *szISPB, const char *szReserved, BYTE **ppbPkcs12, DWORD *pdwPkcs12Len, DWORD dwReserved)
int AAP_API DSPBEncodeCont(HSPBCTX hSPBCtx, BYTE *pbDataIn, DWORD dwDataInLen, BYTE *pbDataOut, DWORD *pdwDataOutLen)
int AAP_API DSPBCalculateObjectId(char *szISPB, char *szDomain, DWORD dwKeyType, char *szOutObjName, DWORD dwParam)
int AAP_API DSPBGetCertificate(HSESSIONCTX hSession, const char *szIdCert, BYTE **ppbCertificate, DWORD *pdwCertificateLen, DWORD dwParam)
int AAP_API DSPBGenerateCSR(HSESSIONCTX hSession, char *szPrivateKeyName, BYTE bVersion, char *szSPBSubject, DWORD dwOutType, DWORD *pdwCSRLen, BYTE **ppbCSR, DWORD dwParam)
int AAP_API DSPBImportPKCS12(HSESSIONCTX hSession, BYTE bActivate, const char *szUser, const char *szPkcs12File, const char *szPkcs12Pwd, const char *szDomain, DWORD dwKeyAttr)
int AAP_API DSPBGenerateKey(HSESSIONCTX hSession, char *szID, char *szPrivateKeyName, DWORD dwKeyParam, DWORD dwParam)
int AAP_API DSPBEncodeEnd(HSPBCTX *hSPBCtx, BYTE *pbSPBHeader, DWORD *pdwSPBHeaderLen)
int AAP_API DSPBActivateCertificate(HSESSIONCTX hSession, const char *szIdCert, const char *szDomain, DWORD dwParam)
int AAP_API DSPBDecodeInit(HSESSIONCTX hSession, char *szSrcISPB, char *szDstISPB, BYTE *pbHeader, DWORD dwHeaderLen, BYTE bAcceptExpiredCert, BYTE bAutoUpdateCert, DWORD dwMessageDataLen, HSPBCTX *hSPBCtx, DWORD dwFlags)
int AAP_API DSPBEncodeInit(HSESSIONCTX hSession, char *szSrcISPB, char *szDstISPB, DWORD dwTotalDataLen, BYTE bErrorCode, BYTE bSpecialTreatment, HSPBCTX *hSPBCtx, DWORD dwFlags)
int AAP_API DSVaultGetData(HSESSIONCTX hSession, DWORD dwOp, const char *szMK, const char *szMask, BYTE *pbTokenBlob, DWORD dwTokenBlobLen, char *szData, DWORD *pdwDataLen, DWORD dwReserved)
int AAP_API DSVaultGenToken(HSESSIONCTX hSession, DWORD dwOp, BYTE *pbInData, BYTE *pbTokenBlob, DWORD *pdwTokenBlobLen, char *szToken, DWORD dwReserved)
int AAP_API DRemoveUser(HSESSIONCTX hSession, char *szUserId)
int AAP_API DUnassignToken(const HSESSIONCTX hSession, const DWORD dwParam, const char *szUserId)
int AAP_API DGetUserParam(HSESSIONCTX hSession, DWORD dwParam, BYTE *pbData, DWORD *pdwDataLen, DWORD dwFlags)
int AAP_API DAssignToken(const HSESSIONCTX hSession, const char *szUserId, const DWORD dwParam, BYTE *pbData, const DWORD dwDataLen)
int AAP_API DCreateUser(HSESSIONCTX hSession, struct USER_INFO userInfo)
int AAP_API DSetUserParam(HSESSIONCTX hSession, DWORD dwParam, BYTE *pbData, DWORD dwDataLen, DWORD dwFlags)
int AAP_API DOATHResync(const HSESSIONCTX hSession, char *szUser, char *szOTP1, char *szOTP2, DWORD dwParam)
int AAP_API DListUsers(HSESSIONCTX hSession, funcListUsersCallback fncallback, void *pParam)
int(AAP_API * funcListUsersCallback)(char *szUserName, void *pParam, BOOL bFinal)
Definição dinamo.h:4767
int AAP_API DVerifySignedXml(HSESSIONCTX hSession, char *szCertsId, DWORD dwSizeSignedXml, BYTE *pbSignedXml, DWORD dwFilterLen, BYTE *pbFilter)
int AAP_API DSignXml(HKEYCTX hKey, HHASHCTX hHash, char *szCertId, DWORD dwSizeUnsignedXml, BYTE *pbUnsignedXml, DWORD dwFilterLen, BYTE *pbFilter, DWORD *pdwSizeSignedXml, BYTE **ppbSignedXml)
int AAP_API DSignXml2(HSESSIONCTX hSession, BYTE bHashMode, DWORD dwFlags, const char *szKeyId, const char *szCertId, DWORD dwSizeUnsignedXml, BYTE *pbUnsignedXml, DWORD dwFilterLen, BYTE *pbFilter, DWORD *pdwSizeSignedXml, BYTE **ppbSignedXml)
int AAP_API DVerifySignedXmlEx(HSESSIONCTX hSession, char *szCertsId, DWORD dwSizeSignedXml, BYTE *pbSignedXml, DWORD dwFilterLen, BYTE *pbFilter, char *szCRL)
Definição dinamo.h:3156
int nPort
Definição dinamo.h:3158
DN_A_TOKEN stAToken
Definição dinamo.h:3159
Definição dinamo.h:3145
char szAPIToken[MAX_HTTP_API_TOKEN_LEN+1]
Definição dinamo.h:3147
DWORD dwTimeout
Definição dinamo.h:3148
char szAddr[MAX_HTTP_ADDR_LEN+1]
Definição dinamo.h:3146
Definição dinamo.h:3122
int nPort
Definição dinamo.h:3124
char szUserId[MAX_USR_LEN]
Definição dinamo.h:3125
DWORD dwAuthType
Definição dinamo.h:3127
char szAddr[MAX_ADDR_LEN]
Definição dinamo.h:3123
char szPassword[MAX_USR_PWD]
Definição dinamo.h:3126
int nStrongAuthLen
Definição dinamo.h:3133
BYTE * pbStrongAuth
Definição dinamo.h:3132
Definição dinamo.h:3110
int nPort
Definição dinamo.h:3112
char szUserId[MAX_USR_LEN]
Definição dinamo.h:3113
char szAddr[MAX_ADDR_LEN]
Definição dinamo.h:3111
char szPassword[MAX_USR_PWD]
Definição dinamo.h:3114
Definição dinamo.h:3167
int nPort
Definição dinamo.h:3169
Definição dinamo.h:2331
int nPubKeyHSMAlgId
Definição dinamo.h:2344
DWORD dwVersion
Definição dinamo.h:2332
DBLOB dbPublicKey
Definição dinamo.h:2343
Definição dinamo.h:2868
int nVersion
Definição dinamo.h:2869
DBLOB dbIssuer
Definição dinamo.h:2872
DBLOB dbSubject
Definição dinamo.h:2871
P11_DATE dtNotBefore
Definição dinamo.h:2875
DBLOB dbSerialNumber
Definição dinamo.h:2873
P11_DATE dtNotAfter
Definição dinamo.h:2876
Definição dinamo.h:3472
DWORD dwIp
Definição dinamo.h:3474
DWORD dwRCode
Definição dinamo.h:3476
DWORD dwCount
Definição dinamo.h:3473
Definição dinamo.h:2304
void * pvData
Definição dinamo.h:2305
DWORD dwDataLen
Definição dinamo.h:2306
Definição dinamo.h:3100
DN_A_TOKEN stAToken
Definição dinamo.h:3101
QWORD qwExpiration
Definição dinamo.h:3102
Definição dinamo.h:3090
Definição dinamo.h:3504
DWORD dwSeedLen
Definição dinamo.h:3506
BYTE bVer
Definição dinamo.h:3505
Definição dinamo.h:3517
BYTE bVer
Definição dinamo.h:3518
Definição dinamo.h:3532
BYTE bStorageType
Definição dinamo.h:3533
BYTE bBip32Depth
Definição dinamo.h:3536
DWORD dwType
Definição dinamo.h:3534
Definição dinamo.h:3547
BYTE bLen
Definição dinamo.h:3549
BYTE bType
Definição dinamo.h:3548
Definição dinamo.h:3403
BYTE bOP
Definição dinamo.h:3410
Definição dinamo.h:3414
DWORD dwPADLen
Definição dinamo.h:3425
DWORD dwCSULen
Definição dinamo.h:3423
BYTE bOP
Definição dinamo.h:3419
Definição dinamo.h:2374
DWORD dwDataLen
Definição dinamo.h:2376
Definição dinamo.h:2386
DN_EC_BIG_NUMBER bnCofactor
Definição dinamo.h:2394
DN_EC_BIG_NUMBER bnOrder
Definição dinamo.h:2396
DN_EC_BIG_NUMBER bnP
Definição dinamo.h:2389
DN_EC_POINT_INFO stGeneratorPoint
Definição dinamo.h:2397
DN_EC_BIG_NUMBER bnA
Definição dinamo.h:2391
DN_EC_BIG_NUMBER bnB
Definição dinamo.h:2392
int nFieldType
Definição dinamo.h:2387
Definição dinamo.h:2380
DN_EC_BIG_NUMBER bnY
Definição dinamo.h:2382
DN_EC_BIG_NUMBER bnX
Definição dinamo.h:2381
Definição dinamo.h:2407
DN_EC_GROUP_INFO stGroupInfo
Definição dinamo.h:2408
DN_EC_BIG_NUMBER bnPrivatevalue
Definição dinamo.h:2409
Definição dinamo.h:2401
DN_EC_GROUP_INFO stGroupInfo
Definição dinamo.h:2402
DN_EC_POINT_INFO stPublicPoint
Definição dinamo.h:2403
Definição dinamo.h:2469
BYTE bIsEftd0Active
Definição dinamo.h:2472
BYTE bMsgHeaderLen
Definição dinamo.h:2470
BYTE bPinLen
Definição dinamo.h:2471
Definição dinamo.h:5890
int nEphemeralKekAlg
Definição dinamo.h:5892
char * szKeKKid
Definição dinamo.h:5891
char * szGenerator
Definição dinamo.h:5893
Definição dinamo.h:3636
DN_OBJ_STATS stGlobal
Definição dinamo.h:3637
Definição dinamo.h:3567
BYTE bN
Definição dinamo.h:3570
BYTE bM
Definição dinamo.h:3569
BYTE bPos
Definição dinamo.h:3568
Definição dinamo.h:3578
Definição dinamo.h:3586
DWORD dwPartCount
Definição dinamo.h:3590
Definição dinamo.h:2521
int nAlgId
Definição dinamo.h:2522
QWORD qwCount
Definição dinamo.h:2523
Definição dinamo.h:3597
ND_uint64_t uCount
Definição dinamo.h:3601
ND_uint64_t tFirst
Definição dinamo.h:3598
ND_uint64_t uLast
Definição dinamo.h:3600
ND_uint64_t uFirst
Definição dinamo.h:3599
Definição dinamo.h:3608
DN_OBJ_STAT_INFO stTouch
Definição dinamo.h:3609
DN_OBJ_STAT_INFO stUsage
Definição dinamo.h:3610
Definição dinamo.h:2425
DWORD dwDataLen
Definição dinamo.h:2427
Definição dinamo.h:2540
DWORD dwExponent2Len
Definição dinamo.h:2554
DWORD dwPrime2Len
Definição dinamo.h:2550
DWORD dwModulusLen
Definição dinamo.h:2542
DWORD dwPrime1Len
Definição dinamo.h:2548
DWORD dwCoefficientLen
Definição dinamo.h:2556
DWORD dwPrivExponentLen
Definição dinamo.h:2546
DWORD dwExponent1Len
Definição dinamo.h:2552
DWORD dwPubExponentLen
Definição dinamo.h:2544
Definição dinamo.h:2434
DN_RSA_BIG_NUMBER bnModulus
Definição dinamo.h:2435
DN_RSA_BIG_NUMBER bnPubExponent
Definição dinamo.h:2436
Definição dinamo.h:2569
BOOL bHasPINInfo
Definição dinamo.h:2586
BOOL bIsPINSMCOn
Definição dinamo.h:2587
BOOL bIsFormatted
Definição dinamo.h:2584
BYTE bLockByte1
Definição dinamo.h:2580
BYTE bPINMMPN
Definição dinamo.h:2588
BYTE bPINSCR
Definição dinamo.h:2589
BYTE bCardChipVersion
Definição dinamo.h:2579
BYTE bCardProgramVersion
Definição dinamo.h:2578
BOOL bIsPINLocked
Definição dinamo.h:2585
BOOL bIsOEMKeyAvailable
Definição dinamo.h:2583
BOOL bHasLegacyCard
Definição dinamo.h:2582
BYTE bPINUCR
Definição dinamo.h:2590
int nATRSize
Definição dinamo.h:2571
BYTE bPINCKS
Definição dinamo.h:2591
BYTE bLockByte2
Definição dinamo.h:2581
Definição dinamo.h:3694
BYTE bN
Definição dinamo.h:3697
BYTE bM
Definição dinamo.h:3696
BYTE bPos
Definição dinamo.h:3695
Definição dinamo.h:3705
int nVersion
Definição dinamo.h:3706
Definição dinamo.h:2531
DWORD dwObjCountCount
Definição dinamo.h:2534
DN_OBJ_COUNT * pstObjCount
Definição dinamo.h:2533
Definição dinamo.h:3449
BYTE bVersion
Definição dinamo.h:3450
Definição dinamo.h:3379
DWORD dwAttributes
Definição dinamo.h:3380
EFT_AES_KEY_PARTS stParts
Definição dinamo.h:3381
Definição dinamo.h:3368
Definição dinamo.h:3388
Definição dinamo.h:3354
Definição dinamo.h:3249
DWORD dwObjAlgId2
Definição dinamo.h:3252
DWORD dwObjAlgId1
Definição dinamo.h:3250
Definição dinamo.h:3433
DWORD dwTargetKeyAlg
Definição dinamo.h:3437
DWORD dwTargetKeyAttributes
Definição dinamo.h:3438
DBLOB dbPubKey
Definição dinamo.h:3439
DBLOB dbKDFData
Definição dinamo.h:3440
Definição dinamo.h:2479
BYTE * pbPubKey
Definição dinamo.h:2484
DWORD dwFlags
Definição dinamo.h:2482
BOOL bTempKey
Definição dinamo.h:2483
int nAlgId
Definição dinamo.h:2481
DWORD dwPubKeyLen
Definição dinamo.h:2485
Definição dinamo.h:3070
DWORD dwImageLen
Definição dinamo.h:3072
Definição dinamo.h:3063
DWORD dwParam
Definição dinamo.h:3064
DWORD dwHipFlags
Definição dinamo.h:3065
DWORD dwHipColor
Definição dinamo.h:3066
Definição dinamo.h:3049
DWORD dwStructId
Definição dinamo.h:3050
Definição dinamo.h:2880
DWORD dwObjAttr
Definição dinamo.h:2883
DWORD dwObjHotpFlags
Definição dinamo.h:2884
DBLOB * pdbStLogoImage
Definição dinamo.h:2888
DWORD dwStructId
Definição dinamo.h:2881
Definição dinamo.h:3055
DWORD dwStructId
Definição dinamo.h:3056
Definição dinamo.h:2269
int nPort
Definição dinamo.h:2271
time_t tmNow
Definição dinamo.h:2272
int nqtdcache
Definição dinamo.h:2273
Definição dinamo.h:2350
Definição dinamo.h:2799
ISSUE_OATH_INFO_t stInfo
Definição dinamo.h:2800
Definição dinamo.h:2808
ISSUE_OATH_INFO_t stInfo
Definição dinamo.h:2809
Definição dinamo.h:2733
BYTE seed_len
Definição dinamo.h:2734
ND_OATH_uint64_t T0
Definição dinamo.h:2754
WORD time_step
Definição dinamo.h:2749
ND_OATH_uint64_t moving_factor
Definição dinamo.h:2741
BYTE truncation_offset
Definição dinamo.h:2745
Definição dinamo.h:2768
BYTE seed_len
Definição dinamo.h:2769
ND_OATH_uint64_t T0
Definição dinamo.h:2789
WORD time_step
Definição dinamo.h:2784
ND_OATH_uint64_t moving_factor
Definição dinamo.h:2776
BYTE truncation_offset
Definição dinamo.h:2780
Definição dinamo.h:2698
WORD wTimeStep
Definição dinamo.h:2710
BYTE bUseDefaultMovingFactor
Definição dinamo.h:2719
ND_OATH_uint64_t otMovingFactor
Definição dinamo.h:2722
ND_OATH_uint64_t otT0
Definição dinamo.h:2715
BYTE bTruncationOffset
Definição dinamo.h:2706
BYTE bSeedLen
Definição dinamo.h:2699
Definição dinamo.h:2281
HSM_ADDR * pstLBList
Definição dinamo.h:2282
DWORD dwLBListCount
Definição dinamo.h:2283
Definição dinamo.h:3241
char szObj1Id[MAX_OBJ_NAME_LEN+1]
Definição dinamo.h:3243
char szObj2Id[MAX_OBJ_NAME_LEN+1]
Definição dinamo.h:3245
DWORD dwObj1AlgId
Definição dinamo.h:3242
DWORD dwObj2AlgId
Definição dinamo.h:3244
Definição dinamo.h:3258
DWORD dwModuleId
Definição dinamo.h:3259
char szModuleNameVersion[MAX_MODULE_NAME_VERSION_LEN]
Definição dinamo.h:3260
Definição dinamo.h:2818
ISSUE_OATH_BLOB_t stOATHBlob
Definição dinamo.h:2819
Definição dinamo.h:2827
BYTE key_len
Definição dinamo.h:2832
BYTE type
Definição dinamo.h:2828
BYTE truncation_offset
Definição dinamo.h:2834
Definição dinamo.h:2841
OATH_SA_v1 sa_v1
Definição dinamo.h:2842
ND_OATH_uint64_t T0
Definição dinamo.h:2847
WORD time_step
Definição dinamo.h:2843
Definição dinamo.h:2603
DWORD len
Definição dinamo.h:2607
DWORD type
Definição dinamo.h:2605
DWORD attrib
Definição dinamo.h:2606
DWORD version
Definição dinamo.h:2604
Definição dinamo.h:2680
OBJ_HDR_V1 stSlot2Header
Definição dinamo.h:2687
OBJ_HDR_V1 stObjectHeader
Definição dinamo.h:2681
BYTE bBlockedStatus
Definição dinamo.h:2690
ND_uint64_t stCreationTime
Definição dinamo.h:2691
OBJ_HDR_V1 stSlot1Header
Definição dinamo.h:2684
Definição dinamo.h:2669
OBJ_HDR_V1 stObjectHeader
Definição dinamo.h:2671
DWORD dwVERB
Definição dinamo.h:2670
Definição dinamo.h:5014
const char * pszString
Definição dinamo.h:5016
DWORD dwId
Definição dinamo.h:5015
DWORD dwType
Definição dinamo.h:5017
Definição dinamo.h:2614
QWORD qwOrig_creat
Definição dinamo.h:2624
QWORD qwDeactiv
Definição dinamo.h:2619
QWORD qwComprom
Definição dinamo.h:2621
QWORD qwLast_change
Definição dinamo.h:2623
QWORD qwC_occur
Definição dinamo.h:2620
QWORD qwProtect_s
Definição dinamo.h:2618
QWORD qwMask
Definição dinamo.h:2625
QWORD qwInit
Definição dinamo.h:2615
QWORD qwActiv
Definição dinamo.h:2616
QWORD qwProc_s
Definição dinamo.h:2617
BYTE bState
Definição dinamo.h:2626
QWORD qwArchive
Definição dinamo.h:2622
Definição dinamo.h:2861
Definição dinamo.h:2493
ND_uint64_t redirect_time
Definição dinamo.h:2500
ND_uint64_t upload_size
Definição dinamo.h:2507
ND_uint64_t upload_speed
Definição dinamo.h:2504
ND_uint64_t starttransfer_time
Definição dinamo.h:2498
ND_uint64_t content_length_upload
Definição dinamo.h:2502
ND_uint64_t connect_time
Definição dinamo.h:2495
ND_uint64_t request_size
Definição dinamo.h:2511
ND_uint64_t pretransfer_time
Definição dinamo.h:2497
ND_uint64_t num_connects
Definição dinamo.h:2510
ND_uint64_t download_size
Definição dinamo.h:2506
ND_uint64_t http_response_code
Definição dinamo.h:2513
ND_uint64_t redirect_count
Definição dinamo.h:2509
ND_uint64_t name_lookup_time
Definição dinamo.h:2494
ND_uint64_t received_header_size
Definição dinamo.h:2512
ND_uint64_t appconnect_time
Definição dinamo.h:2496
ND_uint64_t download_speed
Definição dinamo.h:2505
ND_uint64_t total_time
Definição dinamo.h:2499
ND_uint64_t content_length_download
Definição dinamo.h:2503
Definição dinamo.h:3264
BYTE Trusted
Definição dinamo.h:3278
BYTE Local
Definição dinamo.h:3280
BYTE WrapWithTrusted
Definição dinamo.h:3279
DWORD JavaMidpSecDomain
Definição dinamo.h:3283
DWORD CertificateCategory
Definição dinamo.h:3282
DWORD KeyGenMechanism
Definição dinamo.h:3284
DWORD Class
Definição dinamo.h:3268
Definição dinamo.h:3338
BYTE bMaxInvalidLogins
Definição dinamo.h:3340
BYTE bLower
Definição dinamo.h:3347
BYTE bHistory
Definição dinamo.h:3342
BYTE bUpper
Definição dinamo.h:3346
BYTE bMinLength
Definição dinamo.h:3344
BYTE bExpiration
Definição dinamo.h:3341
BYTE bMinSpecial
Definição dinamo.h:3345
Definição dinamo.h:3042
DWORD dwPeer
Definição dinamo.h:3044
BYTE bOP
Definição dinamo.h:3043
Definição dinamo.h:2416
DBLOB dbPubExponent
Definição dinamo.h:2418
DBLOB dbModulus
Definição dinamo.h:2417
Definição dinamo.h:3647
WORD wAuthType
Definição dinamo.h:3648
BYTE bSecLevel
Definição dinamo.h:3649
Definição dinamo.h:3661
BYTE bSecLevel
Definição dinamo.h:3662
Definição dinamo.h:3670
Definição dinamo.h:2292
int nPort
Definição dinamo.h:2293
Definição dinamo.h:2312
DWORD dwVersion
Definição dinamo.h:2313
DBLOB dbPublicKey
Definição dinamo.h:2327
Definição dinamo.h:2855
Definição dinamo.h:2229
BYTE bFrom
Definição dinamo.h:2248
BYTE bCKS
Definição dinamo.h:2237
BYTE bFlags
Definição dinamo.h:2230
BYTE bType
Definição dinamo.h:2247
BYTE bTo
Definição dinamo.h:2254
Definição dinamo.h:3026
SYS_NTP_INFO stNTPInfo
Definição dinamo.h:3034
int nFilledCount
Definição dinamo.h:3027
SYS_HW_STR_INFO stHardwareInfo
Definição dinamo.h:3033
SYS_REPL_INFO stReplicationInfo
Definição dinamo.h:3031
DWORD dwFIPSReturnCode
Definição dinamo.h:3036
SYS_STATUS_INFO stStatusInfo
Definição dinamo.h:3028
DWORD dwFIPSMode
Definição dinamo.h:3029
SYS_DISK_INFO stDiskInfo
Definição dinamo.h:3030
QWORD qwCurrentDateTime
Definição dinamo.h:3032
SYS_PENDING_INFO stPendingInfo
Definição dinamo.h:3037
SYS_COUNTER_INFO stCounterInfo
Definição dinamo.h:3035
Definição dinamo.h:2953
QWORD qwUsers
Definição dinamo.h:2954
QWORD qwSLBeFileSize
Definição dinamo.h:2956
QWORD qwVMSize
Definição dinamo.h:2958
QWORD qwTasks
Definição dinamo.h:2957
QWORD qwObjects
Definição dinamo.h:2955
Definição dinamo.h:2927
DWORD dwBlockSize
Definição dinamo.h:2928
DWORD dwFreeBlocks
Definição dinamo.h:2930
DWORD dwTotalBlocks
Definição dinamo.h:2929
Definição dinamo.h:2921
DWORD dwBatteryOK
Definição dinamo.h:2923
DWORD dwUptime
Definição dinamo.h:2922
Definição dinamo.h:2978
Definição dinamo.h:2905
DWORD dwSysNetInfoCount
Definição dinamo.h:2907
SYS_NET_INFO * pstSysNetInfo
Definição dinamo.h:2906
Definição dinamo.h:2894
DWORD dwSpeed
Definição dinamo.h:2900
BYTE bUp
Definição dinamo.h:2899
Definição dinamo.h:2995
BYTE bENABLED
Definição dinamo.h:2996
Definição dinamo.h:2985
DWORD dwKeyLen
Definição dinamo.h:2989
WORD wKeyIndex
Definição dinamo.h:2988
Definição dinamo.h:2970
BYTE bPendingBackup
Definição dinamo.h:2971
Definição dinamo.h:3003
DWORD dwDiscoveryPulse
Definição dinamo.h:3017
QWORD qwSpVal
Definição dinamo.h:3012
DWORD dwManagerPulse
Definição dinamo.h:3015
DWORD dwRecoveryPulse
Definição dinamo.h:3016
QWORD qwEventType
Definição dinamo.h:3008
DWORD dwBoundEth
Definição dinamo.h:3005
WORD wSpvv
Definição dinamo.h:3013
QWORD qwGuid
Definição dinamo.h:3006
QWORD qwDateTime
Definição dinamo.h:3007
DWORD dwDiscoveryReset
Definição dinamo.h:3014
DWORD dwState
Definição dinamo.h:3009
Definição dinamo.h:2938
DWORD dwMemTotal
Definição dinamo.h:2942
DWORD dwMemUsed
Definição dinamo.h:2943
DWORD dwCPU
Definição dinamo.h:2940
DWORD dwUnit
Definição dinamo.h:2941
DWORD dwSwapTotal
Definição dinamo.h:2944
DWORD dwSwapUsed
Definição dinamo.h:2945
DWORD dwSessions
Definição dinamo.h:2939
Definição dinamo.h:2460
Definição dinamo.h:3177
DBLOB dbHSMCert
Definição dinamo.h:3181
DBLOB dbPrivateKeyCert
Definição dinamo.h:3180
char * szPrivateKeyPwd
Definição dinamo.h:3179
DBLOB dbPrivateKey
Definição dinamo.h:3178
Definição dinamo.h:3080
DWORD dwAttempts
Definição dinamo.h:3083
int nBlocked
Definição dinamo.h:3082
Definição dinamo.h:2446
DBLOB dbCert
Definição dinamo.h:2453
BYTE bOP
Definição dinamo.h:2448
Definição dinamo.h:3188
DWORD dwAuthMask
Definição dinamo.h:3191
char szPassword[MAX_USR_PWD+1]
Definição dinamo.h:3190
char szUserId[MAX_USR_LEN+1]
Definição dinamo.h:3189
Definição dinamo.h:3219
DWORD dwACL
Definição dinamo.h:3229
DWORD dwState
Definição dinamo.h:3221