API C/C++
HSM Dinamo
Carregando...
Procurando...
Nenhuma entrada encontrado
dinamo.h
Ir para a documentação desse arquivo.
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#define WRAPPED_KEY_KMIP (19)
1384#define PUBLICKEY_BLOB_KMIP (20)
1385
1386
1387
1388/* Pkcs11 Blobs */
1389#define P11_BLOB (1)
1390
1391/* Pkcs11 Update Flags */
1392
1393#define UPDATE_P11_target ( 1 << 0 )
1394#define UPDATE_P11_associate ( 1 << 1 )
1395#define UPDATE_P11_Class ( 1 << 2 )
1396#define UPDATE_P11_App ( 1 << 3 )
1397#define UPDATE_P11_Id ( 1 << 4 )
1398#define UPDATE_P11_Label ( 1 << 5 )
1399#define UPDATE_P11_Trusted ( 1 << 6 )
1400#define UPDATE_P11_WrapWithTrusted ( 1 << 7 )
1401#define UPDATE_P11_Local ( 1 << 8 )
1402#define UPDATE_P11_CertificateCategory ( 1 << 9 )
1403#define UPDATE_P11_JavaMidpSecDomain ( 1 << 10 )
1404#define UPDATE_P11_KeyGenMechanism ( 1 << 11 )
1405
1406/* Key types */
1407
1408/* DGenerateKey DImportKey and related */
1409/* Flags */
1410#define EXPORTABLE_KEY (0x00000001) // Mark the key as exportable.
1411#define NO_CRYPTO (0x00000002) // The key will not be encrypted inside the HSM. Deprecated in newer versions.
1412#define TEMPORARY_KEY (0x00000004) // Mark key as temporary. Key will exist while the session exists. (default in ImportKey).
1413#define PERMANENT_KEY (0x00000008) // The key will be persistent in the HSM. (default in GenerateKey and ImportKeyPart).
1414#define RSA_PUB_EXP3 (0x00000800) // Use exponent 0x03 when generating a RSA key pair
1415#define MOD_SPB_RELATED (0x00001000) // Mark as mod_SPB related object
1416#define TSP_KEY (0x00002000) // TSP keys: don't replicate, export, backup, etc;
1417#define BCHAIN_KEY (0x00004000) // BChain keys: PBKs are handled specially, etc;
1418#define HSM_LOCAL_GEN (0x00008000) // set on HSM generated keys;
1419
1420// Attribute Usage-profile
1421#define AUP_DIG_SIG (0x01000000) // signature generation/verification
1422#define AUP_DATA_CRYPTO (0x02000000) // data encryption/decryption
1423#define AUP_KeK (0x03000000) // key wrapping/unwrapping
1424#define AUP_MAC (0x04000000) // MAC generation/verification
1425#define AUP_KDF (0x05000000) // key derivation function
1426#define AUP_CRYPTOGRAM (0x06000000) // cryptogram generation/verification
1427#define AUP_KEY_TRANSLATE (0x07000000) // key translation
1428#define AUP_EFT_CVK (0x08000000) // CVV generation/verification
1429#define AUP_EFT_VISA_PVK (0x09000000) // PVV generation
1430#define AUP_EFT_IBM_3624 (0x0a000000) // PIN generation/validation
1431#define AUP_EFT_PEK (0x0b000000) // PIN encryption/decryption
1432#define AUP_EFT_BDK (0x0c000000) // DUKPT
1433#define AUP_EFT_IPEK (0x0d000000) // DUKPT IPEK
1434#define AUP_EMV_IMK (0x0e000000) // ICC MK, IDN derivation
1435#define AUP_EMV_IMKDAC (0x0f000000) // ICC DAC derivation
1436#define AUP_EMV_IMKENC (0x10000000) // ICC data encryption - PinBlock
1437#define AUP_EMV_IMKMAC (0x11000000) // ICC data cryptogram - EmvMac
1438#define AUP_EMV_KeK (0x12000000) // ICC MK wrapping
1439#define AUP_EMV_IMKKDF (0x13000000) // EMV key derivation
1440#define AUP_EMV_IMKACRYPTO (0x14000000) // ARPC calculation
1441#define AUP_EFT_KeK (0x15000000) // EFT key wrapping/unwrapping
1442#define AUP_EMV_DIG_SIG (0x16000000) // EMV signature generation/verification
1443#define AUP_EFT_TR31_KBPK (0x17000000) // TR31 key-block protection key
1444#define AUP_EFT_TR34_PK (0x18000000) // TR34 sign/envelope
1445#define AUP_SPB_PK (0x19000000) // Brazilian National banking system sig gen/verify and key-wrapping key
1446
1447#define AUP_RESERVED_MASK (0xFF000000) // Mask of reserved Usage profile bits.
1448
1449/* DRemoveKey */
1450#define REMOVE_FROM_HSM (0x00000020) // Erase a key from the HSM and destroys it's handle.
1451#define REMOVE_FROM_HCM (REMOVE_FROM_HSM) // DEPRECATED. use REMOVE_FROM_HSM
1452
1453/* SetKeyParam/GetKeyParam */
1454
1455#define DKP_ALGID (1) /* Key algorithm ID. pbData == nAlgId */
1456#define DKP_IV (2) /* Initialization Vector. pbData == pbIV */
1457#define DKP_PADDING (3) /* Padding format. pbData == dwPadding */
1458#define DKP_MODE (4) /* Operation mode. pbData == dwOpMode */
1459#define DKP_OWNER (5) /* Key owner. pbData == szUserId (separated by ";" ) */
1460#define DKP_USER (6) /* Key user. pbData == szUserId (separated by ";" )*/
1461#define DKP_READ_LOCK (7) /* Key read lock status. pbData == NULL */
1462#define DKP_ENCRYPTED (8) /* Encrypted object. */
1463#define DKP_KEYLEN (9) /* Key size (bytes). */
1464#define DKP_TEMPORARY_KEY (10) /* Temporary key. pbData == dwTempKey */
1465#define DKP_MAP_VALUE (11) /* Values of a MAP object.pbData == MAP_2_OBJ_INFO*/
1466#define DKP_BLOCKED (12) /* Block object. pbData == nBlocked (TRUE|FALSE)*/
1467#define DKP_CERT_X509_INFO (13) /* Returns information of a x.509 certificate. pbData == CERT_X509_INFO */
1468#define DKP_SESSION (14) /* Session associated to the key handle. pbData == HSESSIONCTX */
1469#define DKP_KEY_ID (15) /* Key name associated to the key handle. pbData == szKeyId */
1470#define DKP_PUB_KEY_EXP (16) /* Public exponent for the key. pbData == DBLOB */
1471#define DKP_SP80057_INFO (17) /* Object's SP80057 info. pbData == OBJ_SP80057_INFO */
1472#define DKP_KEY_INFO (18) /* Key info. pbData == GET_USR_KEY_OFFLINE */
1473#define DKP_BLOCK_SIZE (19) /* Key block size (bytes). */
1474#define DKP_OBJ_ATTRIBUTES (20) /* Object attributes. pbData == DWORD */
1475#define DKP_OBJ_STATS (21) /* Object statistics. pbData == DN_OBJ_STATS */
1476
1477//Flags
1478#define REMOVE_ATTRIBUTE (0x00000040)
1479
1480/* SetHashParam/GetHashParam */
1481
1482#define DHP_ALGID (1) /* Hash algorithm. */
1483#define DHP_HASH_VALUE (2) /* Hash value. */
1484#define DHP_HASH_SIZE (4) /* Hash size (bytes). */
1485#define DHP_RESET (5) /* Reset hash state. */
1486
1487/* HashSessionKey */
1488
1489#define DHS_LITTLE_ENDIAN (1)
1490
1491/* DSetObjParam */
1492#define OP_OBJ_BLOCKED (1) /* User blocked */
1493#define OP_OBJ_UNBLOCKED (2) /* Used unblocked */
1494
1495/* LogParam */
1496
1497#define LP_LOG_PATH (0x00000001) /* Log file full path. */
1498#define LP_LOG_LEVEL (0x00000002) /* Log level. */
1499
1500#define LOG_ERROR_LEVEL (0)
1501#define LOG_DEBUG_LEVEL (3)
1502
1503#define LOG_DISABLED_LEVEL (1000)
1504
1505/*
1506 DGetHSMLogInit
1507 Remote log start and offset options
1508*/
1509
1510#define GET_LOG_START_FULL (0x00000000) //Deprecated - Use RLOG_GET_LOG_START_FULL instead.
1511#define GET_LOG_END_FULL (0x00000000) //Deprecated - Use RLOG_GET_LOG_END_FULL instead.
1512
1513#define RLOG_GET_LOG_START_FULL (0x00000000)
1514#define RLOG_GET_LOG_END_FULL (0x00000000)
1515
1516#define RLOG_GET_ZLOG_START_FULL (RLOG_GET_LOG_START_FULL)
1517#define RLOG_GET_ZLOG_END_FULL (0xFFFFFFFF)
1518
1519// Set both to get full compressed OEM log (pkzip format).
1520#define RLOG_GET_OEM_ZLOG_START_FULL (RLOG_GET_LOG_START_FULL)
1521#define RLOG_GET_OEM_ZLOG_END_FULL (RLOG_GET_ZLOG_END_FULL -1)
1522
1523
1524/* Permissions */
1525
1526#define ACL_NOP (0x00000000) // "may the Force be with ya'!"
1527#define ACL_OBJ_DEL (ACL_NOP + 1) // delete objects
1528#define ACL_OBJ_READ (ACL_OBJ_DEL << 1) // read obj content
1529#define ACL_OBJ_LIST (ACL_OBJ_READ) // list usr objs
1530#define ACL_OBJ_CREATE (ACL_OBJ_DEL << 2) // create obj
1531#define ACL_OBJ_UPDATE (ACL_OBJ_DEL << 3) // update obj (hdr and alike)
1532#define ACL_OBJ_WRITE (ACL_OBJ_UPDATE) // update obj
1533#define ACL_USR_CREATE (ACL_OBJ_DEL << 4) // create usr
1534#define ACL_USR_DELETE (ACL_USR_CREATE) // makes no sense only to create
1535#define ACL_USR_REMOTE_INFO (ACL_OBJ_DEL << 5) // can usr use remote log/info?
1536#define ACL_USR_LIST (ACL_OBJ_DEL << 6) // can usr get user-list?
1537#define ACL_SYS_OPERATOR (ACL_OBJ_DEL << 7) // operate as master (adm mode)
1538#define ACL_SYS_BACKUP (ACL_OBJ_DEL << 8) // extract full appliance backup
1539#define ACL_SYS_RESTORE (ACL_SYS_BACKUP) // restore full appliance backup
1540#define ACL_SYS_UDATE_HSM (ACL_OBJ_DEL << 9) // firmware and stuff like that
1541#define ACL_NS_AUTHORIZATION (ACL_OBJ_DEL << 10) // user must be authorized with "m of n"
1542#define ACL_LOCAL_CRYPTO (ACL_OBJ_DEL << 11) // user keys crypto ops must be done locally
1543#define ACL_VIRTUAL_X509_AUTH (ACL_OBJ_DEL << 28) // presence means SA (user must use 2F PKI)
1544#define ACL_VIRTUAL_OTP_AUTH (ACL_OBJ_DEL << 29) // presence means SA (user must use 2-F OTP)
1545#define ACL_CHANGE_PWD_NEXT_TIME (ACL_OBJ_DEL << 30) // can force usrs to change pwd on next login
1546
1547// Deprecated use ACL_USR_REMOTE_INFO
1548#define ACL_USR_REMOTE_LOG ACL_USR_REMOTE_INFO
1549
1550#define ACL_DEFAULT_OWNER (ACL_OBJ_DEL | ACL_OBJ_READ | ACL_OBJ_CREATE | \
1551 ACL_OBJ_UPDATE)
1552
1553#define ACL_SYS_PERMISSIONS (ACL_USR_CREATE | ACL_USR_REMOTE_INFO | ACL_USR_LIST | \
1554 ACL_SYS_OPERATOR | ACL_SYS_BACKUP | \
1555 ACL_SYS_UDATE_HSM)
1556
1557#define ACL_CREATION_TIME_ONLY (ACL_NS_AUTHORIZATION | ACL_LOCAL_CRYPTO)
1558
1559// DNSAuthSetState
1560
1561//
1562// NSAuth specific ACLs; NSAuth always grants ACL_OBJ_READ by default;
1563//
1564#define NSAUTH_ACL_NOP (ACL_NOP)
1565#define NSAUTH_ACL_OBJ_OPEN (ACL_OBJ_READ)
1566#define NSAUTH_ACL_OBJ_EXPORT (ACL_OBJ_CREATE)
1567#define NSAUTH_ACL_OBJ_DEL (ACL_OBJ_DEL)
1568#define NSAUTH_ACL_OBJ_BLOCK (ACL_OBJ_UPDATE)
1569#define NSAUTH_ACL_NS_DEL (ACL_USR_DELETE)
1570
1571/* DGenerateCVV/DVerifyCVV */
1572
1573#define MIN_CVV_LEN (3 + 1)
1574#define MAX_PAN_LEN (24 + 1)
1575#define MAX_EXP_DATE_LEN (4 + 1)
1576#define MAX_SVC_LEN (3 + 1)
1577
1578/* DEFTExportTR31 */
1579
1580// A.5.1, Table 6, inverted (little-endian);
1581#define EFT_ME_TR31_EXP_USAGE_AUTO (0x0000)
1582#define EFT_ME_TR31_EXP_USAGE_B0 (0x3042)
1583#define EFT_ME_TR31_EXP_USAGE_B1 (0x3142)
1584#define EFT_ME_TR31_EXP_USAGE_B2 (0x3242)
1585#define EFT_ME_TR31_EXP_USAGE_C0 (0x3043)
1586#define EFT_ME_TR31_EXP_USAGE_D0 (0x3044)
1587#define EFT_ME_TR31_EXP_USAGE_D1 (0x3144)
1588#define EFT_ME_TR31_EXP_USAGE_D2 (0x3244)
1589#define EFT_ME_TR31_EXP_USAGE_E0 (0x3045)
1590#define EFT_ME_TR31_EXP_USAGE_E1 (0x3145)
1591#define EFT_ME_TR31_EXP_USAGE_E2 (0x3245)
1592#define EFT_ME_TR31_EXP_USAGE_E3 (0x3345)
1593#define EFT_ME_TR31_EXP_USAGE_E4 (0x3445)
1594#define EFT_ME_TR31_EXP_USAGE_E5 (0x3545)
1595#define EFT_ME_TR31_EXP_USAGE_E6 (0x3645)
1596#define EFT_ME_TR31_EXP_USAGE_I0 (0x3049)
1597#define EFT_ME_TR31_EXP_USAGE_K0 (0x304B)
1598#define EFT_ME_TR31_EXP_USAGE_K1 (0x314B)
1599#define EFT_ME_TR31_EXP_USAGE_K2 (0x324B)
1600#define EFT_ME_TR31_EXP_USAGE_K3 (0x334B)
1601#define EFT_ME_TR31_EXP_USAGE_M0 (0x304D)
1602#define EFT_ME_TR31_EXP_USAGE_M1 (0x314D)
1603#define EFT_ME_TR31_EXP_USAGE_M2 (0x324D)
1604#define EFT_ME_TR31_EXP_USAGE_M3 (0x334D)
1605#define EFT_ME_TR31_EXP_USAGE_M4 (0x344D)
1606#define EFT_ME_TR31_EXP_USAGE_M5 (0x354D)
1607#define EFT_ME_TR31_EXP_USAGE_M6 (0x364D)
1608#define EFT_ME_TR31_EXP_USAGE_M7 (0x374D)
1609#define EFT_ME_TR31_EXP_USAGE_M8 (0x384D)
1610#define EFT_ME_TR31_EXP_USAGE_P0 (0x3050)
1611#define EFT_ME_TR31_EXP_USAGE_S0 (0x3053)
1612#define EFT_ME_TR31_EXP_USAGE_S1 (0x3153)
1613#define EFT_ME_TR31_EXP_USAGE_S2 (0x3253)
1614#define EFT_ME_TR31_EXP_USAGE_V0 (0x3056)
1615#define EFT_ME_TR31_EXP_USAGE_V1 (0x3156)
1616#define EFT_ME_TR31_EXP_USAGE_V2 (0x3256)
1617#define EFT_ME_TR31_EXP_USAGE_V3 (0x3356)
1618#define EFT_ME_TR31_EXP_USAGE_V4 (0x3456)
1619
1620// A.5.3, Table 8
1621#define EFT_ME_TR31_EXP_MODE_AUTO (0x00)
1622#define EFT_ME_TR31_EXP_MODE_B (0x42)
1623#define EFT_ME_TR31_EXP_MODE_C (0x43)
1624#define EFT_ME_TR31_EXP_MODE_D (0x44)
1625#define EFT_ME_TR31_EXP_MODE_E (0x45)
1626#define EFT_ME_TR31_EXP_MODE_G (0x47)
1627#define EFT_ME_TR31_EXP_MODE_N (0x4E)
1628#define EFT_ME_TR31_EXP_MODE_S (0x53)
1629#define EFT_ME_TR31_EXP_MODE_T (0x55)
1630#define EFT_ME_TR31_EXP_MODE_V (0x56)
1631#define EFT_ME_TR31_EXP_MODE_X (0x58)
1632#define EFT_ME_TR31_EXP_MODE_Y (0x59)
1633
1634// A.5.5, Table 10
1635#define EFT_ME_TR31_EXP_AUTO (0x00)
1636#define EFT_ME_TR31_EXP_X9_24 (0x45) // ANSI X9.24 approved kek form
1637#define EFT_ME_TR31_EXP_NON_EXPORTABLE (0x4E)
1638#define EFT_ME_TR31_EXP_KEK_EXPORTABLE (0x53)
1639
1640/* DGeneratePVV */
1641
1642#define EFT_MIN_PVKI (0x00)
1643#define EFT_MAX_PVKI (0x06)
1644#define EFT_PVV_LEN (4)
1645
1646/* DGeneratePIN */
1647
1648#define GP_DEFAULT_PIN (1)
1649#define GP_USER_DEF_PIN (2)
1650#define GP_RANDOM_PIN (3)
1651
1652/* DEFTExportKey/DEFTKeKImport */
1653
1654#define EK_EFT_KEK_EXPORT_RAW (1) // BLOB() == envelope + checksum[3];
1655#define EK_EFT_KEK_EXPORT_VISA1 (2) // Variant-1 ZCMK, BLOB() == envelope + checksum[3];
1656#define EK_EFT_KEK_EXPORT_LMK (3) // BLOB() == 3DES_CBC(SVMK, Key)
1657#define EK_EFT_KEK_EXPORT_JCB (4) // BLOB() == envelope + checksum[8];
1658
1659/* DPINBlockTranslate */
1660
1661// translate types
1662#define TP_TRANSLATE_TYPE_AUTO (0xFF)
1663#define TP_TRANSLATE_TYPE_IBM_3624 (0x36)
1664#define TP_TRANSLATE_TYPE_ISO_0 (1) // == VISA 1; HSM default
1665#define TP_TRANSLATE_TYPE_ISO_1 (2)
1666#define TP_TRANSLATE_TYPE_ISO_3 (3)
1667
1668/* Other constants */
1669
1670#define MAX_USR_PWD (16)
1671#define MAX_USR_LEN (16)
1672#define MAX_CN_LEN (256)
1673#define MAX_PATH_LEN (256)
1674#define MAX_MODULE_NAME_LEN (128)
1675#define MAX_MODULE_VERSION_LEN (32)
1676#define MAX_ADDR_LEN (128)
1677#define MAX_CHANNEL_CIPHER_NAME_LEN (128)
1678#define MIN_PIN_LEN (8)
1679#define MIN_BACKUP_OBJ_PIN_LEN (8)
1680#define MAX_BACKUP_OBJ_PIN_LEN (32)
1681#define MIN_BACKUP_PIN_LEN (8)
1682#define MAX_BACKUP_PIN_LEN (32)
1683#define MAX_OBJ_NAME_LEN (32)
1684#define MAX_PIN_LEN (6)
1685#define MAX_MODULE_NAME_VERSION_LEN (1024)
1686#define MAX_IP_LEN (15)
1687#define MAX_NET_NAME (16)
1688#define MAX_HOTP_PIN (4)
1689#define MAX_HOTP_IMEI (24)
1690#define MAX_HOTP_APP_NAME (13)
1691#define MAX_HOTP_LOGO_LEN (1632)
1692#define MAX_P11_OBJ_ID (128)
1693#define MAX_OBJ_ID_BIN_LEN (32 + 1)
1694#ifndef MAX_OBJ_ID
1695#define MAX_OBJ_ID MAX_OBJ_ID_BIN_LEN
1696#endif
1697#ifndef MAX_OBJ_ID_LEN
1698#define MAX_OBJ_ID_LEN (MAX_USR_LEN + 1 + MAX_OBJ_ID)
1699#endif
1700#ifndef MAX_OBJ_ID_FQN_LEN
1701#define MAX_OBJ_ID_FQN_LEN (MAX_OBJ_ID_LEN)
1702#endif
1703#define MAX_P11_DATE_TXT (8)
1704#define MIN_EFT_PIN_LEN (4)
1705#define MAX_EFT_PIN_LEN (12)
1706#define MIN_KSI_LEN (5)
1707#define MIN_CTR_LEN (5)
1708#define MAX_HSM_DOMAIN_NAME (32)
1709#define MAX_HSM_MODEL_NAME (32)
1710#define MAX_HSM_ID_NAME (32)
1711
1712
1713/* MOD EFT*/
1714
1715#define EFT_AES_KEY_CHECKSUM_LEN (3)
1716#define EFT_VISA_KEY_CHECKSUM_LEN (3)
1717#define EFT_JCB_KEY_CHECKSUM_LEN (8)
1718#define EFT_EXP_DATE_LEN (4)
1719
1720#define EFT_EMV_SDA_SEQ_LEN (2)
1721#define EFT_EMV_SDA_DAC_LEN (2)
1722#define EFT_EMV_ARC_LEN (2)
1723#define EFT_EMV_CSU_LEN (4)
1724#define EFT_EMV_PAD_LEN (8)
1725
1726#define EFT_EMV_IDN_LEN (2)
1727#define EFT_EMV_IDN_ATC_LEN (2)
1728#define EFT_EMV_IDN_UN_LEN (4)
1729
1730#define EFT_EMV_CSR_VISA_TRACK_NUM_LEN (3)
1731#define EFT_EMV_CSR_VISA_SERVICE_ID_LEN (4)
1732#define EFT_EMV_CSR_VISA_ISSUER_ID_LEN (4)
1733#define EFT_EMV_CSR_VISA_PUB_KEY_INDEX_LEN (3)
1734
1735#define EFT_EMV_CSR_VISA_HASH_SIZE (20)
1736#define EFT_EMV_CSR_MASTER_HASH_SIZE (28)
1737
1738
1739
1740/* DGenerateICCMK */
1741
1742#define EFT_EMV_GEN_ICC_MK_OP_CBC_EXP (0x01)
1743#define EFT_EMV_GEN_ICC_MK_OP_ECB_EXP (0x02)
1744
1745/* DMAC_ISO9797_1_Met2*/
1746
1747#define EMV_MAC_TYPE_ALG1 (1)
1748#define EMV_MAC_TYPE_ALG3 (2)
1749
1750/* DGenerateEMV_MAC/DGenerateEMV_HMAC/DCalculateARPC */
1751
1752#define EMV_OP_ISO_9797_1_M2_COMMON (0x01)
1753#define EMV_OP_ISO_9797_1_M2_MCHIP (0x02)
1754#define EMV_OP_ISO_9797_1_M2_VISA (0x03)
1755#define EMV_OP_ISO_9797_1_M2_VISA_CRYPTOGRAM (0x04)
1756#define EMV_OP_ISO_9797_1_M2_VISA_ICC_V1_4_PAN_AUTO (0x05)
1757#define EMV_OP_ISO_9797_1_M2_RAW (0x06)
1758#define EMV_OP_ISO_9797_1_M1_VISA_CRYPTOGRAM_PADD_V10 (0x7F)
1759#define EMV_OP_ISO_9797_1_M2_ELO (0x07)
1760#define EMV_OP_ISO_9797_1_M2_JCB (0x08)
1761#define EMV_OP_ISO_9797_1_M1_JCB (0x09)
1762#define EMV_OP_ISO_9797_1_M1_JCB_CRYPTOGRAM (0x0A)
1763
1764/* DGenerateDDA_ICCCert */
1765
1766#define EFT_EMV_DDA_OP_RSA_SIGN1 (0x01) // rsa + sha1
1767
1768/* DGenerateEMV_CSR */
1769
1770#define EFT_EMV_OP_CSR_VISA (0x01)
1771#define EFT_EMV_OP_CSR_MASTER (0x02)
1772#define EFT_EMV_OP_CSR_ELO (0x03)
1773#define EFT_EMV_OP_CSR_JCB (0x04)
1774
1775
1776/* DGenerateISO9796Cert2 */
1777
1778#define CORE_P_ISO_9796_USER_ID_LEN (32)
1779#define CORE_P_ISO_9796_USER_NAME_LEN (32)
1780#define CORE_P_ISO_9796_KEY_LEN (512) // 128
1781#define CORE_P_ISO_9796_MIN_KEY_LEN (64)
1782#define CORE_P_ISO_9796_EXPONENT_LEN (8)
1783#define CORE_P_ISO_9796_MIN_EXPONENT_LEN (1)
1784
1785
1786/* DGenerateEMV_PinBlock */
1787
1788#define PBC_EMV_PIN_BLOCK_OP_COMMON (EMV_OP_ISO_9797_1_M2_COMMON)
1789#define PBC_EMV_PIN_BLOCK_OP_MCHIP (EMV_OP_ISO_9797_1_M2_MCHIP)
1790#define PBC_EMV_PIN_BLOCK_OP_VISA (EMV_OP_ISO_9797_1_M2_VISA)
1791#define PBC_EMV_PIN_BLOCK_OP_VISA_CRYPTOGRAM (EMV_OP_ISO_9797_1_M2_VISA_CRYPTOGRAM)
1792#define PBC_EMV_PIN_BLOCK_OP_ELO (EMV_OP_ISO_9797_1_M2_ELO)
1793#define PBC_EMV_PIN_BLOCK_OP_JCB (EMV_OP_ISO_9797_1_M2_JCB)
1794
1795#define PBC_EMV_PIN_BLOCK_MAX_OUTPUT (64)
1796
1797
1798/* DDeriveKeyFromBuffer */
1799
1800#define EMV_DERIVE_KEY_OP_XOR (0x01)
1801#define EMV_DERIVE_KEY_OP_ECB (0x02)
1802
1803
1804/* DGeneratePKCS10CSR */
1805
1806#define CORE_P10_CSR_VERSION1 (0x00)
1807#define CORE_P10_CSR_DN_MAX_LEN (2048)
1808
1809#define P10_CSR_DER (1)
1810#define P10_CSR_PEM (2)
1811
1812#define CORE_P10_HASH_SHA1 (0x01)
1813#define CORE_P10_HASH_SHA224 (0x02)
1814#define CORE_P10_HASH_SHA256 (0x03)
1815#define CORE_P10_HASH_SHA384 (0x04)
1816#define CORE_P10_HASH_SHA512 (0x05)
1817#define CORE_P10_HASH_SHA2_224 CORE_P10_HASH_SHA224
1818#define CORE_P10_HASH_SHA2_256 CORE_P10_HASH_SHA256
1819#define CORE_P10_HASH_SHA2_384 CORE_P10_HASH_SHA384
1820#define CORE_P10_HASH_SHA2_512 CORE_P10_HASH_SHA512
1821#define CORE_P10_HASH_SHA3_224 (0x06)
1822#define CORE_P10_HASH_SHA3_256 (0x07)
1823#define CORE_P10_HASH_SHA3_384 (0x08)
1824#define CORE_P10_HASH_SHA3_512 (0x09)
1825
1826/* DPKCS8ExportKey */
1827
1828// ASCII
1829#define CORE_P8_EXPORT_PWD_LEN (16)
1830#define ND_MIN_P8_PWD_LEN (8)
1831#define ND_MAX_P8_PWD_LEN (CORE_P8_EXPORT_PWD_LEN)
1832
1833/* DImportPKCS12Buffer */
1834
1835#define DN_MAX_P12_PWD_LEN (CORE_P8_EXPORT_PWD_LEN)
1836
1837/* DExportPKCS12 */
1838
1839#define DN_EXPORT_P12_LEGACY (1)
1840
1841/* SPB */
1842
1843#define DN_SPB_MSG_HEADER_V2_LEN (588)
1844#define ND_SPB_MSG_HEADER_V2_LEN DN_SPB_MSG_HEADER_V2_LEN
1845#define DN_SPB_MSG_HEADER_V3_LEN ND_SPB_MSG_HEADER_V2_LEN
1846#define DN_SPB_MAX_NOTIFY_DATA_SEG (32 * 1024)
1847#define ND_SPB_MAX_NOTIFY_DATA_SEG DN_SPB_MAX_NOTIFY_DATA_SEG
1848#define DN_SPB_V3_TAG_LEN (16)
1849#define DN_SPB_MAX_RCV_NOTIFY_DATA_SEG (ND_SPB_MAX_NOTIFY_DATA_SEG + DN_SPB_V3_TAG_LEN)
1850
1851//dwFlags
1852#define ND_SPB_USE_CIP1 (0x80000000)
1853#define ND_SPB_USE_ANY (0x40000000)
1854#define ND_SPB_RAW (0x20000000)
1855
1856/* DSPBEncode */
1857
1858//dwFlags
1859#define ND_SPB_ENCODE_GEN_01 (0x01)
1860#define ND_SPB_ENCODE_HEADER_V3 (0x02)
1861
1862/* DSPBDecode */
1863
1864//dwFlags
1865#define ND_SPB_OUT_NO_PADDING (0x01)
1866#define ND_SPB_OUT_WITH_PADDING (0x02)
1867
1868#define ND_SPB_ISPB_LEN (8)
1869#define ND_SPB_CA_LEN (2)
1870#define ND_SPB_DOMAIN_MAX_LEN (5)
1871#define ND_SPB_SN_MAX_LEN (32)
1872#define ND_SPB_ID_MAX_LEN (ND_SPB_SN_MAX_LEN + 1 + ND_SPB_CA_LEN + 1)
1873#define ND_SPB_ID_MAX_FQN_LEN (MAX_USR_LEN + 1 + ND_SPB_SN_MAX_LEN + 1 + ND_SPB_CA_LEN + 1)
1874#define ND_SPB_MAX_SUBJECT (1024)
1875#define ND_SPB_MAX_ISSUER (1024)
1876#define ND_SPB_MAX_ALG_ID (256)
1877
1878
1879//strong auth
1880#define SA_TP_MAX_DES_LEN (16 + 1)
1881#define SA_TP_MAX_OFFSET_LEN (6 + 1)
1882#define SA_TP_MAX_SERIAL_LEN (10 + 1)
1883#define SA_TP_MAX_MKEY_LEN (32 + 1)
1884#define SA_TP_MAX_OTP_LEN (6 + 1)
1885
1886#define SA_HOTP_CHAP_LEN (10)
1887
1888/* Module OATH */
1889
1890/* DOATHIssueHOTPBlob */
1891#define ISSUE_OATH_MIN_OTP_LEN (6)
1892#define ISSUE_OATH_MAX_OTP_LEN (16)
1893#define ISSUE_OATH_MAX_OTP_RETRY (129)
1894
1895//bSeedLen
1896#define ISSUE_OATH_SHA1_LEN (20)
1897#define ISSUE_OATH_SHA256_LEN (32)
1898#define ISSUE_OATH_SHA512_LEN (64)
1899
1900//bTruncationOffset
1901#define ISSUE_OATH_DYN_TRUNC (OATH_SA_v1_HOTP_DYN_TRUNC_OFF)
1902
1903//wTimeStep
1904#define ISSUE_OATH_DEFAULT_TIME_STEP (OATH_SA_v2_default_TIME_STEP)
1905#define ISSUE_OATH_HOTP_TS (0)
1906
1907//otT0
1908#define ISSUE_OATH_HOTP_T0 (OATH_SA_v2_default_T0_Epoch)
1909
1910//otMovingFactor
1911#define ISSUE_OATH_INIT_MF (0)
1912
1913#define ISSUE_OATH_OUTPUT_BLOB_V1_LEN (160)
1914#define ISSUE_OATH_OUTPUT_BLOB_V2_LEN (180)
1915#define ISSUE_OATH_OUTPUT_BLOB_LEN (ISSUE_OATH_OUTPUT_BLOB_V1_LEN)
1916#define ISSUE_OATH_OUTPUT_MAX_BLOB_LEN (ISSUE_OATH_OUTPUT_BLOB_V2_LEN)
1917
1918#define OATH_MAX_PSK_LEN (255)
1919
1920#define ISSUE_OATH_GENERATE_HOTP (1)
1921#define ISSUE_OATH_GENERATE_TOTP (2)
1922#define ISSUE_OATH_IMPORT_HOTP (3)
1923#define ISSUE_OATH_IMPORT_TOTP (4)
1924
1925
1926#define OATH_UPDATE_BLOB (0x80000000)
1927
1928#define ISSUE_OATH_BLOB_V2_IV_LEN (AES_BLOCK)
1929#define ISSUE_OATH_BLOB_V2_TAG_LEN (AES_BLOCK)
1930
1931/* DOATHCheckOTP */
1932
1933#define MAX_OTP_LOOK_AHEAD_INTERVAL (255)
1934
1935
1936#define DEFAULT_PORT (4433)
1937
1938
1939/* DListObjsFilter */
1940
1941#define LST_NO_FILTER (1)
1942#define LST_FILTER (2)
1943
1944/* DSPBCalculateObjectId */
1945
1946#define SPB_GENERATE_KEY_NAME (1)
1947#define SPB_GENERATE_CER_NAME (2)
1948
1949
1950/* DIPFilterOperation */
1951
1952#define D_IPF_ENABLE (1)
1953#define D_IPF_DISABLE (2)
1954#define D_IPF_LIST (33)
1955#define D_IPF_ADD (44)
1956#define D_IPF_DEL (55)
1957
1958
1959/* DCert2CertInfo */
1960
1961#define P2C_SPB_CERT_INFO (1)
1962#define P2C_CERT_BASIC_INFO (2)
1963
1964//CERT_X509_BASIC_INFO
1965#define DN_MAX_SUBJECT (1024)
1966#define DN_MAX_ISSUER (1024)
1967#define DN_MAX_SN (1024)
1968#define DN_MAX_EMAIL (1024)
1969#define DN_MAX_ALG_ID (256)
1970
1971
1972/* DGenerateDUKPT */
1973
1974// flags/modes; duk, pek, and mek are mutually exclusive;
1975#define NEW_DUKPT_MODE_DUK (0x00000000)
1976#define NEW_DUKPT_MODE_EXP (1 << 31)
1977#define NEW_DUKPT_MODE_DE (1 << 30)
1978#define NEW_DUKPT_MODE_PEK (1 << 29)
1979#define NEW_DUKPT_MODE_MEK (1 << 28)
1980#define NEW_DUKPT_MODE_TMP (1 << 27)
1981#define NEW_DUKPT_MODE_IPEK (1 << 26)
1982
1983
1984/* DGetNetInfo */
1985
1986#define NET_INFO_MAX_SROUTE_COUNT (48)
1987#define NET_INFO_MAX_SROUTE_LEN (52)
1988#define NET_INFO_MAX_SNMP_T_COUNT (16)
1989#define NET_INFO_MAX_SNMP_SC_STR (255)
1990#define NET_INFO_MAX_SNMP_SL_STR (255)
1991#define NET_INFO_MAX_SNMP_C_STR (64)
1992
1993//Flags
1994#define NET_INFO_INFO_0 (0)
1995#define NET_INFO_INFO_1 (1)
1996
1997/* Bond mode - comes in bond gateway info. */
1998#define NET_INFO_BOND_HOT_STANDBY "hot standby"
1999#define NET_INFO_BOND_BALANCE "balance"
2000#define NET_INFO_BOND_AGGREGATION "aggregation"
2001
2002
2003
2004/* DCertEncodingConvert and DGetHSMTLSCert*/
2005
2006#define CERT_OUT_DER 1
2007#define CERT_OUT_PEM 2
2008
2009
2010
2011/* DGenEcdhKey - dwOP*/
2012
2013#define DN_GEN_KEY_KDF_RAW_SECRET (0x01)
2014#define DN_GEN_KEY_X9_63_SHA256 (0x02)
2015
2016
2017#define DN_ECDH_GEN_KEY_MAX_DATA (1024)
2018#define DN_GEN_ECDH_MAX_SHARED_LEN (128)
2019
2020/* DCreateHash */
2021
2022#define DN_HASH_OFFLINE (1)
2023
2024/* DFindHSM */
2025
2026//Service Type
2027#define DN_FIND_SRVC_TYPE_IP (1)
2028#define DN_FIND_SRVC_TYPE_AAP (2)
2029#define DN_FIND_SRVC_TYPE_ALL (3)
2030
2031//Filter
2032#define DN_FIND_FILTER_TYPE_POCKET (0x01)
2033#define DN_FIND_FILTER_TYPE_XP (0x02) //Not implemented
2034#define DN_FIND_FILTER_TYPE_ST (0x04) //Not implemented
2035#define DN_FIND_FILTER_TYPE_LEGACY (0x08) //Not implemented
2036#define DN_FIND_FILTER_TYPE_UNKNOWN (0x10) //Not implemented
2037#define DN_FIND_FILTER_TYPE_HSM (0x40000000)
2038#define DN_FIND_FILTER_TYPE_ALL (0x80000000)
2039
2040#define DN_SLP_POCKET_ID "$pocket"
2041#define DN_SLP_HSM_MODEL_POCKET "DMP"
2042#define DN_SLP_HSM_MODEL_XP "DXP"
2043#define DN_SLP_HSM_MODEL_ST "DST"
2044#define DN_SLP_HSM_MODEL_LEGACY "lhM"
2045#define DN_SLP_HSM_MODEL_UNKNOWN "DHSM"
2046
2047
2048/* DManageAToken */
2049
2050#define DN_USR_A_TOKEN_KLEN (16)
2051#define DN_RND_CHAP_LEN (16)
2052
2053#define DN_A_TOKEN_OP_ISSUE (1)
2054#define DN_A_TOKEN_OP_REVOKE (2)
2055#define DN_A_TOKEN_OP_LIST (3)
2056#define DN_A_TOKEN_OP_L_ISSUE (4)
2057#define DN_A_TOKEN_OP_L_REVOKE (5)
2058
2059#define DN_A_TOKEN_INFINITE (~0)
2060
2061
2062/* DBatchSign */
2063
2064#define DN_BATCH_SIGN_BLOCK_HEADER ((DWORD *2) + MAX_OBJ_ID_FQN_LEN)
2065
2066
2067/* DSetLBList and DGetLBList */
2068
2069#define DN_LB_LIST (1)
2070#define DN_MAX_LB_HSM_COUNT (16)
2071#define DN_MAX_LB_SETS (16)
2072
2073/* DGetUserKey */
2074
2075#define D_GET_USR_KEY_OFFLINE (1)
2076#define D_GET_USR_KEY_NO_PUB (2)
2077
2078/* DSVaultGenToken and DSVaultGetData */
2079
2080#define D_SVAULT_MIN_TL (6)
2081#define D_SVAULT_MAX_TL (256)
2082
2083#define D_SVAULT_T_TKR2 (1)
2084
2085#define D_SVAULT_F_MASK_TOKEN (1)
2086#define D_SVAULT_F_MASK_SECRET (2)
2087
2088#define D_SVAULT_CKS_NULL (0)
2089#define D_SVAULT_CKS_CPF (1)
2090#define D_SVAULT_CKS_CNPJ (2)
2091#define D_SVAULT_CKS_PAN (3)
2092#define D_SVAULT_CKS_IEL (4)
2093
2094#define D_SVAULT_BASE10 (10)
2095#define D_SVAULT_BASE16 (16)
2096#define D_SVAULT_BASE26 (26)
2097#define D_SVAULT_BASE52 (52)
2098#define D_SVAULT_BASE62 (62)
2099
2100#define D_SVAULT_TOKEN_BLOB_LEN (805)
2101
2102/* DSVaultGetData */
2103
2104#define D_SVAULT_GET_OP_SECRET (1)
2105#define D_SVAULT_GET_OP_TOKEN (2)
2106
2107/* DBchainCreateBip32Ckd */
2108
2109#define DN_BCHAIN_SECURE_BIP32_INDEX_BASE 0x80000000
2111/* DBchainGetAddress */
2112
2113#define DN_BCHAIN_MAX_ADDR_LEN (128)
2114#define DN_BCHAIN_MAX_HRP (64)
2116// Type
2117#define DN_BCHAIN_AT_BTC_P2PKH (1)
2118#define DN_BCHAIN_AT_BTC_P2SH (2)
2119#define DN_BCHAIN_AT_BTC_B32_PKH (3)
2120#define DN_BCHAIN_AT_BTC_B32_SH (4)
2121#define DN_BCHAIN_AT_ETH_EOA (5)
2122#define DN_BCHAIN_AT_ETH_EOA_MC_CKS (6)
2123#define DN_BCHAIN_AT_ETH_EOA_ICAP (7)
2124#define DN_BCHAIN_AT_ALGORAND (8)
2125#define DN_BCHAIN_AT_TRON_HEX (9)
2126#define DN_BCHAIN_AT_TRON_B58 (10)
2127#define DN_BCHAIN_AT_XRP (11)
2128#define DN_BCHAIN_AT_SOL (12)
2129// Version
2130#define DN_BCHAIN_VER_UNUSED (0x00)
2131#define DN_BCHAIN_VER_BTC_A1_MAIN_NET (0x00)
2132#define DN_BCHAIN_VER_XRP_CLASSIC (0x00)
2133#define DN_BCHAIN_VER_BTC_AMN_TEST_NET (0x6F)
2134#define DN_BCHAIN_VER_BTC_A3_MAIN_NET (0x05)
2135#define DN_BCHAIN_VER_BTC_B32_WITVER (0x00)
2136#define DN_BCHAIN_VER_HTR_MAINNET (0x28)
2137#define DN_BCHAIN_VER_HTR_TESTNET (0x49)
2138#define DN_BCHAIN_VER_HTR_P2SH_MAINNET (0x64)
2139#define DN_BCHAIN_VER_HTR_P2SH_TESTNET (0x87)
2140// HRP
2141#define DN_BCHAIN_HRP_UNUSED ""
2142#define DN_BCHAIN_HRP_BTC_MAIN_NET "bc"
2143#define DN_BCHAIN_HRP_BTC_TEST_NET "tb"
2145/* DBchainSignHash */
2146
2147#define DN_BCHAIN_MAX_SIG_LEN (128)
2149// Type
2150#define DN_BCHAIN_SIG_DER_ECDSA (1)
2151#define DN_BCHAIN_SIG_RAW_ECDSA (2)
2152#define DN_BCHAIN_SIG_BIP340 (3)
2153#define DN_BCHAIN_DER_RFC_6979_ECDSA (4)
2154#define DN_BCHAIN_RAW_RFC_6979_ECDSA (5)
2156#define DN_BCHAIN_SIG_RAW_ECDSA_R_LEN (32)
2157#define DN_BCHAIN_SIG_RAW_ECDSA_S_LEN (32)
2158#define DN_BCHAIN_SIG_RAW_ECDSA_V_LEN (1)
2160#define DN_BCHAIN_SIG_RAW_ECDSA_R_LEN (32)
2161#define DN_BCHAIN_SIG_RAW_ECDSA_S_LEN (32)
2162#define DN_BCHAIN_SIG_RAW_ECDSA_V_LEN (1)
2164// Hash mode
2165#define DN_BCHAIN_HASH_BTC_H160 (1)
2166#define DN_BCHAIN_HASH_RIPEMD160 (2)
2167#define DN_BCHAIN_HASH_SHA256 (3)
2168#define DN_BCHAIN_HASH_BTC_SHA256_2X (4)
2169#define DN_BCHAIN_HASH_KECCAK256 (5)
2171// Hash length
2172#define DN_BCHAIN_HASH_BTC_H160_LEN (20)
2173#define DN_BCHAIN_HASH_RIPEMD160_LEN (20)
2174#define DN_BCHAIN_HASH_SHA256_LEN (32)
2175#define DN_BCHAIN_HASH_BTC_SHA256_2X_LEN (32)
2176#define DN_BCHAIN_HASH_KECCAK256_LEN (32)
2178#define DN_BCHAIN_MAX_HASH_LEN (DN_BCHAIN_HASH_KECCAK256_LEN)
2180/* DBchainEdDsaSign and DBchainEdDsaVerify */
2181
2182#define DN_BCHAIN_EDDSA_MAX_CSTRL (255)
2183#define DN_BCHAIN_EDDSA_CSTR_UNUSED ""
2184#define DN_BCHAIN_EDDSA_MAX_DATA_LEN (4 * 1024 * 1024)
2186#define DN_BCHAIN_EDDSA_SIG_PURE (254)
2187#define DN_BCHAIN_EDDSA_SIG_ALGORAND (253)
2188#define DN_BCHAIN_EDDSA_SIG_XRP (252)
2189#define DN_BCHAIN_EDDSA_SIG_SOL (251)
2191/* DBchainPkImport and DBchainPkExport */
2192#define DN_BCHAIN_KEY_WIF (1)
2193#define DN_BCHAIN_KEY_MINI (2)
2194#define DN_BCHAIN_KEY_HEX (3)
2195#define DN_BCHAIN_KEY_SEC1 (4)
2196#define DN_BCHAIN_KEY_XPRIV (5)
2197#define DN_BCHAIN_KEY_ED25519_B64 (6)
2198#define DN_BCHAIN_KEY_ED25519_XPRIV (7)
2200// Version
2201#define DN_BCHAIN_VER_WIF_MAIN_NET (0x80)
2202#define DN_BCHAIN_VER_WIF_TEST_NET (0xEF)
2204/* DBchainGetPubKey and DBchainVerify */
2205#define DN_BCHAIN_PBK_SEC1_UNCOMP (1)
2206#define DN_BCHAIN_PBK_SEC1_COMP (2)
2207#define DN_BCHAIN_PBK_BIP340 (3)
2208#define DN_BCHAIN_PBK_ED25519 (4)
2209#define DN_BCHAIN_PBK_AT_ALGORAND (5)
2210#define DN_BCHAIN_PBK_BIP32_XPUB (6)
2211#define DN_BCHAIN_PBK_AT_SOL (7)
2213#define DN_BCHAIN_X_LEN (32)
2214#define DN_BCHAIN_Y_LEN (32)
2215#define DN_BCHAIN_MAX_PBK_LEN (128)
2217/* DBchainHashData */
2218
2219#define DN_BCHAIN_MAX_HDATA_LEN (2 * 1024 * 1024)
2221/*
2222 *
2223 * Unaligned structures
2224 *
2225 */
2226
2230typedef struct tag_SVAULT_GEN_TOKEN
2231{
2262 char szSecret[D_SVAULT_MAX_TL + 1];
2265
2270typedef struct tag_HSM_ADDR
2271{
2272 char szAddr[MAX_ADDR_LEN];
2273 int nPort;
2274 time_t tmNow;
2275 int nqtdcache; /* Amount of sessions in cache.*/
2276}HSM_ADDR;
2277
2282typedef struct tag_LOAD_BALANCE_LIST
2283{
2287
2293typedef struct tag_SLP_SRVR_INFO
2294{
2295 int nPort;
2296 char szIP[MAX_IP_LEN + 1];
2297 char szId[MAX_HSM_ID_NAME + 1];
2298 char szModel[MAX_HSM_MODEL_NAME + 1];
2300
2305typedef struct tag_DBLOB
2306{
2307 void *pvData;
2309} DBLOB;
2310
2311/* DCert2CertInfo */
2312
2313typedef struct tag_SPB_CERT_X509_INFO
2314{
2316
2317 char szAlgId[ND_SPB_MAX_ALG_ID];
2318
2319 char szISPB[ND_SPB_ISPB_LEN+1];
2320 char szCA[ND_SPB_CA_LEN+1];
2321 char szSN[ND_SPB_SN_MAX_LEN+1];
2322
2323 char szSubject[ND_SPB_MAX_SUBJECT];
2324 char szIssuer[ND_SPB_MAX_ISSUER];
2325
2326 struct tm tmNotBefore;
2327 struct tm tmNotAfter;
2328
2331
2332typedef struct tag_CERT_X509_BASIC_INFO
2333{
2335
2336 char szAlgId[DN_MAX_ALG_ID];
2337
2338 char szSubject[DN_MAX_SUBJECT];
2339 char szIssuer[DN_MAX_ISSUER];
2340 char szSN[DN_MAX_SN];
2341
2342 struct tm tmNotBefore;
2343 struct tm tmNotAfter;
2344
2347 char szEmail[DN_MAX_EMAIL];
2349
2350
2351typedef struct tag_IP_FILTER_INFO
2352{
2353 char szUser[MAX_USR_LEN + 1];
2354 char szIp[MAX_IP_LEN + 1];
2356
2357
2358/* DECPrivateKey2Info and DECPublicKey2Info */
2359
2360#define DN_EC_MAX_BIG_NUM (1024)
2361
2362//Field type definitions
2363#define DN_EC_KEY_FIELD_TYPE_NOT_DEFINED (0)
2364#define DN_EC_KEY_FIELD_TYPE_PRIME_FIELD (1)
2365#define DN_EC_KEY_FIELD_TYPE_BINARY_FIELD (2)
2366
2367//Out format options
2368#define DN_BN_2_ARRAY_OUT_BIN (1)
2369#define DN_BN_2_ARRAY_OUT_HEX (2)
2370#define DN_EC_KEY_PUB_X962_EC_POINT (3)
2371
2372//In format options
2373#define DN_EC_KEY_IN_FORMAT_DER (1)
2374
2375typedef struct tag_DN_EC_BIG_NUMBER
2376{
2380
2381typedef struct tag_DN_EC_POINT_INFO
2382{
2383 DN_EC_BIG_NUMBER bnX;//Point's x-coordinate
2384 DN_EC_BIG_NUMBER bnY;//Point's y-coordinate
2386
2387typedef struct tag_DN_EC_GROUP_INFO
2388{
2389 int nFieldType; //See definitions above
2390
2391 DN_EC_BIG_NUMBER bnP;//In Fp fields this is p for F2M fields it's m
2392
2393 DN_EC_BIG_NUMBER bnA;//Parameter a of the equation
2394 DN_EC_BIG_NUMBER bnB;//Parameter b of the equation
2395
2397
2398 DN_EC_BIG_NUMBER bnOrder;//Order n of the generator g
2399 DN_EC_POINT_INFO stGeneratorPoint;//Generator g / base point
2401
2402typedef struct tag_DN_EC_PUB_KEY_INFO
2403{
2407
2408typedef struct tag_DN_EC_PRIV_KEY_INFO
2409{
2413
2417typedef struct tag_RSA_PUB_KEY_PARTS
2418{
2422
2426typedef struct tag_DN_RSA_BIG_NUMBER
2427{
2431
2440
2441#define DN_USER_INFO_CERT_OP_ASSOCIATE (1)
2442#define DN_USER_INFO_CERT_OP_UNASSOCIATE (2)
2443
2447typedef struct tag_USER_INFO_CERT
2448{
2449 char szUserId[MAX_USR_LEN + 1];
2457
2461typedef struct tag_TLS_BUNDLE_INFO
2462{
2464 char szCERT[MAX_OBJ_ID_FQN_LEN];
2466
2476
2480typedef struct tag_GET_USR_KEY_OFFLINE
2481{
2482 char szKeyId[MAX_OBJ_ID_LEN];
2489
2517
2522typedef struct tag_DN_OBJ_COUNT
2523{
2526} DN_OBJ_COUNT;
2527
2532typedef struct tag_DN_USER_OBJ_COUNT
2533{
2534 char szUserId[MAX_OBJ_ID_FQN_LEN];
2538
2539#define DN_MAX_PRIVATE_KEY_ATTR_LEN (RSA_8192_LEN + 1)
2540
2560
2561
2562#define DN_SC_MAX_ATR_LEN (255)
2563#define DN_SC_MAX_CARD_FAMILY_LEN (128)
2564#define DN_SC_MAX_CARD_PRODUCT_NAME_LEN (128)
2565#define DN_SC_MAX_CARD_OS_VERSION_LEN (64)
2595
2596#ifdef _WIN32
2597 #pragma pack(push, 1) /* Align by 1 for portability issues.*/
2598#else
2599 #pragma pack(1)
2600#endif
2601
2602/* Aligned structures */
2603
2604typedef struct tag_OBJ_HDR_V1
2605{
2610} OBJ_HDR_V1;
2611
2612/*
2613 Estrutura contendo os atributos SP80057 de um objeto do HSM.
2614*/
2630
2631
2632/*
2633 Estados de objetos KMIP/SP.800-57.
2634*/
2635#define DN_SL_SP80057_STATE_UNKNOWN (0)
2636#define DN_SL_SP80057_STATE_PRE_ACTIVE (1)
2637#define DN_SL_SP80057_STATE_ACTIVE (2)
2638#define DN_SL_SP80057_STATE_DEACTIVATED (3)
2639#define DN_SL_SP80057_STATE_COMPROMISED (4)
2640#define DN_SL_SP80057_STATE_DESTROYED (5)
2641#define DN_SL_SP80057_STATE_DESTROYED_C (6)
2642
2643/*
2644 Máscara de uso de objetos SP.800-57.
2645*/
2646#define DN_SP80057_UM_SIGN (0x00000001)
2647#define DN_SP80057_UM_VERIFY (0x00000002)
2648#define DN_SP80057_UM_ENCRYPT (0x00000004)
2649#define DN_SP80057_UM_DECRYPT (0x00000008)
2650#define DN_SP80057_UM_WRAP_KEY (0x00000010)
2651#define DN_SP80057_UM_UNWRAP_KEY (0x00000020)
2652#define DN_SP80057_UM_EXPORT (0x00000040)
2653#define DN_SP80057_UM_MAC_GENERATE (0x00000080)
2654#define DN_SP80057_UM_MAC_VERIFY (0x00000100)
2655#define DN_SP80057_UM_DERIVE_KEY (0x00000200)
2656#define DN_SP80057_UM_CONTENT_COMMITMENT (0x00000400)
2657#define DN_SP80057_UM_KEY_AGREEMENT (0x00000800)
2658#define DN_SP80057_UM_CERTIFICATE_SIGN (0x00001000)
2659#define DN_SP80057_UM_CRL_SIGN (0x00002000)
2660#define DN_SP80057_UM_GENERATE_CRYPTOGRAM (0x00004000)
2661#define DN_SP80057_UM_VALIDATE_CRYPTOGRAM (0x00008000)
2662#define DN_SP80057_UM_TRANSLATE_ENCRYPT (0x00010000)
2663#define DN_SP80057_UM_TRANSLATE_DECRYPT (0x00020000)
2664#define DN_SP80057_UM_TRANSLATE_WRAP (0x00040000)
2665#define DN_SP80057_UM_TRANSLATE_UNWRAP (0x00080000)
2666
2667
2668/* DListObjsFilter */
2669
2670typedef struct tag_OBJ_LIST_FILTER
2671{
2675
2676#define OBJ_LIST_VERB_VERSION ( 1 << 0 )
2677#define OBJ_LIST_VERB_TYPE ( 1 << 1 )
2678#define OBJ_LIST_VERB_ATTRIB ( 1 << 2 )
2679#define OBJ_LIST_OBJS_OR ( 1 << 31 )
2680
2695
2730
2765
2796
2800typedef struct tag_ISSUE_OATH_BLOB_t_v1
2801{
2803 DWORD pad_cks_tag[3];
2805
2809typedef struct tag_ISSUE_OATH_BLOB_t_v2
2810{
2815
2819typedef struct tag_OATH_PSKC_TRANSLATE_OUTPUT
2820{
2822 char szKeyId[OATH_MAX_PSK_LEN+1];
2824
2841
2842typedef struct tag_MOD_OATH_SA_v2
2843{
2853} OATH_SA_v2;
2854
2855
2856typedef struct tag_STAT_CLUSTER_IP
2857{
2858 char szIp[MAX_IP_LEN + 1];
2860
2861
2862//GMT
2863typedef struct tag_P11_DATE{
2864 char year[4]; /* the year ("1900" - "9999") */
2865 char month[2]; /* the month ("01" - "12") */
2866 char day[2]; /* the day ("01" - "31") */
2867} P11_DATE;
2868
2880
2881typedef struct tag_HOTP_INFO_EX
2882{
2883 DWORD dwStructId; //Structure identifier -> SA_ST_ID_HOTP_INFO_EX
2884 char szObjId[MAX_OBJ_NAME_LEN + 1]; //HSM HOTP object name
2885 DWORD dwObjAttr; //HSM object attributes
2886 DWORD dwObjHotpFlags; //SoftToken type -> SA_ATTR_OATH_USE_IMEI, SA_ATTR_OATH_USE_TIME ...
2887 char szStPin[MAX_HOTP_PIN + 1]; //SoftToken PIN
2888 char szStIMEI[MAX_HOTP_IMEI + 1]; //SoftToken related device's serial number
2889 char szStAppName[MAX_HOTP_APP_NAME + 1]; //SoftToken application name
2890 DBLOB *pdbStLogoImage; //SoftToken logo image
2891}HOTP_INFO_EX; //DESCONTINUADO!
2892
2893
2894//DGetNetInfo
2895typedef struct tag_SYS_NET_INFO
2896{
2897 BYTE pbMac[6];
2898 char szIp[MAX_IP_LEN + 1];
2899 char szMask[MAX_IP_LEN + 1];
2900 char szDefGateway[MAX_IP_LEN + 1];
2903 char szName[MAX_NET_NAME + 1];
2904} SYS_NET_INFO;
2905
2906typedef struct tag_SYS_NET_INFO_1
2907{
2910
2912 char szCommunity[NET_INFO_MAX_SNMP_C_STR + 1];
2913 char szSysContact[NET_INFO_MAX_SNMP_SC_STR + 1];
2914 char szSyaLocation[NET_INFO_MAX_SNMP_SL_STR + 1];
2917
2922typedef struct tag_SYS_HEALTH
2923{
2926}SYS_HEALTH;
2927
2934
2949
2962
2963
2964#define DN_MAX_HSM_ALIAS (128)
2965#define DN_UPACK_MAX_DESCRIPTION (255 + 1)
2966
2971typedef struct tag_SYS_PENDING_INFO
2972{
2974 char szPendingUpackDescription[DN_UPACK_MAX_DESCRIPTION];
2975 char szHsmAlias[DN_MAX_HSM_ALIAS+1];
2977
2978
2979typedef struct tag_SYS_HW_STR_INFO
2980{
2981 char szSerialNumber[GET_INFO_MAX_SN_LEN + 1];
2982 char szHardwareString[GET_INFO_MAX_HW_STR_LEN + 1];
2983 char szTpKey[GET_INFO_MAX_TPKEY_LEN + 1];
2985
2986typedef struct tag_SYS_NTP_SVR_INFO
2987{
2988 char szAddr[MAX_IP_LEN + 1];
2989 char szNtpqInfo[GET_INFO_MAX_NTPQ_LEN + 1];
2992 char szKeyType[GET_INFO_MAX_NTP_KT_LEN + 1];
2993 char szKeyMat[GET_INFO_MAX_NTP_KM_LEN + 1];
2995
2996typedef struct tag_SYS_NTP_INFO
2997{
3001
3002
3003
3004typedef struct tag_SYS_REPL_INFO
3005{
3012 DWORD dwaPeers[GET_INFO_MAX_REPL_NODES + 1]; //Zero terminated IPv4 array. Last item == 0x00000000
3013 DWORD dwaPendingAcks[GET_INFO_MAX_REPL_NODES + 1]; //Zero terminated IPv4 array. Last item == 0x00000000
3020 DWORD dwaNodes[GET_INFO_MAX_REPL_NODES + 1]; //Zero terminated IPv4 array. Last item == 0x00000000
3022
3023
3041
3042
3043typedef struct tag_REPL_NODE_MSG
3044{
3045 BYTE bOP; //RNM_PROBE, RNM_DOWN...
3048
3049
3050typedef struct tag_HOTP_CHAP
3051{
3052 DWORD dwStructId; //Structure Id -> SA_ST_ID_HOTP_CHAP
3053 char szChallenge[SA_HOTP_CHAP_LEN + 1]; //Server created challenge
3054}HOTP_CHAP;//DEPRECATED!
3055
3056typedef struct tag_HOTP_SYNC
3057{
3058 DWORD dwStructId; //Structure Id -> SA_ST_ID_HOTP_SYNC
3059 char szObjId[MAX_OBJ_NAME_LEN + 1]; //HOTPToken to synchronize
3060 char szOTP1[SA_TP_MAX_OTP_LEN]; //Expected response from HOTPToken
3061 char szOTP2[SA_TP_MAX_OTP_LEN]; //Server Counter Response
3062}HOTP_SYNC;
3063
3064typedef struct tag_HIP_PARAM
3065{
3069}HIP_PARAM; //DEPRECATED!
3070
3071typedef struct tag_HIP_OUTPUT
3072{
3073 char szHipChallenge[1];
3075 BYTE pbImage[1];
3076}HIP_OUTPUT; //DEPRECATED!
3077
3081typedef struct tag_USER_BLOCK
3082{
3083 char szUserId[MAX_USR_LEN+1];
3086}USER_BLOCK;
3087
3091typedef struct tag_DN_A_TOKEN
3092{
3093 char pcUserName[MAX_USR_LEN];
3095}DN_A_TOKEN;
3096
3101typedef struct tag_DN_A_TOKEN_FULL
3102{
3106
3118
3137
3138/* HTTP session parameters */
3139
3140#define MAX_HTTP_ADDR_LEN (2048)
3141#define MAX_HTTP_API_TOKEN_LEN (128)
3142
3152
3157typedef struct tag_AUTH_ATOKEN
3158{
3159 char szAddr[MAX_ADDR_LEN];
3160 int nPort;
3163
3168typedef struct tag_AUTH_WIN_CREDENTIAL
3169{
3170 char szAddr[MAX_ADDR_LEN];
3171 int nPort;
3173
3185
3195
3196/*
3197 Estados de autorização de partição do usuário.
3198*/
3199
3200#define ND_PA_ACL_OBJ_OPEN (ACL_OBJ_READ)
3201#define ND_PA_ACL_OBJ_EXPORT (ACL_OBJ_CREATE)
3202#define ND_PA_ACL_OBJ_DEL (ACL_OBJ_DEL)
3203#define ND_PA_ACL_OBJ_BLOCK (ACL_OBJ_UPDATE)
3204#define ND_PA_ACL_NS_DEL (ACL_USR_DELETE)
3205
3206#define NSAUTH_ACL_FULL (~0)
3207
3208/*
3209 Estados de autorização de partição do usuário.
3210*/
3211#define ND_PA_STATE_Unknown (0)
3212#define ND_PA_STATE_Absent (1)
3213#define ND_PA_STATE_Null (2)
3214#define ND_PA_STATE_Associated (3)
3215#define ND_PA_STATE_Authorized (4)
3216
3220typedef struct tag_USER_PA_INFO
3221{
3222 char szUserId[MAX_USR_LEN + 1];
3241
3249
3250typedef struct tab_EXT_MAP_2_OBJ_INFO
3251{
3253 char szObjId1[MAX_OBJ_ID_FQN_LEN];
3255 char szObjId2[MAX_OBJ_ID_FQN_LEN];
3257
3258
3264
3265typedef struct tag_PKCS11_OBJ_MAP
3266{
3269
3270 DWORD Class; // CKO_DATA, etc;
3271
3275
3276 //The three BYTEs below are overloaded
3277 //must use the MACROs to set the desired parameters.
3278 //Macros defined below.
3279
3280 BYTE Trusted; // boolean/overloaded
3281 BYTE WrapWithTrusted; // boolean/overloaded
3282 BYTE Local; // boolean/overloaded
3283
3288
3289//Trusted -> CKA_TRUSTED, CKA_DERIVE, CKA_ENCRYPT,
3290//CKA_DECRYPT, CKA_WRAP, CKA_UNWRAP
3291#define PKCS11_SET_FLAG(x, p) ((x) |= (1 << (p)))
3292#define PKCS11_UNSET_FLAG(x, p) ((x) &= ~(1 << (p)))
3293#define PKCS11_GET_FLAG(x, p) ((x) & (1 << (p)))
3294
3295//Enable driven option. Disabled by default.
3296#define PKCS11_SET_OBJ_MAP_CKA_TRUSTED(x) PKCS11_SET_FLAG(x, 7)
3297#define PKCS11_UNSET_OBJ_MAP_CKA_TRUSTED(x) PKCS11_UNSET_FLAG(x, 7)
3298#define PKCS11_GET_OBJ_MAP_CKA_TRUSTED(x) PKCS11_GET_FLAG(x, 7)
3299
3300//Disable driven option. Enabled by default.
3301#define PKCS11_SET_OBJ_MAP_CKA_DERIVE(x) PKCS11_UNSET_FLAG(x, 6)
3302#define PKCS11_UNSET_OBJ_MAP_CKA_DERIVE(x) PKCS11_SET_FLAG(x, 6)
3303#define PKCS11_GET_OBJ_MAP_CKA_DERIVE(x) (!PKCS11_GET_FLAG(x, 6))
3304
3305#define PKCS11_SET_OBJ_MAP_CKA_ENCRYPT(x) PKCS11_UNSET_FLAG(x, 5)
3306#define PKCS11_UNSET_OBJ_MAP_CKA_ENCRYPT(x) PKCS11_SET_FLAG(x, 5)
3307#define PKCS11_GET_OBJ_MAP_CKA_ENCRYPT(x) (!PKCS11_GET_FLAG(x, 5))
3308
3309#define PKCS11_SET_OBJ_MAP_CKA_DECRYPT(x) PKCS11_UNSET_FLAG(x, 4)
3310#define PKCS11_UNSET_OBJ_MAP_CKA_DECRYPT(x) PKCS11_SET_FLAG(x, 4)
3311#define PKCS11_GET_OBJ_MAP_CKA_DECRYPT(x) (!PKCS11_GET_FLAG(x, 4))
3312
3313#define PKCS11_SET_OBJ_MAP_CKA_WRAP(x) PKCS11_UNSET_FLAG(x, 3)
3314#define PKCS11_UNSET_OBJ_MAP_CKA_WRAP(x) PKCS11_SET_FLAG(x, 3)
3315#define PKCS11_GET_OBJ_MAP_CKA_WRAP(x) (!PKCS11_GET_FLAG(x, 3))
3316
3317#define PKCS11_SET_OBJ_MAP_CKA_UNWRAP(x) PKCS11_UNSET_FLAG(x, 2)
3318#define PKCS11_UNSET_OBJ_MAP_CKA_UNWRAP(x) PKCS11_SET_FLAG(x, 2)
3319#define PKCS11_GET_OBJ_MAP_CKA_UNWRAP(x) (!PKCS11_GET_FLAG(x, 2))
3320
3321//WrapWithTrusted
3322
3323//Enable driven option. Disabled by default.
3324#define PKCS11_SET_OBJ_MAP_CKA_WRAP_WITH_TRUSTED(x) PKCS11_SET_FLAG(x, 7)
3325#define PKCS11_UNSET_OBJ_MAP_CKA_WRAP_WITH_TRUSTED(x) PKCS11_UNSET_FLAG(x, 7)
3326#define PKCS11_GET_OBJ_MAP_CKA_WRAP_WITH_TRUSTED(x) PKCS11_GET_FLAG(x, 7)
3327
3328//Local
3329//Enable driven option. Disabled by default.
3330#define PKCS11_SET_OBJ_MAP_CKA_LOCAL(x) PKCS11_SET_FLAG(x, 7)
3331#define PKCS11_UNSET_OBJ_MAP_CKA_LOCAL(x) PKCS11_UNSET_FLAG(x, 7)
3332#define PKCS11_GET_OBJ_MAP_CKA_LOCAL(x) PKCS11_GET_FLAG(x, 7)
3333
3334//DAdmOperation options - AO_SET_PWD_SEC_POLICY/AO_GET_PWD_SEC_POLICY
3335
3336#define PWD_SEC_POLICY_USE_MIN_PWD_LEN (8)
3337#define PWD_SEC_POLICY_USE_MAX_PWD_LEN (16)
3339typedef struct tag_PWD_SEC_POLICY
3340{
3341 //USE
3342 BYTE bMaxInvalidLogins; //Number of attempts. 0 == sets to HSM internal default.
3343 BYTE bExpiration; //Number of days. 0 == disable policy.
3344 BYTE bHistory; //Number of passwords to track. 0 == disable policy.
3345 //FORMAT
3346 BYTE bMinLength; //Minimal number of chars (ASCII).
3347 BYTE bMinSpecial; //Minimal number of non-alpha chars.
3348 BYTE bUpper; //Minimal number of upper-case chars.
3349 BYTE bLower; //Minimal number of lower-case chars.
3351
3355typedef struct tag_EFT_VISA_KEY_PARTS
3356{
3357 BYTE pbKeyPart1[3 * DES_BLOCK];
3358 BYTE pbKeyPart1Checksum[EFT_VISA_KEY_CHECKSUM_LEN];
3359 BYTE pbKeyPart2[3 * DES_BLOCK];
3360 BYTE pbKeyPart2Checksum[EFT_VISA_KEY_CHECKSUM_LEN];
3361 BYTE pbKeyPart3[3 * DES_BLOCK];
3362 BYTE pbKeyPart3Checksum[EFT_VISA_KEY_CHECKSUM_LEN];
3365
3369typedef struct tag_EFT_AES_KEY_PARTS
3370{
3371 BYTE pbKeyPart1[ALG_AES_256_LEN];
3372 BYTE pbKeyPart2[ALG_AES_256_LEN];
3373 BYTE pbKeyPart3[ALG_AES_256_LEN];
3376
3380typedef struct tag_EFT_AES_KEY_PARTS_DATA
3381{
3385
3389typedef struct tag_EFT_FULL_CKS_KEY_PARTS
3390{
3391 BYTE pbKeyPart1[3 * DES_BLOCK];
3392 BYTE pbKeyPart1Checksum[DES_BLOCK];
3393 BYTE pbKeyPart2[3 * DES_BLOCK];
3394 BYTE pbKeyPart2Checksum[DES_BLOCK];
3395 BYTE pbKeyPart3[3 * DES_BLOCK];
3396 BYTE pbKeyPart3Checksum[DES_BLOCK];
3397 BYTE pbMKCheckSum[DES_BLOCK];
3399
3404typedef struct tag_DN_CALC_ARPC_EMV_METHOD_1
3405{
3406 char szIssuerMK[MAX_OBJ_ID_BIN_LEN];
3407 char szPAN[MAX_PAN_LEN];
3409 BYTE pbARQC[DES_BLOCK];
3411 BYTE pbNONCE[DES_BLOCK];
3414
3415typedef struct tag_DN_CALC_ARPC_EMV_METHOD_2
3416{
3417 char szIssuerMK[MAX_OBJ_ID_BIN_LEN];
3418 char szPAN[MAX_PAN_LEN];
3420 BYTE pbNONCE[DES_BLOCK];
3423 BYTE pbARQC[DES_BLOCK];
3429
3430
3444
3450typedef struct tag_DS_BIND_INFO
3451{
3454 char szHSM[D_MAX_DS_BIND_B62_ID + 1];
3457 char szAccount[D_MAX_DS_BIND_B62_ID + 1];
3462 char szURL[D_MAX_DS_BIND_URL + 1];
3464} DS_BIND_INFO;
3465
3466#define DN_RCC_MAX_NODE_COUNT (16)
3467#define DN_RCC_MAX_REPL_MC_VER (256)
3468
3473typedef struct tag_CROSS_CHECK_NODE
3474{
3479 char szVersion[DN_RCC_MAX_REPL_MC_VER];
3481
3482/*
3483 Blockchain module
3484*/
3485
3486/* DBchainCreateXPrv */
3487
3488// Types
3489#define DN_BCHAIN_BTC_MINIKEY (1)
3490#define DN_BCHAIN_BIP32_SEED_XPRV (2)
3491#define DN_BCHAIN_BIP39_SEED_XPRV (3)
3492#define DN_BCHAIN_BIP32_XPRV (4)
3493#define DN_BCHAIN_BIP32_ED25519_XPRV (5)
3495// Version
3496#define DN_BCHAIN_VER_BIP32_MAINNET (DN_BCHAIN_VER_WIF_MAIN_NET)
3497#define DN_BCHAIN_VER_BIP32_TESTNET (DN_BCHAIN_VER_WIF_TEST_NET)
3498#define DN_BCHAIN_VER_BIP32_HTR_MAINNET (1)
3499#define DN_BCHAIN_VER_BIP32_HTR_TESTNET (2)
3501#define DN_BCHAIN_BIP32_SEED_LEN_MAX (765)
3505typedef struct tag_DN_BCHAIN_BIP32_SEED_XPRV_DATA
3506{
3511
3512#define DN_BCHAIN_BIP39_SEED_LEN_MAX (765)
3513#define DN_BCHAIN_BIP39_PWD_LEN_MAX (255)
3518typedef struct tag_DN_BCHAIN_BIP39_SEED_XPRV_DATA
3519{
3524
3525#define DN_BCHAIN_KEY_INFO_ST_SL (0)
3526#define DN_BCHAIN_KEY_INFO_ST_BLKC (1)
3528/* DBchainCreateBip32Ckd */
3529
3533typedef struct tag_DN_BCHAIN_KEY_INFO
3534{
3537 BYTE pbBip32Ver[4];
3539 BYTE pbParentFingerprint[4];
3540 BYTE pbChildNumber[4];
3542
3543/* DBchainVerify */
3544
3548typedef struct tag_DN_BCHAIN_PBK
3549{
3554
3555/*
3556 DMofNSplit
3557*/
3558
3559#define DN_M_OF_N_S_LEN (24)
3560#define DN_M_OF_N_ES_LEN (32)
3561#define DN_M_OF_N_S_MIN (2)
3562#define DN_M_OF_N_S_MAX (16)
3563#define DN_M_OF_N_PART_LEN (3 + DN_M_OF_N_S_LEN)
3568typedef struct tag_DN_M_OF_N_PART_DETAILS
3569{
3575
3579typedef struct tag_DN_M_OF_N_PART
3580{
3583
3587typedef struct tag_DN_M_OF_N_SPLIT_INFO
3588{
3594
3605
3609typedef struct tag_DN_OBJ_STATS
3610{
3613} DN_OBJ_STATS;
3614
3620#define DN_GLOBAL_OBJ_STATS_COUNT (39)
3622#define DN_GLOBAL_OBJ_STATS_INDEX_RSA (0)
3623#define DN_GLOBAL_OBJ_STATS_INDEX_DSA (1)
3624#define DN_GLOBAL_OBJ_STATS_INDEX_ECC (2)
3625#define DN_GLOBAL_OBJ_STATS_INDEX_ECX (3)
3626#define DN_GLOBAL_OBJ_STATS_INDEX_AES (4)
3627#define DN_GLOBAL_OBJ_STATS_INDEX_DES (5)
3628#define DN_GLOBAL_OBJ_STATS_INDEX_CSP (6)
3629#define DN_GLOBAL_OBJ_STATS_INDEX_BCHAIN (7)
3630#define DN_GLOBAL_OBJ_STATS_INDEX_X509 (8)
3631#define DN_GLOBAL_OBJ_STATS_INDEX_PKCS7 (9)
3637typedef struct tag_DN_GLOBAL_OBJ_STATS
3638{
3642
3643/* DSKeepProbeSecret */
3644
3648typedef struct tag_SKeepProbeInfo
3649{
3653
3654/* DSKeepSplitSecret e outros */
3655#define DN_SKEEP_M_OF_N_S_MIN (2)
3656#define DN_SKEEP_M_OF_N_S_MAX (16)
3657#define DN_SKEEP_M_OF_N_S_LEN (64)
3662typedef struct tag_SKeepRecoverInfo
3663{
3665 char szSecret[DN_SKEEP_M_OF_N_S_LEN + 1];
3667
3671typedef struct tag_SKeepShare
3672{
3673 char szShare[DN_SKEEP_M_OF_N_S_LEN + 1];
3674} SKeepShare;
3675
3676// DSCReadShadow
3677#define DN_SC_M_OF_N_SHADOW_MATERIAL_V1_LEN (24)
3678#define DN_SC_M_OF_N_SHADOW_MATERIAL_V2_LEN (56)
3679#define DN_SC_M_OF_N_SHADOW_EXTRA_DATA_LEN (3)
3681#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)
3682#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)
3684#define DN_SC_M_OF_N_SHADOW_MATERIAL_MAX_LEN (DN_SC_M_OF_N_SHADOW_MATERIAL_V2_LEN)
3685#define DN_SC_M_OF_N_SHADOW_MAX_LEN (DN_SC_M_OF_N_SHADOW_V2_MAX_LEN)
3687#define DN_SC_MAX_PIN_LEN (8)
3689#define DN_SC_M_OF_N_SHADOW_V1_TYPE (1)
3690#define DN_SC_M_OF_N_SHADOW_V2_TYPE (2)
3695typedef struct tag_DN_SC_M_OF_N_SHADOW_DETAILS
3696{
3702
3706typedef struct tag_DN_SC_M_OF_N_SHADOW
3707{
3711
3712#ifdef _WIN32
3713 #pragma pack(pop)
3714#else
3715 #pragma pack()
3716#endif
3717
3718/* Library exported functions */
3719
3720#ifdef __cplusplus
3721 extern "C" {
3722#endif /* __cplusplus */
3723
3729#define DN_INIT_PARAM_CONF_FAST_FAIL (128)
3741 DWORD dwReserved
3742);
3743
3760 void *pvList,
3761 DWORD dwListCount,
3762 DWORD dwReserved);
3763
3779 void *pvList,
3780 DWORD *pdwListCount,
3781 DWORD dwReserved);
3782
3819 HSESSIONCTX * phSession,
3820 DWORD dwParam,
3821 BYTE * pbData,
3822 DWORD dwDataLen,
3823 DWORD dwFlags
3824);
3825
3843 HSESSIONCTX hSession,
3844 DWORD dwParam,
3845 BYTE * pbData,
3846 DWORD dwDataLen,
3847 DWORD dwFlags
3848);
3849
3870 HSESSIONCTX hSession,
3871 DWORD dwParam,
3872 BYTE* pbData,
3873 DWORD* pdwDataLen,
3874 DWORD dwFlags
3875);
3876
3891 HSESSIONCTX * phSession,
3892 DWORD dwFlags
3893);
3894
3903
3919typedef int (AAP_API * funcListKeyCallback)(char *szKeyName, void *pParam, BOOL bFinal);
3920
3925 HSESSIONCTX hSession,
3926 funcListKeyCallback fncallback,
3927 void *pParam
3932);
3933
3938 HSESSIONCTX hSession,
3939 funcListKeyCallback fncallback,
3940 void *pParam
3945);
3946
3969 HSESSIONCTX hSession,
3970 char * szBackupFile,
3971 char * szPin,
3972 int nDirection
3973);
3974
4002 DWORD dwOP,
4003 char *szObjectId,
4004 char *szPin,
4005 BYTE *pbData,
4006 DWORD *pdwDataLen,
4007 DWORD dwReserved );
4008
4016typedef int (AAP_API * funcLogEventCallback)(char *szEvent, void *pParam, BOOL bFinal);
4017
4030 HSESSIONCTX hSession,
4031 funcLogEventCallback fncallback,
4032 void *pParam
4033);
4034
4076 HSESSIONCTX hSession,
4077 DWORD dwParam,
4078 BYTE * pbData,
4079 DWORD dwDataLen,
4080 DWORD dwFlags
4081);
4082
4099int AAP_API DGetHSMTLSCert(char *szAddress,
4100 int nPort,
4101 DWORD dwOutFormat,
4102 BYTE **ppbOutCert,
4103 DWORD *pdwOutCertLen,
4104 DWORD dwFlags);
4105
4106#define DN_NT_MAX_TARGET_LEN (255)
4107#define DN_NTOOL_PING (1)
4108#define DN_NTOOL_TRACERT (2)
4109#define DN_NTOOL_CROSS_CHECK (100)
4110
4129 DWORD dwOption,
4130 const char *szTarget,
4131 void **pvResult,
4132 DWORD *pdwResultLen,
4133 DWORD dwFlags);
4134
4135#define DN_WRITE_FILE_OPT_CERT_CHAIN (1)
4136#define DN_WRITE_FILE_OPT_NO_CONVERSION (2)
4137
4162 const char *szFileId,
4163 BYTE *pbFile,
4164 DWORD dwFileSize,
4165 DWORD dwOptions);
4166
4177typedef int (AAP_API * funcReadLocalFileCallback)(BYTE *pbData, DWORD * pdwDataLen, void *pParam, BOOL *pbFinal);
4178
4201 HSESSIONCTX hSession,
4202 char * szFileId,
4203 DWORD dwFileSize,
4204 funcReadLocalFileCallback fncallback,
4205 void *pParam
4206);
4207
4218typedef int (AAP_API * funcWriteLocalFileCallback)(BYTE *pbData, DWORD dwDataLen, void *pParam, BOOL bFinal);
4219
4233 HSESSIONCTX hSession,
4234 char * szFileId,
4235 funcWriteLocalFileCallback fncallback,
4236 void *pParam
4237);
4238
4253 const char *szFileId,
4254 BYTE **ppbData,
4255 DWORD *pdwDataLen,
4256 DWORD dwReserved);
4257
4267 HSESSIONCTX hSession,
4268 char *szObjId);
4269
4284 HSESSIONCTX hSession,
4285 DWORD dwStart,
4286 DWORD dwOffset,
4287 DWORD *pdwLogSize,
4288 BYTE **ppbLog
4289);
4290
4301 HSESSIONCTX hSession
4302);
4303
4328int AAP_API DFindHSM( DWORD dwServiceType,
4329 DWORD dwFilter,
4330 void **ppvOutputData,
4331 DWORD *pdwOutputDataLen,
4332 DWORD dwFlags );
4333
4342typedef int (AAP_API * funcListAKeysCallback)(void *pvToken, void *pParam, BOOL bFinal);
4343
4391 BYTE bOP,
4392 DN_A_TOKEN_FULL *pstATokenFull,
4393 funcListAKeysCallback fnCallBack,
4394 void *pvCallbackParam,
4395 DWORD dwParam);
4396
4397#define DN_ATOKEN_CACHE_GET_COUNT (0)
4398#define DN_ATOKEN_CACHE_GC (1)
4399
4426 DWORD dwOP,
4427 void *pOutData,
4428 DWORD dwParam);
4429
4439 const char *szBindKey,
4440 DWORD dwReserved);
4449 DWORD dwReserved);
4450
4459int AAP_API DSCReadShadow(const char *szPin, DN_SC_M_OF_N_SHADOW *pstShadow, DWORD dwReserved);
4460
4461
4469int AAP_API DSCGetInfo(DN_SC_INFO *pstInfo, DWORD dwReserved);
4470
4478
4488int AAP_API DSCChangePIN(const char *szCurrentPIN, const char *szNewPIN, DWORD dwReserved);
4489
4500int AAP_API DSCWriteShadow(DN_SC_M_OF_N_SHADOW *pstShadow, const char *szPIN,
4501 BOOL bOverwrite, DWORD dwReserved);
4502
4510int AAP_API DSCErase(const char *szPIN, DWORD dwReserved);
4511
4512#define DN_SC_MAX_LABEL_LEN (32)
4523int AAP_API DSCSetLabel(const char *pin, const char *label, DWORD reserved);
4524
4534int AAP_API DSCGetLabel(const char *pin, char *label, DWORD reserved);
4535
4536// DNSAuthSetState
4537#define DN_S_NSAUTH_ASSOC (1)
4538#define DN_S_NSAUTH_RESET (2)
4539#define DN_S_NSAUTH_AUTH (3)
4540#define DN_S_NSAUTH_eAUTH (4)
4541#define DN_S_NSAUTH_CHECK (5)
4571int AAP_API DNSAuthSetState(HSESSIONCTX hSession, DWORD dwAcl, BYTE bState,
4572 DN_SC_M_OF_N_SHADOW *pstShadows, DWORD dwShadowsCount,
4573 DWORD dwReserved);
4574
4575/* Error codes */
4576
4580int AAP_API DGetErrorString(int nErrorValue,
4581 char *szErrorCode,
4582 char *szErrorDesc);
4583
4587typedef enum tag_RetCodeMsgType
4588{
4590 DESC_MSG
4592
4606const char *AAP_API DGetReturnCodeString(int nErrorValue,
4607 RetCodeMsgType eErrorType);
4608
4612 BYTE bOP,
4613 char *szUser,
4614 char *szIP,
4615 int(AAP_API *ListIpFilterCallback)(void *pInData, DWORD dwInDataLen, void *pParam, BOOL bFinal),
4616 void *pParam,
4617 DWORD *pdwStatus,
4618 DWORD dwReserved);
4619
4621 char *szOldObjName,
4622 char *szNewObjName,
4623 DWORD dwFlags);
4624
4625int AAP_API DUPackPush(HSESSIONCTX hSession, DWORD dwPackSize,
4626 BYTE *pbPack);
4627
4628int AAP_API DUPackInfo(DWORD dwPackSize, BYTE *pbPack,
4629 DWORD *pdwUPackVersion, BYTE **ppbUPackDescr,
4630 BYTE **ppbUPackSignature);
4631
4632int AAP_API DGetObjInfo(const HSESSIONCTX hSession, const char *szObjId,
4633 const int nAlgId, const BYTE *pbData,
4634 DWORD *pdwDataLen);
4635
4636int AAP_API DGenerateMapObj(const HSESSIONCTX hSession, const char *szMapId,
4637 const char *szObj1Id, const int nObj1AlgId,
4638 const char *szObj2Id, const int nObj2AlgId);
4639
4640int AAP_API DRemoveMapObj(const HSESSIONCTX hSession, const char *szMapObjId);
4641
4643 int(AAP_API *ListUserSessionsCallback)(DWORD dwStartTime, char *szInfo, void *pParam, BOOL bFinal),
4644 void *pParam);
4645
4647 DWORD dwFilterType,
4648 void *pvFilter,
4649 int(AAP_API *ListObjCallback)(void *pvIN, void *pParam, BOOL bFinal),
4650 void *pParam);
4651
4653 int(AAP_API *ListLoadedModulesCallback)(char *szModuleInfo,
4654 void *pParam,
4655 BOOL bFinal),
4656 void *pParam);
4657
4688 HSESSIONCTX hSession,
4689 struct USER_INFO userInfo);
4690
4704 HSESSIONCTX hSession,
4705 char *szUserId);
4706
4730 HSESSIONCTX hSession,
4731 DWORD dwParam,
4732 BYTE *pbData,
4733 DWORD dwDataLen,
4734 DWORD dwFlags);
4735
4754 HSESSIONCTX hSession,
4755 DWORD dwParam,
4756 BYTE *pbData,
4757 DWORD *pdwDataLen,
4758 DWORD dwFlags);
4759
4769typedef int(AAP_API *funcListUsersCallback)(char *szUserName, void *pParam, BOOL bFinal);
4770
4781 HSESSIONCTX hSession,
4782 funcListUsersCallback fncallback,
4783 void *pParam);
4784
4785// OATH SA
4786
4807 const char *szUserId,
4808 const DWORD dwParam,
4809 BYTE *pbData,
4810 const DWORD dwDataLen);
4811
4825 const DWORD dwParam,
4826 const char *szUserId);
4827
4841 char *szUser,
4842 char *szOTP1,
4843 char *szOTP2,
4844 DWORD dwParam);
4845
4848/* PKCS#11 */
4849
4850int AAP_API DGeneratePkcs11Map(HSESSIONCTX hSession, char *szP11MapId,
4851 BYTE bTemporary, DWORD dwBlobType,
4852 DWORD dwFlags, BYTE *pbData,
4853 DWORD dwDataLen);
4854
4855int AAP_API DUpdatePkcs11Map(HSESSIONCTX hSession, char *szP11MapId,
4856 DWORD dwBlobType, DWORD dwFlags,
4857 DWORD dwUpdateMask, BYTE *pbData,
4858 DWORD dwDataLen);
4859
4860int AAP_API DGetPkcs11Map(HSESSIONCTX hSession, char *szP11MapId,
4861 DWORD dwBlobType, DWORD dwFlags,
4862 BYTE **ppbData, DWORD *pdwDataLen);
4863
4865 int(AAP_API *ListKeyCallback)(char *szKeyName,
4866 void *pParam,
4867 BOOL bFinal),
4868 void *pParam);
4869
4870
4871#define MNG_OBJ_META_A_KEY_TYPE (1)
4872#define MNG_OBJ_META_A_CLASS (2)
4873#define MNG_OBJ_META_A_EXTRACTABLE (3)
4874#define MNG_OBJ_META_A_SENSITIVE (4)
4875#define MNG_OBJ_META_A_N_EXTRACTABLE (5)
4876#define MNG_OBJ_META_A_LOCAL (6)
4877#define MNG_OBJ_META_A_CERT_TYPE (7)
4878#define MNG_OBJ_META_A_RSA_MODULUS (8)
4879#define MNG_OBJ_META_A_RSA_PUB_EXP (9)
4880#define MNG_OBJ_META_A_PUB_KEY_INFO (10)
4881#define MNG_OBJ_META_A_EC_PARAMS (11)
4882#define MNG_OBJ_META_A_SUBJECT (12)
4883#define MNG_OBJ_META_A_ISSUER (13)
4884#define MNG_OBJ_META_A_SN (14)
4885#define MNG_OBJ_META_A_TOKEN (15)
4886#define MNG_OBJ_META_A_MODIFIABLE (16)
4887#define MNG_OBJ_META_A_DERIVE (17)
4888#define MNG_OBJ_META_A_WRAP (18)
4889#define MNG_OBJ_META_A_UNWRAP (19)
4890#define MNG_OBJ_META_A_SIGN (20)
4891#define MNG_OBJ_META_A_VERIFY (21)
4892#define MNG_OBJ_META_A_ENCRYPT (22)
4893#define MNG_OBJ_META_A_DECRYPT (23)
4894#define MNG_OBJ_META_A_OBJ_ID (24)
4895#define MNG_OBJ_META_A_MODULUS_BITS (25)
4896#define MNG_OBJ_META_A_PRIVATE (26)
4897#define MNG_OBJ_META_A_LABEL (27)
4898#define MNG_OBJ_META_A_ID (28)
4899#define MNG_OBJ_META_A_APPLICATION (29)
4900#define MNG_OBJ_META_A_TRUSTED (30)
4901#define MNG_OBJ_META_A_JMIDP_SEC_DOMAIN (31)
4902#define MNG_OBJ_META_A_CERT_CATEGORY (32)
4903#define MNG_OBJ_META_A_KEY_GEN_MECHANISM (33)
4904#define MNG_OBJ_META_A_WRAP_WITH_TRUSTED (34)
4905#define MNG_OBJ_META_A_HSM_ASSOCIATE (35)
4906#define MNG_OBJ_META_A_SIGN_RECOVER (36)
4907#define MNG_OBJ_META_A_VERIFY_RECOVER (37)
4908
4909#define MNG_OBJ_META_A_HSM_OBJ_VERSION (502)
4910#define MNG_OBJ_META_A_HSM_OBJ_TYPE (503)
4911#define MNG_OBJ_META_A_HSM_OBJ_ATTR (504)
4912#define MNG_OBJ_META_A_HSM_OBJ_LEN (505)
4913#define MNG_OBJ_META_A_HSM_OBJ_ID (506)
4914#define MNG_OBJ_META_A_HSM_OBJ_PVALUE (507)
4915#define MNG_OBJ_META_A_HSM_OBJ_CNG_UTF8_ID (508) // Client side attribute
4916
4917#define MNG_OBJ_META_READ_ONLY_ATTR(a) ((MNG_OBJ_META_A_KEY_TYPE == (a)) || \
4918 (MNG_OBJ_META_A_CLASS == (a)) || \
4919 (MNG_OBJ_META_A_EXTRACTABLE == (a)) || \
4920 (MNG_OBJ_META_A_SENSITIVE == (a)) || \
4921 (MNG_OBJ_META_A_N_EXTRACTABLE == (a)) || \
4922 (MNG_OBJ_META_A_LOCAL == (a)) || \
4923 (MNG_OBJ_META_A_CERT_TYPE == (a)) || \
4924 (MNG_OBJ_META_A_RSA_MODULUS == (a)) || \
4925 (MNG_OBJ_META_A_RSA_PUB_EXP == (a)) || \
4926 (MNG_OBJ_META_A_PUB_KEY_INFO == (a)) || \
4927 (MNG_OBJ_META_A_EC_PARAMS == (a)) || \
4928 (MNG_OBJ_META_A_ISSUER == (a)) || \
4929 (MNG_OBJ_META_A_SN == (a)) || \
4930 (MNG_OBJ_META_A_TOKEN == (a)) || \
4931 (MNG_OBJ_META_A_MODIFIABLE == (a)) || \
4932 (MNG_OBJ_META_A_MODULUS_BITS == (a)) || \
4933 (MNG_OBJ_META_A_PRIVATE == (a)) || \
4934 (MNG_OBJ_META_A_HSM_OBJ_VERSION == (a)) || \
4935 (MNG_OBJ_META_A_HSM_OBJ_TYPE == (a)) || \
4936 (MNG_OBJ_META_A_HSM_OBJ_ATTR == (a)) || \
4937 (MNG_OBJ_META_A_HSM_OBJ_LEN == (a)) || \
4938 (MNG_OBJ_META_A_HSM_OBJ_ID == (a)) || \
4939 (MNG_OBJ_META_A_HSM_OBJ_PVALUE == (a)) || \
4940 (MNG_OBJ_META_A_DERIVE == (a)) || \
4941 (MNG_OBJ_META_A_WRAP == (a)) || \
4942 (MNG_OBJ_META_A_UNWRAP == (a)) || \
4943 (MNG_OBJ_META_A_SIGN == (a)) || \
4944 (MNG_OBJ_META_A_VERIFY == (a)) || \
4945 (MNG_OBJ_META_A_ENCRYPT == (a)) || \
4946 (MNG_OBJ_META_A_DECRYPT == (a)) || \
4947 (MNG_OBJ_META_A_SIGN_RECOVER == (a)) || \
4948 (MNG_OBJ_META_A_VERIFY_RECOVER == (a)))
4949
4950/* DManageObjMetadata */
4951
4952#define MNG_OBJ_META_GET (1)
4953#define MNG_OBJ_META_UPDATE (3)
4954#define MNG_OBJ_META_DEL (4)
4955
4956
4958 DWORD dwParam );
4959
4961 DWORD dwParam );
4962
4964 DWORD dwOption,
4965 void *pvOptionData,
4966 DWORD dwOptionDataLen,
4967 DWORD dwParam );
4968
4970 DWORD dwOption,
4971 DWORD dwParam );
4972
4974 DWORD dwOption,
4975 void *pvOptionData,
4976 DWORD *pdwOptionDataLen,
4977 DWORD dwParam );
4978
4980 char *szData,
4981 DWORD dwDataLen,
4982 DWORD dwParam);
4983
4985 char *szData,
4986 DWORD *pdwDataLen,
4987 DWORD dwParam);
4988
4990 BYTE bOP,
4991 char *szObjName,
4992 HOBJMETACTX hInMeta,
4993 HOBJMETACTX *phOutMeta,
4994 DWORD dwParam );
4995
4997 HOBJMETACTX hInMeta,
4998 HOBJMETASEARCHCTX *phMetaSearchCtx,
4999 DWORD dwParam );
5000
5002 HOBJMETACTX *phOutMeta,
5003 DWORD dwOutMetaMaxCount,
5004 DWORD *pdwOutMetaDataCount,
5005 DWORD dwParam );
5006
5008 DWORD dwParam );
5009
5010#define MNG_OBJ_META_TYPE_ULONG (1)
5011#define MNG_OBJ_META_TYPE_STR (2)
5012#define MNG_OBJ_META_TYPE_BOOL (3)
5013#define MNG_OBJ_META_TYPE_INT_BOOL (4)
5014
5015typedef struct tag_OBJ_MET_ATTR
5016{
5018 const char *pszString;
5021
5023 void *pvData,
5024 DWORD *pdwDataLen,
5025 DWORD dwReserved );
5026
5028
5029
5030#define DN_MAX_OBJ_JSON_STRING (15 * 1024)
5032#define DN_JSON_OUT_TYPE_PRETTY (0)
5033#define DN_JSON_OUT_TYPE_RAW (1)
5034#define DN_JSON_OUT_TYPE_COMPACT (2)
5053 const char *szId,
5054 DWORD dwOutType,
5055 char **pszOutJson,
5056 DWORD *pdwOutJsonLen);
5057
5070 const char *szId,
5071 const char *szJson,
5072 DWORD dwJsonLen,
5073 DWORD dwReserved);
5074/* P11 HSM Info */
5075
5077 HP11ATTRCTX *phOutMeta,
5078 DWORD dwParam );
5079
5080#define MNG_HSM_P11_INFO_SLOT_DESC (1)
5081#define MNG_HSM_P11_INFO_MANUFACTURER_ID (2)
5082#define MNG_HSM_P11_INFO_SLOT_FLAGS (3)
5083#define MNG_HSM_P11_INFO_HDW_VERSION (4)
5084#define MNG_HSM_P11_INFO_FMW_VERSION (5)
5085#define MNG_HSM_P11_INFO_LABEL (6)
5086#define MNG_HSM_P11_INFO_MODEL (7)
5087#define MNG_HSM_P11_INFO_SERIAL_NUMBER (8)
5088#define MNG_HSM_P11_INFO_TOKEN_FLAGS (9)
5089#define MNG_HSM_P11_INFO_UTC_TIME (10)
5090#define MNG_HSM_P11_INFO_MAX_SESSION_COUNT (11)
5091#define MNG_HSM_P11_INFO_SESSION_COUNT (12)
5092#define MNG_HSM_P11_INFO_MAX_RW_SESS_COUNT (13)
5093#define MNG_HSM_P11_INFO_RW_SESS_COUNT (14)
5094#define MNG_HSM_P11_INFO_MAX_PIN_LEN (15)
5095#define MNG_HSM_P11_INFO_MIN_PIN_LEN (16)
5096#define MNG_HSM_P11_INFO_TOTAL_PUB_MEMORY (17)
5097#define MNG_HSM_P11_INFO_FREE_PUB_MEMORY (18)
5098#define MNG_HSM_P11_INFO_TOTAL_PRIV_MEMORY (19)
5099#define MNG_HSM_P11_INFO_FREE_PRIV_MEMORY (20)
5100#define MNG_HSM_P11_INFO_SVMK_FINGERPRINT (21)
5101#define MNG_HSM_INFO_TAMPERED_HSM (22)
5102#define MNG_HSM_INFO_OP_MODE (23)
5103#define MNG_HSM_INFO_DS_BOUND (24)
5104#define MNG_HSM_INFO_DS_HSM (25)
5105#define MNG_HSM_INFO_DS_ACCOUNT (26)
5106#define MNG_HSM_INFO_DS_URL (27)
5107#define MNG_HSM_INFO_DNS1 (28)
5108#define MNG_HSM_INFO_DNS2 (29)
5109#define MNG_HSM_INFO_REMOOT (30)
5110
5112 DWORD dwOption,
5113 void *pvOptionData,
5114 DWORD *pdwOptionDataLen,
5115 DWORD dwParam );
5116
5118 DWORD dwParam );
5119
5121
5122
5123
5124/* Users */
5125
5126
5127int AAP_API DGetUserAcl ( HSESSIONCTX hSession, char *szUser,
5128 DWORD *pdwUserAcl );
5129
5130int AAP_API DListUserTrusts(HSESSIONCTX hSession, char *szUserId,
5131 BYTE bType,
5132 int (AAP_API * ListUserTrustCallback)(char *szUserName,
5133 DWORD dwACL,
5134 void *pParam,
5135 BOOL bFinal),
5136 void *pParam);
5137
5138
5139/* Statistics */
5140
5141int AAP_API DGetHsmInfo(HSESSIONCTX hSession, BOOL *pbFinal,
5142 DWORD dwParam, BYTE * pbData,
5143 DWORD* pdwDataLen, DWORD dwFlags);
5144
5145
5146/* Local operations */
5147
5149 BYTE * pbData, DWORD dwDataLen,
5150 DWORD dwFlags);
5151
5153 BYTE * pbData, DWORD *pdwDataLen,
5154 DWORD dwFlags);
5155
5156int AAP_API DGetLibVersion(HSESSIONCTX hSession, char * szVersion,
5157 DWORD *pdwVersionLen, DWORD dwFlags);
5158
5159
5160/* Key management */
5161
5162int AAP_API DECParam2AlgId(BYTE *pbECParam, DWORD dwECParamLen,
5163 int *pnAlgId, DWORD dwFlags);
5164
5165int AAP_API DECPubKeyDER2AlgId( BYTE *pbECPubKeyDER,
5166 DWORD dwECPubKeyDERLen,
5167 int *pnAlgId,
5168 DWORD dwFlags );
5169
5341 HSESSIONCTX hSession,
5342 char *szKeyId,
5343 int nAlgId,
5344 DWORD dwFlags,
5345 HKEYCTX * phKey
5346);
5347
5361 int nAlgId,
5362 BYTE *pbData,
5363 DWORD *pdwDataLen,
5364 DWORD dwReserved);
5365
5384 HSESSIONCTX hSession,
5385 char *szKeyId,
5386 DWORD dwFlags,
5387 HKEYCTX * phKey
5388);
5389
5390
5391
5392#define D_IMPORT_ALG_PRIV_KEY_RSA (0xFFFFFFE1) /* Importa uma chave privada RSA. */
5393#define D_IMPORT_ALG_PRIV_KEY_ECC (0xFFFFFFE0) /* Importa uma chave privada ECC(Curvas Elípticas com exceção de ECX). */
5394#define D_IMPORT_ALG_PRIV_KEY_P8 (0xFFFFFFDF) /* Importa uma chave no formato P8 */
5395#define D_IMPORT_ALG_PRIV_KEY_ECX (0xFFFFFFDE) /* Import uma chave privada ECX */
5396
5478 HSESSIONCTX hSession,
5479 char *szKeyId,
5480 HKEYCTX hKEKey,
5481 DWORD dwBlobType,
5482 int nAlgId,
5483 DWORD dwFlags,
5484 BYTE * pbData,
5485 DWORD dwDataLen,
5486 HKEYCTX * phKey
5487);
5488
5504 HKEYCTX hKey,
5505 HKEYCTX hKEKey,
5506 DWORD dwBlobType,
5507 DWORD dwFlags,
5508 BYTE * pbData,
5509 DWORD * pdwDataLen
5510);
5511
5545 HSESSIONCTX hSession,
5546 char *szKeyId,
5547 char *szSecret,
5548 DWORD dwKeyAlg,
5549 DWORD dwAttrib,
5550 BYTE *pbKeyEnvelope,
5551 DWORD dwKeyEnvelopeLen
5552);
5553
5567 HSESSIONCTX hSession,
5568 char *szKeyId,
5569 char *szSecret,
5570 BYTE **ppbKeyEnvelope,
5571 DWORD *pdwKeyEnvelopeLen
5572);
5573
5594 HKEYCTX hKey,
5595 DWORD dwParam,
5596 BYTE * pbData,
5597 DWORD dwDataLen,
5598 DWORD dwFlags
5599);
5600
5625 HKEYCTX hKey,
5626 DWORD dwParam,
5627 BYTE * pbData,
5628 DWORD *pdwDataLen,
5629 DWORD dwFlags
5630);
5631
5644 HHASHCTX hHash,
5645 char * szKeyId,
5646 int nAlgId,
5647 DWORD dwFlags,
5648 HKEYCTX * phKey
5649);
5650
5663 HKEYCTX hKey,
5664 DWORD dwFlags,
5665 HKEYCTX * phKey
5666);
5667
5680 HKEYCTX hKey,
5681 HHASHCTX hHash,
5682 DWORD dwFlags
5683);
5684
5697 HKEYCTX * phKey,
5698 DWORD dwFlags
5699);
5700
5738 char *szPrivateKeyName,
5739 BYTE bVersion,
5740 char *szDN,
5741 DWORD dwOutType,
5742 DWORD *pdwCSRLen,
5743 BYTE **ppbCSR,
5744 DWORD dwParam);
5745
5770 char *szPriKey,
5771 char *szPubKey,
5772 char *szCert,
5773 void *pvReserved,
5774 DWORD dwReserved);
5775
5798 const char *szPkcs12Pwd,
5799 const char *szKeyId,
5800 const char *szCertId,
5801 const char *szReserved,
5802 BYTE **ppbPkcs12,
5803 DWORD *pdwPkcs12Len,
5804 DWORD dwFlags);
5805
5824 BYTE *pbPkcs12,
5825 DWORD dwPkcs12Len,
5826 const char *szPkcs12Pwd,
5827 const char *szKeyId,
5828 DWORD dwKeyAttr,
5829 const char *szCertId,
5830 const char *szPubKeyId,
5831 DWORD dwFlags);
5832
5848 const char *szPkcs12File,
5849 const char *szPkcs12Pwd,
5850 const char *szKeyId,
5851 const DWORD dwKeyAttr,
5852 const char *szCertId);
5853
5854#define DN_FORM_DER (1)
5871int AAP_API DRSAPublicKey2Info(BYTE *pbKey, DWORD dwKeyLen, DWORD dwInForm,
5872 void *pvPubKeyInfo, DWORD dwReserved);
5873
5890int AAP_API DRSAPrivateKey2Info(const BYTE *pbRsa, DWORD dwRsaLen, DWORD dwInForm,
5891 DN_RSA_PRIVATE_KEY_INFO *stRsaInfo, DWORD dwReserved);
5892
5894typedef struct tag_DN_EXPORT_BYOK_AZURE{
5895 char *szKeKKid;
5899
5900#define DN_BYOK_TYPE_AZURE (1)
5901#define DN_BYOK_TYPE_AWS (2)
5921int AAP_API DByokExport(HSESSIONCTX hSession, const char *cszKeyId,
5922 const char *cszKekId, DWORD dwType,
5923 const void *pvData, BYTE **ppbOutData,
5924 DWORD *pdwOutDataLen, DWORD dwReserved);
5925
5949 DWORD dwOp,
5950 BYTE *pbInData,
5951 BYTE *pbTokenBlob,
5952 DWORD *pdwTokenBlobLen,
5953 char *szToken,
5954 DWORD dwReserved);
5955
6001 DWORD dwOp,
6002 const char *szMK,
6003 const char *szMask,
6004 BYTE *pbTokenBlob,
6005 DWORD dwTokenBlobLen,
6006 char *szData,
6007 DWORD *pdwDataLen,
6008 DWORD dwReserved);
6009
6012int AAP_API DRemoveKey(HSESSIONCTX hSession, char *szKeyId);
6013
6015 DWORD dwCertLen,
6016 DWORD dwOutType,
6017 void *pvCertInfo,
6018 DWORD dwFlags );
6019
6020/* Symmetric/Asymmetric operations */
6021
6051 HKEYCTX hKey,
6052 HHASHCTX hHash,
6053 BOOL bFinal,
6054 DWORD dwFlags,
6055 BYTE* pbData,
6056 DWORD* pdwDataLen,
6057 DWORD dwBufLen
6058);
6059
6081 HKEYCTX hKey,
6082 HHASHCTX hHash,
6083 BOOL bFinal,
6084 DWORD dwFlags,
6085 BYTE* pbData,
6086 DWORD* pdwDataLen
6087);
6088
6122 HSESSIONCTX hSession,
6123 int nAlgId,
6124 HKEYCTX hKey,
6125 DWORD dwFlags,
6126 HHASHCTX *hHash
6127);
6128
6140 HHASHCTX hHash,
6141 BYTE* pbData,
6142 DWORD dwDataLen,
6143 DWORD dwFlags
6144);
6145
6162 HHASHCTX hHash,
6163 DWORD dwParam,
6164 BYTE * pbData,
6165 DWORD dwDataLen,
6166 DWORD dwFlags
6167);
6168
6186 HHASHCTX hHash,
6187 DWORD dwParam,
6188 BYTE* pbData,
6189 DWORD* pdwDataLen,
6190 DWORD dwFlags
6191);
6192
6225 HHASHCTX hHash,
6226 HKEYCTX hKey,
6227 DWORD dwFlags,
6228 BYTE* pbSignature,
6229 DWORD* pdwSigLen
6230);
6231
6232
6241 HHASHCTX * phHash
6242);
6243
6262 HHASHCTX hHash,
6263 BYTE* pbSignature,
6264 DWORD dwSigLen,
6265 HKEYCTX hPubKey,
6266 DWORD dwFlags
6267);
6268
6281 HHASHCTX hHash,
6282 DWORD dwFlag,
6283 HHASHCTX * phHash
6284);
6285
6296 HSESSIONCTX hSession,
6297 BYTE *pbData,
6298 DWORD dwDataLen
6299);
6300
6320 HSESSIONCTX hSession,
6321 DWORD dwOP,
6322 char *szPriKey,
6323 void *pvInData,
6324 DWORD dwInDataLen,
6325 BYTE *pbOutData,
6326 DWORD *pdwOutDataLen,
6327 DWORD dwFlags
6328);
6329
6342 char *szCRL,
6343 char *szCertId,
6344 char *szVerifyInfo);
6345
6364 BYTE bM,
6365 BYTE bN,
6366 BYTE *pbSecret,
6367 DWORD dwSecretLen,
6368 DN_M_OF_N_SPLIT_INFO *pstSplitInfo,
6369 DWORD dwReserved);
6370
6387 DN_M_OF_N_PART *pstParts,
6388 DWORD dwPartsCount,
6389 BYTE *pbSecret,
6390 DWORD dwReserved);
6391
6410int AAP_API DGenerateSVMK(HSESSIONCTX hSession, int nVersion, const BYTE *pbKey,
6411 BYTE bM, BYTE bN, DN_SC_M_OF_N_SHADOW *pstShadows,
6412 DWORD dwReserved);
6413
6430 BYTE bShadowsCount, BYTE *pbKey, DWORD dwReserved);
6431
6434/* PIN - CVV */
6435
6465 HSESSIONCTX hSession,
6466 char *szSrcPEK,
6467 char *szDstPEK,
6468 BYTE bTransBlockType,
6469 char *szPAN,
6470 BYTE *pbInPinBlock,
6471 BYTE *pbOutPinBlock,
6472 DWORD dwParam);
6473
6492 HSESSIONCTX hSession,
6493 char *szKeyId,
6494 char *szPAN,
6495 char *szExpirationDate,
6496 char *szServiceCode,
6497 char *szCVV,
6498 DWORD dwParam
6499);
6500
6515 HSESSIONCTX hSession,
6516 char *szKeyId,
6517 char *szPAN,
6518 char *szExpirationDate,
6519 char *szServiceCode,
6520 char *szCVV,
6521 DWORD dwParam
6522);
6523
6545 HSESSIONCTX hSession,
6546 char *szPGK,
6547 char *szPAN,
6548 DWORD dwOperation,
6549 int nPinLen,
6550 char *szInPin,
6551 char *szOffset,
6552 char *szOutPin,
6553 DWORD dwParam
6554);
6555
6570 HSESSIONCTX hSession,
6571 char *szPTK,
6572 char *szPGK,
6573 char *szPAN,
6574 char *szOffset,
6575 BYTE *pbInPinBlock,
6576 DWORD dwParam
6577);
6578
6591 int nKeyAlgId,
6592 EFT_VISA_KEY_PARTS *pstKeyParts,
6593 DWORD dwParam
6594);
6595
6617 HSESSIONCTX hSession,
6618 BYTE *pbKSI,
6619 BYTE *pbDID_CTR,
6620 char *szDUKPT,
6621 DWORD dwParam
6622);
6623
6634 BYTE *pbKSI,
6635 char *szBDKName,
6636 DWORD dwParam
6637);
6638
6650 BYTE *pbKSI,
6651 BYTE *pbDID_CTR,
6652 char *szDUKPTName,
6653 DWORD dwParam
6654);
6655
6670 HSESSIONCTX hSession,
6671 char *szPGK,
6672 BYTE bPVKI,
6673 char *szPAN,
6674 char *szPIN,
6675 char *szPVV,
6676 DWORD dwParam
6677);
6678
6692 HSESSIONCTX hSession,
6693 char *szIMKDAC,
6694 char *szPAN,
6695 BYTE *pbSEQ,
6696 BYTE *pbDAC,
6697 DWORD dwParam
6698);
6699
6713 HSESSIONCTX hSession,
6714 char *szIMKDAC,
6715 char *szPAN,
6716 BYTE *pbSEQ,
6717 BYTE *pbDAC,
6718 DWORD dwParam
6719);
6720
6736 HSESSIONCTX hSession,
6737 char *szIK,
6738 BYTE *pbDAC,
6739 DWORD dwSDA_DATALen,
6740 BYTE *pbSDA_DATA,
6741 DWORD *pdwSigLen,
6742 BYTE *pbSig,
6743 DWORD dwParam
6744);
6745
6765 HSESSIONCTX hSession,
6766 BYTE bOP,
6767 char *szIK,
6768 char *szPAN,
6769 DWORD dwDDA_DATALen,
6770 BYTE *pbDDA_DATA,
6771 DWORD *pdwSigLen,
6772 BYTE *pbSig,
6773 DWORD dwParam
6774);
6775
6796 HSESSIONCTX hSession,
6797 BYTE bOP,
6798 char *szIK,
6799 char *szKeK,
6800 char *szPAN,
6801 BYTE *pbSEQ,
6802 DWORD *pdwEnvelopeLen,
6803 BYTE *pbEnvelope,
6804 DWORD dwParam
6805);
6806
6812 HSESSIONCTX hSession,
6813 BYTE bOP,
6814 char *szIK,
6815 char *szPAN,
6816 BYTE *pbSEQ,
6817 BYTE *pbNONCE,
6818 DWORD dwDataLen,
6819 BYTE *pbData,
6820 BYTE *pbMAC,
6821 DWORD dwParam
6822);
6823
6868 HSESSIONCTX hSession,
6869 BYTE bOP,
6870 char *szIK,
6871 char *szPAN,
6872 BYTE *pbSEQ,
6873 BYTE *pbNONCE,
6874 DWORD dwDataLen,
6875 BYTE *pbData,
6876 BYTE *pbMAC,
6877 DWORD dwParam
6878);
6879
6895 HSESSIONCTX hSession,
6896 char *szIK,
6897 char *szPAN,
6898 BYTE *pbSEQ,
6899 BYTE *pbATC,
6900 BYTE *pbUN,
6901 BYTE *pbIDN,
6902 DWORD dwParam
6903);
6904
6943 HSESSIONCTX hSession,
6944 BYTE bEncOP,
6945 char *szEncIK,
6946 BYTE *pbEncNONCE,
6947 BYTE bMacOP,
6948 char *szMacIK,
6949 BYTE *pbMacNONCE,
6950 char *szPAN,
6951 BYTE *pbSEQ,
6952 DWORD dwDataLen,
6953 BYTE *pbData,
6954 DWORD *pdwEncDataLen,
6955 BYTE *pbEncData,
6956 BYTE *pbMAC,
6957 DWORD dwParam
6958);
6959
6984 HSESSIONCTX hSession,
6985 BYTE bOP,
6986 char *szIK,
6987 BYTE *pbTrackNum,
6988 BYTE *pbServiceID,
6989 BYTE *pbIssuerID,
6990 BYTE *pbExpDate,
6991 DWORD *pdwCSRLen,
6992 BYTE *pbCSR,
6993 DWORD dwParam
6994);
6995
7019 HSESSIONCTX hSession,
7020 BYTE bOP,
7021 char *szIK,
7022 BYTE *pbTrackNum,
7023 BYTE *pbServiceID,
7024 BYTE *pbIssuerID,
7025 BYTE *pbExpDate,
7026 DBLOB *pdbCSR,
7027 BYTE *pbHash,
7028 DWORD dwParam
7029);
7030
7071 HSESSIONCTX hSession,
7072 BYTE bOP,
7073 BYTE *pbNONCE,
7074 char *szTransportKey,
7075 char *szISSUER_MK,
7076 char *szISSUER_SMC_MK,
7077 char *szPAN,
7078 BYTE *pbSEQ,
7079 BYTE *pbOLD_PB,
7080 BYTE *pbNEW_PB,
7081 BYTE *pbOutBlock,
7082 DWORD *pdwOutBlockLen,
7083 DWORD dwParam
7084);
7085
7091 HSESSIONCTX hSession,
7092 char *szSrcKey,
7093 WORD wBufferLen,
7094 BYTE *pbBuffer,
7095 BYTE bOP,
7096 DWORD dwAttrib,
7097 char *szDstKey,
7098 HKEYCTX *phKey,
7099 DWORD dwParam
7100);
7101
7119 HSESSIONCTX hSession,
7120 char *szIssuerMK,
7121 char *szPAN,
7122 BYTE *pbSEQ,
7123 BYTE *pbARQC,
7124 BYTE *pbARC,
7125 BYTE *pbARPC,
7126 DWORD dwParam
7127);
7128
7129
7130#define DN_CALC_ARPC_EMV_4_2_M1_ICC (1)
7131#define DN_CALC_ARPC_EMV_4_2_M1_SK (2)
7132#define DN_CALC_ARPC_EMV_4_2_M2 (3)
7133
7153 DWORD dwOp,
7154 void *pvInData,
7155 BYTE *pbARPC,
7156 DWORD dwParam );
7157
7171 DWORD dwType,
7172 BYTE *pbKey,
7173 DWORD dwAlg,
7174 const BYTE *pbMsg,
7175 DWORD dwMsgLen,
7176 BYTE *pbMAC
7177);
7178
7179#define DN_EFT_AES_KCV_TYPE_CMAC (1)
7203int AAP_API DEFTImportKey(HSESSIONCTX hSession, char *szKeyId,
7204 int nKeyAlgId, void *pstKeyParts,
7205 DWORD dwParam);
7206
7223#define DN_EFT_GET_KCV_TYPE_X9_24 (1)
7224#define DN_EFT_GET_KCV_TYPE_CMAC (2)
7227 const char *szKeyId, void *pvKeyParts,
7228 DWORD dwReserved);
7229
7230int AAP_API DEFTExportKey(HSESSIONCTX hSession, BYTE bExportMode,
7231 char *szKEKId, char *szKeyId,
7232 BYTE *pbEncryptedBlock, DWORD *pdwEncryptedBlockLen,
7233 BYTE *pbKeyCheckValue, DWORD dwParam);
7234
7235int AAP_API DEFTKeKImport( HSESSIONCTX hSession, BYTE bOP, DWORD dwAlgId,
7236 char *szKeKName, char *szKeyName, DWORD dwAttr,
7237 BYTE *pbKCV1, BYTE *pbKCV2, BYTE *pbKCV3,
7238 BYTE *pbKCVFinal, BYTE *pbBlob, DWORD dwFlags );
7239
7240/* DEFTExportZPK */
7241
7242#define DN_EXP_ZPK_FLAG_FULL_CKS (1)
7262int AAP_API DEFTExportZPK(HSESSIONCTX hSession, char *szKeyId,
7263 int *pnKeyAlg, int *pnKeySize,
7264 EFT_VISA_KEY_PARTS *pstKeyParts, DWORD dwParam);
7265
7266#define DN_EFT_GET_KCV_MAX_LEN (3)
7281int AAP_API DEFTGetKcv(HSESSIONCTX hSession, BYTE bType, const char *szKeyId,
7282 BYTE *pbKcv, DWORD *pdwKcvLen, DWORD dwReserved);
7283
7284
7285#define DN_EFT_GEN_OFFLINE_KCV_TYPE_X9_24 (1)
7286#define DN_EFT_GEN_OFFLINE_KCV_TYPE_CMAC (2)
7288#define DN_EFT_KCV_TYPE_X9_24_LEN (3)
7289#define DN_EFT_KCV_TYPE_CMAC_LEN (3)
7308int AAP_API DEFTGenKCVOffline(DWORD dwType, int nAlgId, const BYTE *pbKey,
7309 DWORD dwKeyLen, BYTE *pbKCV, DWORD *pdwKCVLen,
7310 DWORD reserved);
7395 const char *szKBPK,
7396 const char *szKey,
7397 void *pvReserved,
7398 WORD wUsage,
7399 BYTE bMode,
7400 BYTE bExport,
7401 BYTE *pbOutBlock,
7402 DWORD *pdwOutBlockLen,
7403 DWORD dwParam);
7404
7425 const char *szKBPK,
7426 const char *szKey,
7427 DWORD dwKeyAttributes,
7428 BYTE *pbKeyBlock,
7429 DWORD dwKeyBlockLen,
7430 DWORD dwParam);
7433/* Digital signature */
7434
7435int AAP_API DPowerSignHash(HSESSIONCTX hSession, char *szKeyId,
7436 int nHashAlgId, DWORD dwDataLen,
7437 BYTE *pbDataBuffer, DWORD *pdwSignLen,
7438 BYTE **ppbSignData);
7439
7474 HSESSIONCTX hSession,
7475 const char *szKeyName,
7476 const char *szKeyCert,
7477 const char *szCerts,
7478 DWORD dwAttrib,
7479 BYTE *pbContent,
7480 DWORD dwContentLen,
7481 DWORD *pdwSignatureLen,
7482 BYTE **ppbSignature,
7483 DWORD dwParam
7484);
7485
7489/* (CNS) Social Connectivity */
7491 char *szKeyID, char *szUsrID, char *szUsrName,
7492 WORD wModulusLen, BYTE *pbModulus,
7493 BYTE bExponentLen, BYTE *pbExponent,
7494 DWORD *pdwCertLen, BYTE *pbCert, DWORD dwParam );
7495
7496/* Hash */
7497int AAP_API DSignHashedData( HKEYCTX hKey, BYTE *pbData, DWORD dwDataLen,
7498 int nHashId, DWORD dwFlags, BYTE* pbSignature,
7499 DWORD* pdwSigLen );
7500
7502 DWORD dwPadding,
7503 BYTE*pbBlock,
7504 BYTE *pbData,
7505 DWORD* pdwDataLen,
7506 DWORD dwBlockSize,
7507 DWORD dwFlag );
7508
7510 BYTE *pbBlock,
7511 DWORD dwBlockCount,
7512 DWORD dwFlags );
7513
7514/* Base64 */
7515
7517 DWORD dwDataLen,
7518 char *szBase64,
7519 DWORD *pdwBase64Len,
7520 BOOL bNoNewLines );
7521
7523 DWORD dwBase64Len,
7524 BYTE *pbData,
7525 DWORD *pdwDataLen);
7526
7527
7562 HKEYCTX hKey,
7563 HHASHCTX hHash,
7564 char *szCertId,
7565 DWORD dwSizeUnsignedXml,
7566 BYTE *pbUnsignedXml,
7567 DWORD dwFilterLen,
7568 BYTE *pbFilter,
7569 DWORD *pdwSizeSignedXml,
7570 BYTE **ppbSignedXml
7571);
7572
7633 BYTE bHashMode,
7634 DWORD dwFlags,
7635 const char *szKeyId,
7636 const char *szCertId,
7637 DWORD dwSizeUnsignedXml,
7638 BYTE *pbUnsignedXml,
7639 DWORD dwFilterLen,
7640 BYTE *pbFilter,
7641 DWORD *pdwSizeSignedXml,
7642 BYTE **ppbSignedXml);
7643
7649int AAP_API DVerifySignedXml ( HSESSIONCTX hSession, char *szCertsId,
7650 DWORD dwSizeSignedXml, BYTE *pbSignedXml,
7651 DWORD dwFilterLen, BYTE *pbFilter);
7652
7673 HSESSIONCTX hSession,
7674 char *szCertsId,
7675 DWORD dwSizeSignedXml,
7676 BYTE *pbSignedXml,
7677 DWORD dwFilterLen,
7678 BYTE *pbFilter,
7679 char *szCRL
7680);
7681
7717 const char *szKeyId,
7718 const char *szCertId,
7719 DWORD dwFlags,
7720 DWORD dwSizeUnsignedPIXEnvelope,
7721 BYTE *pbUnsignedPIXEnvelope,
7722 DWORD *pdwSizeSignedPIXEnvelope,
7723 BYTE **ppbSignedPIXEnvelope);
7724
7725
7740 const char *szChainId,
7741 const char *szCRL,
7742 DWORD dwFlags,
7743 DWORD dwSizeSignedPIXEnvelope,
7744 BYTE* pbSignedPIXEnvelope);
7745
7766 const char *szKeyId,
7767 const char *szCertId,
7768 DWORD dwFlags,
7769 DWORD dwSizeUnsignedDictEnvelope,
7770 BYTE *pbUnsignedDictEnvelope,
7771 DWORD *pdwSizeSignedDictEnvelope,
7772 BYTE **ppbSignedDictEnvelope);
7773
7774
7789 const char *szChainId,
7790 const char *szCRL,
7791 DWORD dwFlags,
7792 DWORD dwSizeSignedDictEnvelope,
7793 BYTE* pbSignedDictEnvelope);
7794
7828 const char *szKeyId,
7829 DWORD dwFlags,
7830 DWORD dwHeaderLen,
7831 BYTE *pbHeader,
7832 DWORD dwPayloadLen,
7833 BYTE *pbPayload,
7834 DWORD *pdwJWSLen,
7835 BYTE *pbJWS);
7836
7855 const char *szChain,
7856 const char *szCRL,
7857 DWORD dwJWSLen,
7858 BYTE *pbJWS,
7859 DWORD dwFlags,
7860 DWORD *pdwHeaderLen,
7861 BYTE *pbHeader,
7862 DWORD *pdwPayloadLen,
7863 BYTE *pbPayload);
7864
7904 const char * szKeyId,
7905 const char * szCertId,
7906 const char * szPIXCertChainId,
7907 const char * szURL,
7908 DWORD dwCountRequestHeaderList,
7909 const char * pszRequestHeaderList[],
7910 DWORD dwSizeRequestData,
7911 BYTE* pbRequestData,
7912 DWORD dwTimeOut,
7913 DWORD * pdwSizeResponseHeaders,
7914 BYTE ** ppbResponseHeaders,
7915 DWORD * pdwSizeResponseBody,
7916 BYTE ** ppbResponseBody,
7917 DWORD dwParam);
7918
7919
7959 const char * szKeyId,
7960 const char * szCertId,
7961 const char * szPIXCertChainId,
7962 const char * szURL,
7963 DWORD dwCountRequestHeaderList,
7964 const char * pszRequestHeaderList[],
7965 DWORD dwSizeRequestData,
7966 BYTE* pbRequestData,
7967 DWORD dwTimeOut,
7968 DWORD * pdwSizeResponseHeaders,
7969 BYTE ** ppbResponseHeaders,
7970 DWORD * pdwSizeResponseBody,
7971 BYTE ** ppbResponseBody,
7972 DWORD dwParam);
7973
8010 const char * szKeyId,
8011 const char * szCertId,
8012 const char * szPIXCertChainId,
8013 const char * szURL,
8014 DWORD dwCountRequestHeaderList,
8015 const char * pszRequestHeaderList[],
8016 DWORD dwTimeOut,
8017 DWORD * pdwSizeResponseHeaders,
8018 BYTE ** ppbResponseHeaders,
8019 DWORD * pdwSizeResponseBody,
8020 BYTE ** ppbResponseBody,
8021 DWORD dwParam);
8022
8059 const char * szKeyId,
8060 const char * szCertId,
8061 const char * szPIXCertChainId,
8062 const char * szURL,
8063 DWORD dwCountRequestHeaderList,
8064 const char * pszRequestHeaderList[],
8065 DWORD dwTimeOut,
8066 DWORD * pdwSizeResponseHeaders,
8067 BYTE ** ppbResponseHeaders,
8068 DWORD * pdwSizeResponseBody,
8069 BYTE ** ppbResponseBody,
8070 DWORD dwParam);
8071
8074/* Library version */
8075
8076int AAP_API DVersion ( DWORD dwType, DWORD *pdwMajor,
8077 DWORD *pdwMinor, DWORD *pdwRevision,
8078 DWORD *pdwBuild );
8079
8098 DWORD dwsize
8099);
8100
8109 void *p
8110);
8111
8114//Free and clean CERT_X509_INFO structure members
8116
8117
8118/* Logs and monitoring */
8119
8120int AAP_API DLogLineFormat ( char *szIn, char *szOut );
8121
8123 HSESSIONCTX hSession,
8124 DWORD *pdwLogLen
8125);
8126
8128 DWORD dwStart,
8129 DWORD dwOffset,
8130 HLOGCTX *phLogCtx,
8131 DWORD dwParam );
8132
8134 BYTE *pbLog,
8135 DWORD *pdwLogSize );
8136
8138
8139
8140int AAP_API DGetStatInfo ( HSESSIONCTX hSession, DWORD *pdwSessions,
8141 DWORD *pdwCPU, DWORD *pdwUnit,
8142 DWORD *pdwMemTotal, DWORD *pdwMemUsed,
8143 DWORD *pdwSwapTotal, DWORD *pdwSwapUsed );
8144
8145int AAP_API DGetNetInfo ( HSESSIONCTX hSession, BYTE **ppbNetInfo, DWORD *pdwNetInfoCount, DWORD dwFlags );
8146
8147
8148/* Digital certificate */
8149
8151 DWORD dwCertLen,
8152 DWORD dwOutFormat,
8153 BYTE **ppbOutCert,
8154 DWORD *pdwOutCertLen,
8155 DWORD dwReserved );
8156
8157
8159 DWORD dwECLen,
8160 DWORD dwInForm,
8161 void *pvPrivKeyInfo,
8162 DWORD dwOutForm,
8163 DWORD dwReserved );
8164
8165
8167 DWORD dwECLen,
8168 DWORD dwInForm,
8169 void *pvPubKeyInfo,
8170 DWORD dwOutForm,
8171 DWORD dwReserved );
8172
8199 HSESSIONCTX hSession,
8200 char *szMasterKeyId,
8201 DWORD dwParamBlobType,
8202 void *pvParamBlob,
8203 DWORD dwParamBlobLen,
8204 BYTE *pbOTPBlob,
8205 DWORD *pdwOTPBlobLen,
8206 DWORD dwFlags
8207);
8208
8209
8210
8211
8241 HSESSIONCTX hSession,
8242 char *szMasterKeyId,
8243 char *szOTP,
8244 BYTE *pbOATHBlob,
8245 DWORD *pdwOATHBlobLen,
8246 DWORD dwFlags
8247);
8248
8263 HSESSIONCTX hSession,
8264 char *szMasterKeyId,
8265 BYTE bOTPLen,
8266 BYTE *pbOATHBlob,
8267 DWORD dwOATHBlobLen,
8268 char *szOTP,
8269 DWORD dwFlags
8270);
8271
8292 const HSESSIONCTX hSession,
8293 char *szMasterKey,
8294 BYTE *pbInBlob,
8295 DWORD dwInBlobLen,
8296 DWORD dwOutBlobType,
8297 BYTE *pbOutInfo,
8298 DWORD *pdwOutInfoLen,
8299 DWORD dwParam
8300);
8301
8325 HSESSIONCTX hSession,
8326 char *szMasterKeyId,
8327 char *szOTP1,
8328 char *szOTP2,
8329 BYTE *pbOATHBlob,
8330 DWORD *pdwOATHBlobLen,
8331 DWORD dwFlags
8332);
8333
8350 HSESSIONCTX hSession,
8351 char *szMasterKey,
8352 BYTE *pbPSK,
8353 BYTE bPSKLen,
8354 BYTE *pbPSKC,
8355 DWORD dwPSKCLen,
8356 void **pvBlobList,
8357 DWORD *pdwBlobListQuantity,
8358 DWORD dwParam
8359);
8360
8363//DOATHIssueHOTPBlob is DEPRECATED. Use DOATHIssueBlob instead.
8365 HSESSIONCTX hSession,
8366 char *szMasterKeyId,
8367 DWORD dwParamBlobType,
8368 void *pvParamBlob,
8369 DWORD dwParamBlobLen,
8370 BYTE *pbOTPBlob,
8371 DWORD *pdwOTPBlobLen,
8372 DWORD dwFlags
8373);
8374
8375//DOATHCheckHOTP is DEPRECATED. Use DOATHCheckOTP instead.
8377 char *szMasterKeyId,
8378 char *szOTP,
8379 BYTE *pbOATHBlob,
8380 DWORD *pdwOATHBlobLen,
8381 DWORD dwFlags );
8382
8383//Users
8385 DWORD dwSecretLen,
8386 ND_OATH_uint64_t nuiMovingFactor,
8387 int nCodeDigits,
8388 BOOL bAddChecksum,
8389 int nTruncOff,
8390 char *szResult);
8391
8392
8425 HSESSIONCTX hSession,
8426 char *szSrcISPB,
8427 char *szDstISPB,
8428 DWORD dwTotalDataLen,
8429 BYTE bErrorCode,
8430 BYTE bSpecialTreatment,
8431 HSPBCTX *hSPBCtx,
8432 DWORD dwFlags
8433);
8434
8449 HSPBCTX hSPBCtx,
8450 BYTE *pbDataIn,
8451 DWORD dwDataInLen,
8452 BYTE *pbDataOut,
8453 DWORD *pdwDataOutLen
8454);
8455
8466 HSPBCTX *hSPBCtx,
8467 BYTE *pbSPBHeader,
8468 DWORD *pdwSPBHeaderLen
8469);
8470
8510 HSESSIONCTX hSession,
8511 char *szSrcISPB,
8512 char *szDstISPB,
8513 BYTE *pbHeader,
8514 DWORD dwHeaderLen,
8515 BYTE bAcceptExpiredCert,
8516 BYTE bAutoUpdateCert,
8517 DWORD dwMessageDataLen,
8518 HSPBCTX *hSPBCtx,
8519 DWORD dwFlags
8520);
8521
8537 HSPBCTX hSPBCtx,
8538 BYTE *pbDataIn,
8539 DWORD dwDataInLen,
8540 BYTE **ppbDataOut,
8541 DWORD *pdwDataOutLen
8542);
8543
8552 HSPBCTX *hSPBCtx
8553);
8554
8567 HSESSIONCTX hSession,
8568 char *szID,
8569 char *szPrivateKeyName,
8570 DWORD dwKeyParam,
8571 DWORD dwParam
8572);
8573
8607 HSESSIONCTX hSession,
8608 char *szPrivateKeyName,
8609 BYTE bVersion,
8610 char *szSPBSubject,
8611 DWORD dwOutType,
8612 DWORD *pdwCSRLen,
8613 BYTE **ppbCSR,
8614 DWORD dwParam
8615);
8616
8641 HSESSIONCTX hSession,
8642 BYTE bActivate,
8643 const char *szUser,
8644 BYTE *pbCertificate,
8645 DWORD dwCertificateLen,
8646 const char *szDomain,
8647 DWORD dwParam);
8648
8666 BYTE bActivate,
8667 const char *szUser,
8668 const char *szPkcs12File,
8669 const char *szPkcs12Pwd,
8670 const char *szDomain,
8671 DWORD dwKeyAttr);
8672
8688 const char *szPkcs12Pwd,
8689 const char *szISPB,
8690 const char *szReserved,
8691 BYTE **ppbPkcs12,
8692 DWORD *pdwPkcs12Len,
8693 DWORD dwReserved);
8694
8706 HSESSIONCTX hSession,
8707 const char *szIdCert,
8708 const char *szDomain,
8709 DWORD dwParam
8710);
8711
8724 HSESSIONCTX hSession,
8725 const char *szIdCert,
8726 BYTE **ppbCertificate,
8727 DWORD *pdwCertificateLen,
8728 DWORD dwParam
8729);
8730
8747 char *szISPB,
8748 char *szDomain,
8749 DWORD dwKeyType,
8750 char *szOutObjName,
8751 DWORD dwParam
8752);
8753
8766 HSESSIONCTX hSession,
8767 const char *szIdCert,
8768 EXT_MAP_2_OBJ_INFO *pstExtMap,
8769 DWORD dwParam
8770);
8771
8789 HSESSIONCTX hSession,
8790 char *szISPB,
8791 char *szKeyId,
8792 char *szCertId,
8793 DWORD dwParam
8794);
8795
8798/* Esta API pertence ao grupo SPB, mas precisa da documentacao*/
8800 HSESSIONCTX hSession,
8801 char *szDomain,
8802 BOOL bActive,
8803 DBLOB **pdbList,
8804 DWORD *pdwListLen,
8805 DWORD dwParam
8806);
8807
8842int AAP_API DBchainCreateXPrv(HSESSIONCTX hSession, BYTE bType, DWORD dwAttributes,
8843 const char *szId, const BYTE *pcbData, DWORD dwDataLen,
8844 DWORD dwReserved);
8845
8866int AAP_API DBchainCreateBip32Ckd(HSESSIONCTX hSession, BYTE bVersion, DWORD dwIndex,
8867 DWORD dwAttributes, const char *cszPar,
8868 const char *cszDst, DN_BCHAIN_KEY_INFO *pKeyInfo,
8869 DWORD dwReserved);
8870
8921 const char *cszHrp, const char *cszPk,
8922 BYTE *pbAddress, DWORD *pdwAddressLen,
8923 DWORD dwReserved);
8924
8953int AAP_API DBchainSignHash(HSESSIONCTX hSession, BYTE bType, BYTE bHashMode,
8954 BYTE *pbHash, DWORD dwHashLen, const char *cszPk,
8955 BYTE *pbSig, DWORD *pdwSigLen, DWORD dwReserved);
8956
8993int AAP_API DBchainVerify(HSESSIONCTX hSession, BYTE bSigType, BYTE bHashMode,
8994 const BYTE *pbHash, DWORD dwHashLen, const BYTE *pbSig,
8995 DWORD dwSigLen, BYTE bInPbkType, const BYTE *pbInPbk,
8996 BYTE bInPbkLen, DWORD dwReserved);
8997
9020int AAP_API DBchainEdDsaSign(HSESSIONCTX hSession, BYTE bType, const char *cszCtxStr,
9021 BYTE *pbData, DWORD dwDataLen, const char *cszPk,
9022 BYTE *pbSig, DWORD *pdwSigLen, DWORD dwReserved);
9023
9056int AAP_API DBchainEdDsaVerify(HSESSIONCTX hSession, BYTE bType, const char *cszCtxStr,
9057 BYTE *pbData, DWORD dwDataLen, BYTE bPbkType,
9058 BYTE *pbPbk, DWORD dwPbkLen, BYTE *pbSig,
9059 DWORD dwSigLen, DWORD dwReserved);
9083int AAP_API DBchainPkImport(HSESSIONCTX hSession, BYTE bFormat, DWORD dwAttributes,
9084 const char *cszId, const BYTE *pcbData, DWORD dwDataLen,
9085 DWORD dwReserved);
9086
9115int AAP_API DBchainPkExport(HSESSIONCTX hSession, BYTE bFormat, BYTE bVersion,
9116 BYTE bCompressed, const char *cszId, BYTE **ppbData,
9117 DWORD *pdwDataLen, DWORD dwReserved);
9118
9141 const char *cszId, BYTE *pbData,
9142 DWORD *pdwDataLen, DWORD dwReserved);
9143
9171 BYTE bHashMode, const BYTE *pbHash,
9172 DWORD dwHashLen, const BYTE *pbSig,
9173 DWORD dwSigLen, DN_BCHAIN_PBK *pPbk,
9174 DWORD dwReserved);
9175
9187 const char *cszId, void *pvData,
9188 DWORD *pdwDataLen);
9189
9210int AAP_API DBchainHashData(HSESSIONCTX hSession, BYTE bMode, BYTE *pbData,
9211 DWORD dwDataLen, BYTE *pbHash, DWORD *pdwHashLen,
9212 DWORD dwReserved);
9213
9226int AAP_API DBchainEd2X(HSESSIONCTX hSession, const char *cszPk,
9227 const char *cszTo, DWORD dwAttr, DWORD dwReserved);
9228
9236/* DSKeepNewSecret e DSKeepProbeSecret */
9237// Security level
9238#define DN_SKEEP_LEVEL_UNKNOWN (0)
9239#define DN_SKEEP_SEC_LEVEL_64b (1)
9240#define DN_SKEEP_SEC_LEVEL_96b (2)
9241#define DN_SKEEP_SEC_LEVEL_112b (3)
9242#define DN_SKEEP_SEC_LEVEL_128b (4)
9243#define DN_SKEEP_SEC_LEVEL_160b (5)
9245// Type
9246#define DN_SKEEP_TYPE_NMIND (0)
9247#define DN_SKEEP_TYPE_SCRD (1)
9248#define DN_SKEEP_TYPE_2FA (2)
9249#define DN_SKEEP_TYPE_CRT (4)
9278int AAP_API DSKeepNewSecret(HSESSIONCTX hSession, const char *cszId,
9279 BYTE bSecLevel, WORD wAuthType, DWORD dwReserved);
9280
9295int AAP_API DSKeepSplitSecret(HSESSIONCTX hSession, const char *cszId,
9296 BYTE bSecLevel, WORD wAuthType, BYTE bM, BYTE bN,
9297 SKeepShare *pstShares, DWORD dwReserved);
9298
9308int AAP_API DSKeepProbeSecret(HSESSIONCTX hSession, const char *cszId,
9309 SKeepProbeInfo *pstInfo, DWORD dwReserved);
9310
9322int AAP_API DSKeepMatchSecret(HSESSIONCTX hSession, const char *cszId,
9323 const SKeepShare *cpstShares, DWORD dwSharesCount,
9324 DWORD dwReserved);
9325
9337int AAP_API DSKeepRecoverSecret(HSESSIONCTX hSession, const char *cszId,
9338 const SKeepShare *cpstShares, DWORD dwSharesCount,
9339 SKeepRecoverInfo *pstRecoverInfo, DWORD dwReserved);
9340
9351int AAP_API DSKeepRemoveSecret(HSESSIONCTX hSession, const char *cszId,
9352 BYTE bSecLevel, WORD wAuthType, DWORD dwReserved);
9353
9354#define DN_SKEEP_SHARE_CKS_LEN (4)
9356#define DN_SKEEP_GEN_SHARE_CKS (1)
9369int AAP_API DSKeepCalcShareCks(DWORD dwType, const char *cszShare, char *szCks);
9370
9373#ifdef __cplusplus
9374 }
9375#endif
9376
9377#endif /* #ifndef DINAMO_H_INCLUDED */
#define MAX_IP_LEN
Definição dinamo.h:1686
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:1715
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:1969
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:1986
#define DN_SC_MAX_CARD_PRODUCT_NAME_LEN
Definição dinamo.h:2564
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:1687
#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:2563
int AAP_API DGetUserAcl(HSESSIONCTX hSession, char *szUser, DWORD *pdwUserAcl)
#define DN_BCHAIN_MAX_PBK_LEN
Definição dinamo.h:2215
int AAP_API DRemoveMapObj(const HSESSIONCTX hSession, const char *szMapObjId)
#define DN_SC_MAX_ATR_LEN
Definição dinamo.h:2562
#define MAX_P11_OBJ_ID
Definição dinamo.h:1692
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:1965
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:1720
int AAP_API DGetNetInfo(HSESSIONCTX hSession, BYTE **ppbNetInfo, DWORD *pdwNetInfoCount, DWORD dwFlags)
#define DN_M_OF_N_PART_LEN
Definição dinamo.h:3563
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:2081
#define DN_RCC_MAX_REPL_MC_VER
Definição dinamo.h:3467
#define SA_TP_MAX_OTP_LEN
Definição dinamo.h:1884
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:3562
#define DN_SC_M_OF_N_SHADOW_MATERIAL_MAX_LEN
Definição dinamo.h:3684
#define ND_SPB_ISPB_LEN
Definição dinamo.h:1868
int AAP_API DGetHSMP11InfoAttr(HP11ATTRCTX hInMeta, DWORD dwOption, void *pvOptionData, DWORD *pdwOptionDataLen, DWORD dwParam)
#define ND_SPB_MAX_SUBJECT
Definição dinamo.h:1874
#define GET_INFO_MAX_REPL_NODES
Definição dinamo.h:786
#define OATH_MAX_PSK_LEN
Definição dinamo.h:1918
#define NET_INFO_MAX_SROUTE_LEN
Definição dinamo.h:1987
int AAP_API DCert2CertInfo(BYTE *pbCert, DWORD dwCertLen, DWORD dwOutType, void *pvCertInfo, DWORD dwFlags)
#define DN_GLOBAL_OBJ_STATS_COUNT
Definição dinamo.h:3620
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:1967
#define ND_SPB_MAX_ALG_ID
Definição dinamo.h:1876
#define DN_USR_A_TOKEN_KLEN
Definição dinamo.h:2050
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:2964
#define MAX_OBJ_ID_LEN
Definição dinamo.h:1698
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:1688
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:1991
void * HCERTCTX
Definição dinamo.h:71
#define DN_SC_M_OF_N_SHADOW_MAX_LEN
Definição dinamo.h:3685
#define GET_INFO_MAX_REPL_DOMAIN_NAME
Definição dinamo.h:785
#define MAX_HSM_ID_NAME
Definição dinamo.h:1710
int AAP_API DGetHSMLogEnd(HLOGCTX *phLogCtx)
unsigned long DN_ULONG
Definição dinamo.h:66
#define DN_MAX_ISSUER
Definição dinamo.h:1966
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:3512
#define EFT_EMV_ARC_LEN
Definição dinamo.h:1722
#define DES_BLOCK
Definição dinamo.h:1041
#define DN_BCHAIN_BIP39_PWD_LEN_MAX
Definição dinamo.h:3513
#define MAX_OATH_HMAC_LEN
Definição dinamo.h:836
#define SA_HOTP_CHAP_LEN
Definição dinamo.h:1886
#define DN_MAX_EMAIL
Definição dinamo.h:1968
#define DN_SKEEP_M_OF_N_S_LEN
Definição dinamo.h:3657
#define DN_EC_MAX_BIG_NUM
Definição dinamo.h:2360
#define DN_M_OF_N_S_LEN
Definição dinamo.h:3559
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:2965
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:3560
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:3140
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:1676
#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:3141
#define MAX_MODULE_NAME_VERSION_LEN
Definição dinamo.h:1685
#define MAX_USR_PWD
Definição dinamo.h:1670
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:1701
#define EFT_EMV_PAD_LEN
Definição dinamo.h:1724
#define EFT_VISA_KEY_CHECKSUM_LEN
Definição dinamo.h:1716
#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:1875
#define MAX_HSM_MODEL_NAME
Definição dinamo.h:1709
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:1988
#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:1989
void * HKEYCTX
Definição dinamo.h:70
#define MAX_HOTP_APP_NAME
Definição dinamo.h:1690
#define MAX_OBJ_NAME_LEN
Definição dinamo.h:1683
#define MAX_PAN_LEN
Definição dinamo.h:1574
int AAP_API DGetStatLogSize(HSESSIONCTX hSession, DWORD *pdwLogLen)
#define DN_BCHAIN_BIP32_SEED_LEN_MAX
Definição dinamo.h:3501
#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:2565
#define MAX_HOTP_IMEI
Definição dinamo.h:1689
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:1693
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:1671
#define ISSUE_OATH_BLOB_V2_IV_LEN
Definição dinamo.h:1928
#define NET_INFO_MAX_SNMP_SL_STR
Definição dinamo.h:1990
#define DN_MAX_PRIVATE_KEY_ATTR_LEN
Definição dinamo.h:2539
unsigned long long ND_uint64_t
Definição dinamo.h:37
#define EFT_EMV_CSU_LEN
Definição dinamo.h:1723
#define ND_SPB_SN_MAX_LEN
Definição dinamo.h:1871
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:3466
#define ND_SPB_CA_LEN
Definição dinamo.h:1869
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:4342
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:4177
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:3919
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:4016
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:4218
int AAP_API DSCGetInfo(DN_SC_INFO *pstInfo, DWORD dwReserved)
RetCodeMsgType
Definição dinamo.h:4588
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:4590
@ CODE_MSG
Definição dinamo.h:4589
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:4769
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:3158
int nPort
Definição dinamo.h:3160
DN_A_TOKEN stAToken
Definição dinamo.h:3161
Definição dinamo.h:3147
char szAPIToken[MAX_HTTP_API_TOKEN_LEN+1]
Definição dinamo.h:3149
DWORD dwTimeout
Definição dinamo.h:3150
char szAddr[MAX_HTTP_ADDR_LEN+1]
Definição dinamo.h:3148
Definição dinamo.h:3124
int nPort
Definição dinamo.h:3126
char szUserId[MAX_USR_LEN]
Definição dinamo.h:3127
DWORD dwAuthType
Definição dinamo.h:3129
char szAddr[MAX_ADDR_LEN]
Definição dinamo.h:3125
char szPassword[MAX_USR_PWD]
Definição dinamo.h:3128
int nStrongAuthLen
Definição dinamo.h:3135
BYTE * pbStrongAuth
Definição dinamo.h:3134
Definição dinamo.h:3112
int nPort
Definição dinamo.h:3114
char szUserId[MAX_USR_LEN]
Definição dinamo.h:3115
char szAddr[MAX_ADDR_LEN]
Definição dinamo.h:3113
char szPassword[MAX_USR_PWD]
Definição dinamo.h:3116
Definição dinamo.h:3169
int nPort
Definição dinamo.h:3171
Definição dinamo.h:2333
int nPubKeyHSMAlgId
Definição dinamo.h:2346
DWORD dwVersion
Definição dinamo.h:2334
DBLOB dbPublicKey
Definição dinamo.h:2345
Definição dinamo.h:2870
int nVersion
Definição dinamo.h:2871
DBLOB dbIssuer
Definição dinamo.h:2874
DBLOB dbSubject
Definição dinamo.h:2873
P11_DATE dtNotBefore
Definição dinamo.h:2877
DBLOB dbSerialNumber
Definição dinamo.h:2875
P11_DATE dtNotAfter
Definição dinamo.h:2878
Definição dinamo.h:3474
DWORD dwIp
Definição dinamo.h:3476
DWORD dwRCode
Definição dinamo.h:3478
DWORD dwCount
Definição dinamo.h:3475
Definição dinamo.h:2306
void * pvData
Definição dinamo.h:2307
DWORD dwDataLen
Definição dinamo.h:2308
Definição dinamo.h:3102
DN_A_TOKEN stAToken
Definição dinamo.h:3103
QWORD qwExpiration
Definição dinamo.h:3104
Definição dinamo.h:3092
Definição dinamo.h:3506
DWORD dwSeedLen
Definição dinamo.h:3508
BYTE bVer
Definição dinamo.h:3507
Definição dinamo.h:3519
BYTE bVer
Definição dinamo.h:3520
Definição dinamo.h:3534
BYTE bStorageType
Definição dinamo.h:3535
BYTE bBip32Depth
Definição dinamo.h:3538
DWORD dwType
Definição dinamo.h:3536
Definição dinamo.h:3549
BYTE bLen
Definição dinamo.h:3551
BYTE bType
Definição dinamo.h:3550
Definição dinamo.h:3405
BYTE bOP
Definição dinamo.h:3412
Definição dinamo.h:3416
DWORD dwPADLen
Definição dinamo.h:3427
DWORD dwCSULen
Definição dinamo.h:3425
BYTE bOP
Definição dinamo.h:3421
Definição dinamo.h:2376
DWORD dwDataLen
Definição dinamo.h:2378
Definição dinamo.h:2388
DN_EC_BIG_NUMBER bnCofactor
Definição dinamo.h:2396
DN_EC_BIG_NUMBER bnOrder
Definição dinamo.h:2398
DN_EC_BIG_NUMBER bnP
Definição dinamo.h:2391
DN_EC_POINT_INFO stGeneratorPoint
Definição dinamo.h:2399
DN_EC_BIG_NUMBER bnA
Definição dinamo.h:2393
DN_EC_BIG_NUMBER bnB
Definição dinamo.h:2394
int nFieldType
Definição dinamo.h:2389
Definição dinamo.h:2382
DN_EC_BIG_NUMBER bnY
Definição dinamo.h:2384
DN_EC_BIG_NUMBER bnX
Definição dinamo.h:2383
Definição dinamo.h:2409
DN_EC_GROUP_INFO stGroupInfo
Definição dinamo.h:2410
DN_EC_BIG_NUMBER bnPrivatevalue
Definição dinamo.h:2411
Definição dinamo.h:2403
DN_EC_GROUP_INFO stGroupInfo
Definição dinamo.h:2404
DN_EC_POINT_INFO stPublicPoint
Definição dinamo.h:2405
Definição dinamo.h:2471
BYTE bIsEftd0Active
Definição dinamo.h:2474
BYTE bMsgHeaderLen
Definição dinamo.h:2472
BYTE bPinLen
Definição dinamo.h:2473
Definição dinamo.h:5894
int nEphemeralKekAlg
Definição dinamo.h:5896
char * szKeKKid
Definição dinamo.h:5895
char * szGenerator
Definição dinamo.h:5897
Definição dinamo.h:3638
DN_OBJ_STATS stGlobal
Definição dinamo.h:3639
Definição dinamo.h:3569
BYTE bN
Definição dinamo.h:3572
BYTE bM
Definição dinamo.h:3571
BYTE bPos
Definição dinamo.h:3570
Definição dinamo.h:3580
Definição dinamo.h:3588
DWORD dwPartCount
Definição dinamo.h:3592
Definição dinamo.h:2523
int nAlgId
Definição dinamo.h:2524
QWORD qwCount
Definição dinamo.h:2525
Definição dinamo.h:3599
ND_uint64_t uCount
Definição dinamo.h:3603
ND_uint64_t tFirst
Definição dinamo.h:3600
ND_uint64_t uLast
Definição dinamo.h:3602
ND_uint64_t uFirst
Definição dinamo.h:3601
Definição dinamo.h:3610
DN_OBJ_STAT_INFO stTouch
Definição dinamo.h:3611
DN_OBJ_STAT_INFO stUsage
Definição dinamo.h:3612
Definição dinamo.h:2427
DWORD dwDataLen
Definição dinamo.h:2429
Definição dinamo.h:2542
DWORD dwExponent2Len
Definição dinamo.h:2556
DWORD dwPrime2Len
Definição dinamo.h:2552
DWORD dwModulusLen
Definição dinamo.h:2544
DWORD dwPrime1Len
Definição dinamo.h:2550
DWORD dwCoefficientLen
Definição dinamo.h:2558
DWORD dwPrivExponentLen
Definição dinamo.h:2548
DWORD dwExponent1Len
Definição dinamo.h:2554
DWORD dwPubExponentLen
Definição dinamo.h:2546
Definição dinamo.h:2436
DN_RSA_BIG_NUMBER bnModulus
Definição dinamo.h:2437
DN_RSA_BIG_NUMBER bnPubExponent
Definição dinamo.h:2438
Definição dinamo.h:2571
BOOL bHasPINInfo
Definição dinamo.h:2588
BOOL bIsPINSMCOn
Definição dinamo.h:2589
BOOL bIsFormatted
Definição dinamo.h:2586
BYTE bLockByte1
Definição dinamo.h:2582
BYTE bPINMMPN
Definição dinamo.h:2590
BYTE bPINSCR
Definição dinamo.h:2591
BYTE bCardChipVersion
Definição dinamo.h:2581
BYTE bCardProgramVersion
Definição dinamo.h:2580
BOOL bIsPINLocked
Definição dinamo.h:2587
BOOL bIsOEMKeyAvailable
Definição dinamo.h:2585
BOOL bHasLegacyCard
Definição dinamo.h:2584
BYTE bPINUCR
Definição dinamo.h:2592
int nATRSize
Definição dinamo.h:2573
BYTE bPINCKS
Definição dinamo.h:2593
BYTE bLockByte2
Definição dinamo.h:2583
Definição dinamo.h:3696
BYTE bN
Definição dinamo.h:3699
BYTE bM
Definição dinamo.h:3698
BYTE bPos
Definição dinamo.h:3697
Definição dinamo.h:3707
int nVersion
Definição dinamo.h:3708
Definição dinamo.h:2533
DWORD dwObjCountCount
Definição dinamo.h:2536
DN_OBJ_COUNT * pstObjCount
Definição dinamo.h:2535
Definição dinamo.h:3451
BYTE bVersion
Definição dinamo.h:3452
Definição dinamo.h:3381
DWORD dwAttributes
Definição dinamo.h:3382
EFT_AES_KEY_PARTS stParts
Definição dinamo.h:3383
Definição dinamo.h:3370
Definição dinamo.h:3390
Definição dinamo.h:3356
Definição dinamo.h:3251
DWORD dwObjAlgId2
Definição dinamo.h:3254
DWORD dwObjAlgId1
Definição dinamo.h:3252
Definição dinamo.h:3435
DWORD dwTargetKeyAlg
Definição dinamo.h:3439
DWORD dwTargetKeyAttributes
Definição dinamo.h:3440
DBLOB dbPubKey
Definição dinamo.h:3441
DBLOB dbKDFData
Definição dinamo.h:3442
Definição dinamo.h:2481
BYTE * pbPubKey
Definição dinamo.h:2486
DWORD dwFlags
Definição dinamo.h:2484
BOOL bTempKey
Definição dinamo.h:2485
int nAlgId
Definição dinamo.h:2483
DWORD dwPubKeyLen
Definição dinamo.h:2487
Definição dinamo.h:3072
DWORD dwImageLen
Definição dinamo.h:3074
Definição dinamo.h:3065
DWORD dwParam
Definição dinamo.h:3066
DWORD dwHipFlags
Definição dinamo.h:3067
DWORD dwHipColor
Definição dinamo.h:3068
Definição dinamo.h:3051
DWORD dwStructId
Definição dinamo.h:3052
Definição dinamo.h:2882
DWORD dwObjAttr
Definição dinamo.h:2885
DWORD dwObjHotpFlags
Definição dinamo.h:2886
DBLOB * pdbStLogoImage
Definição dinamo.h:2890
DWORD dwStructId
Definição dinamo.h:2883
Definição dinamo.h:3057
DWORD dwStructId
Definição dinamo.h:3058
Definição dinamo.h:2271
int nPort
Definição dinamo.h:2273
time_t tmNow
Definição dinamo.h:2274
int nqtdcache
Definição dinamo.h:2275
Definição dinamo.h:2352
Definição dinamo.h:2801
ISSUE_OATH_INFO_t stInfo
Definição dinamo.h:2802
Definição dinamo.h:2810
ISSUE_OATH_INFO_t stInfo
Definição dinamo.h:2811
Definição dinamo.h:2735
BYTE seed_len
Definição dinamo.h:2736
ND_OATH_uint64_t T0
Definição dinamo.h:2756
WORD time_step
Definição dinamo.h:2751
ND_OATH_uint64_t moving_factor
Definição dinamo.h:2743
BYTE truncation_offset
Definição dinamo.h:2747
Definição dinamo.h:2770
BYTE seed_len
Definição dinamo.h:2771
ND_OATH_uint64_t T0
Definição dinamo.h:2791
WORD time_step
Definição dinamo.h:2786
ND_OATH_uint64_t moving_factor
Definição dinamo.h:2778
BYTE truncation_offset
Definição dinamo.h:2782
Definição dinamo.h:2700
WORD wTimeStep
Definição dinamo.h:2712
BYTE bUseDefaultMovingFactor
Definição dinamo.h:2721
ND_OATH_uint64_t otMovingFactor
Definição dinamo.h:2724
ND_OATH_uint64_t otT0
Definição dinamo.h:2717
BYTE bTruncationOffset
Definição dinamo.h:2708
BYTE bSeedLen
Definição dinamo.h:2701
Definição dinamo.h:2283
HSM_ADDR * pstLBList
Definição dinamo.h:2284
DWORD dwLBListCount
Definição dinamo.h:2285
Definição dinamo.h:3243
char szObj1Id[MAX_OBJ_NAME_LEN+1]
Definição dinamo.h:3245
char szObj2Id[MAX_OBJ_NAME_LEN+1]
Definição dinamo.h:3247
DWORD dwObj1AlgId
Definição dinamo.h:3244
DWORD dwObj2AlgId
Definição dinamo.h:3246
Definição dinamo.h:3260
DWORD dwModuleId
Definição dinamo.h:3261
char szModuleNameVersion[MAX_MODULE_NAME_VERSION_LEN]
Definição dinamo.h:3262
Definição dinamo.h:2820
ISSUE_OATH_BLOB_t stOATHBlob
Definição dinamo.h:2821
Definição dinamo.h:2829
BYTE key_len
Definição dinamo.h:2834
BYTE type
Definição dinamo.h:2830
BYTE truncation_offset
Definição dinamo.h:2836
Definição dinamo.h:2843
OATH_SA_v1 sa_v1
Definição dinamo.h:2844
ND_OATH_uint64_t T0
Definição dinamo.h:2849
WORD time_step
Definição dinamo.h:2845
Definição dinamo.h:2605
DWORD len
Definição dinamo.h:2609
DWORD type
Definição dinamo.h:2607
DWORD attrib
Definição dinamo.h:2608
DWORD version
Definição dinamo.h:2606
Definição dinamo.h:2682
OBJ_HDR_V1 stSlot2Header
Definição dinamo.h:2689
OBJ_HDR_V1 stObjectHeader
Definição dinamo.h:2683
BYTE bBlockedStatus
Definição dinamo.h:2692
ND_uint64_t stCreationTime
Definição dinamo.h:2693
OBJ_HDR_V1 stSlot1Header
Definição dinamo.h:2686
Definição dinamo.h:2671
OBJ_HDR_V1 stObjectHeader
Definição dinamo.h:2673
DWORD dwVERB
Definição dinamo.h:2672
Definição dinamo.h:5016
const char * pszString
Definição dinamo.h:5018
DWORD dwId
Definição dinamo.h:5017
DWORD dwType
Definição dinamo.h:5019
Definição dinamo.h:2616
QWORD qwOrig_creat
Definição dinamo.h:2626
QWORD qwDeactiv
Definição dinamo.h:2621
QWORD qwComprom
Definição dinamo.h:2623
QWORD qwLast_change
Definição dinamo.h:2625
QWORD qwC_occur
Definição dinamo.h:2622
QWORD qwProtect_s
Definição dinamo.h:2620
QWORD qwMask
Definição dinamo.h:2627
QWORD qwInit
Definição dinamo.h:2617
QWORD qwActiv
Definição dinamo.h:2618
QWORD qwProc_s
Definição dinamo.h:2619
BYTE bState
Definição dinamo.h:2628
QWORD qwArchive
Definição dinamo.h:2624
Definição dinamo.h:2863
Definição dinamo.h:2495
ND_uint64_t redirect_time
Definição dinamo.h:2502
ND_uint64_t upload_size
Definição dinamo.h:2509
ND_uint64_t upload_speed
Definição dinamo.h:2506
ND_uint64_t starttransfer_time
Definição dinamo.h:2500
ND_uint64_t content_length_upload
Definição dinamo.h:2504
ND_uint64_t connect_time
Definição dinamo.h:2497
ND_uint64_t request_size
Definição dinamo.h:2513
ND_uint64_t pretransfer_time
Definição dinamo.h:2499
ND_uint64_t num_connects
Definição dinamo.h:2512
ND_uint64_t download_size
Definição dinamo.h:2508
ND_uint64_t http_response_code
Definição dinamo.h:2515
ND_uint64_t redirect_count
Definição dinamo.h:2511
ND_uint64_t name_lookup_time
Definição dinamo.h:2496
ND_uint64_t received_header_size
Definição dinamo.h:2514
ND_uint64_t appconnect_time
Definição dinamo.h:2498
ND_uint64_t download_speed
Definição dinamo.h:2507
ND_uint64_t total_time
Definição dinamo.h:2501
ND_uint64_t content_length_download
Definição dinamo.h:2505
Definição dinamo.h:3266
BYTE Trusted
Definição dinamo.h:3280
BYTE Local
Definição dinamo.h:3282
BYTE WrapWithTrusted
Definição dinamo.h:3281
DWORD JavaMidpSecDomain
Definição dinamo.h:3285
DWORD CertificateCategory
Definição dinamo.h:3284
DWORD KeyGenMechanism
Definição dinamo.h:3286
DWORD Class
Definição dinamo.h:3270
Definição dinamo.h:3340
BYTE bMaxInvalidLogins
Definição dinamo.h:3342
BYTE bLower
Definição dinamo.h:3349
BYTE bHistory
Definição dinamo.h:3344
BYTE bUpper
Definição dinamo.h:3348
BYTE bMinLength
Definição dinamo.h:3346
BYTE bExpiration
Definição dinamo.h:3343
BYTE bMinSpecial
Definição dinamo.h:3347
Definição dinamo.h:3044
DWORD dwPeer
Definição dinamo.h:3046
BYTE bOP
Definição dinamo.h:3045
Definição dinamo.h:2418
DBLOB dbPubExponent
Definição dinamo.h:2420
DBLOB dbModulus
Definição dinamo.h:2419
Definição dinamo.h:3649
WORD wAuthType
Definição dinamo.h:3650
BYTE bSecLevel
Definição dinamo.h:3651
Definição dinamo.h:3663
BYTE bSecLevel
Definição dinamo.h:3664
Definição dinamo.h:3672
Definição dinamo.h:2294
int nPort
Definição dinamo.h:2295
Definição dinamo.h:2314
DWORD dwVersion
Definição dinamo.h:2315
DBLOB dbPublicKey
Definição dinamo.h:2329
Definição dinamo.h:2857
Definição dinamo.h:2231
BYTE bFrom
Definição dinamo.h:2250
BYTE bCKS
Definição dinamo.h:2239
BYTE bFlags
Definição dinamo.h:2232
BYTE bType
Definição dinamo.h:2249
BYTE bTo
Definição dinamo.h:2256
Definição dinamo.h:3028
SYS_NTP_INFO stNTPInfo
Definição dinamo.h:3036
int nFilledCount
Definição dinamo.h:3029
SYS_HW_STR_INFO stHardwareInfo
Definição dinamo.h:3035
SYS_REPL_INFO stReplicationInfo
Definição dinamo.h:3033
DWORD dwFIPSReturnCode
Definição dinamo.h:3038
SYS_STATUS_INFO stStatusInfo
Definição dinamo.h:3030
DWORD dwFIPSMode
Definição dinamo.h:3031
SYS_DISK_INFO stDiskInfo
Definição dinamo.h:3032
QWORD qwCurrentDateTime
Definição dinamo.h:3034
SYS_PENDING_INFO stPendingInfo
Definição dinamo.h:3039
SYS_COUNTER_INFO stCounterInfo
Definição dinamo.h:3037
Definição dinamo.h:2955
QWORD qwUsers
Definição dinamo.h:2956
QWORD qwSLBeFileSize
Definição dinamo.h:2958
QWORD qwVMSize
Definição dinamo.h:2960
QWORD qwTasks
Definição dinamo.h:2959
QWORD qwObjects
Definição dinamo.h:2957
Definição dinamo.h:2929
DWORD dwBlockSize
Definição dinamo.h:2930
DWORD dwFreeBlocks
Definição dinamo.h:2932
DWORD dwTotalBlocks
Definição dinamo.h:2931
Definição dinamo.h:2923
DWORD dwBatteryOK
Definição dinamo.h:2925
DWORD dwUptime
Definição dinamo.h:2924
Definição dinamo.h:2980
Definição dinamo.h:2907
DWORD dwSysNetInfoCount
Definição dinamo.h:2909
SYS_NET_INFO * pstSysNetInfo
Definição dinamo.h:2908
Definição dinamo.h:2896
DWORD dwSpeed
Definição dinamo.h:2902
BYTE bUp
Definição dinamo.h:2901
Definição dinamo.h:2997
BYTE bENABLED
Definição dinamo.h:2998
Definição dinamo.h:2987
DWORD dwKeyLen
Definição dinamo.h:2991
WORD wKeyIndex
Definição dinamo.h:2990
Definição dinamo.h:2972
BYTE bPendingBackup
Definição dinamo.h:2973
Definição dinamo.h:3005
DWORD dwDiscoveryPulse
Definição dinamo.h:3019
QWORD qwSpVal
Definição dinamo.h:3014
DWORD dwManagerPulse
Definição dinamo.h:3017
DWORD dwRecoveryPulse
Definição dinamo.h:3018
QWORD qwEventType
Definição dinamo.h:3010
DWORD dwBoundEth
Definição dinamo.h:3007
WORD wSpvv
Definição dinamo.h:3015
QWORD qwGuid
Definição dinamo.h:3008
QWORD qwDateTime
Definição dinamo.h:3009
DWORD dwDiscoveryReset
Definição dinamo.h:3016
DWORD dwState
Definição dinamo.h:3011
Definição dinamo.h:2940
DWORD dwMemTotal
Definição dinamo.h:2944
DWORD dwMemUsed
Definição dinamo.h:2945
DWORD dwCPU
Definição dinamo.h:2942
DWORD dwUnit
Definição dinamo.h:2943
DWORD dwSwapTotal
Definição dinamo.h:2946
DWORD dwSwapUsed
Definição dinamo.h:2947
DWORD dwSessions
Definição dinamo.h:2941
Definição dinamo.h:2462
Definição dinamo.h:3179
DBLOB dbHSMCert
Definição dinamo.h:3183
DBLOB dbPrivateKeyCert
Definição dinamo.h:3182
char * szPrivateKeyPwd
Definição dinamo.h:3181
DBLOB dbPrivateKey
Definição dinamo.h:3180
Definição dinamo.h:3082
DWORD dwAttempts
Definição dinamo.h:3085
int nBlocked
Definição dinamo.h:3084
Definição dinamo.h:2448
DBLOB dbCert
Definição dinamo.h:2455
BYTE bOP
Definição dinamo.h:2450
Definição dinamo.h:3190
DWORD dwAuthMask
Definição dinamo.h:3193
char szPassword[MAX_USR_PWD+1]
Definição dinamo.h:3192
char szUserId[MAX_USR_LEN+1]
Definição dinamo.h:3191
Definição dinamo.h:3221
DWORD dwACL
Definição dinamo.h:3231
DWORD dwState
Definição dinamo.h:3223