API C/C++
HSM Dinamo
Loading...
Looking for...
No entries found
dinamo.h
Go to the documentation for this file.
1/* Dinamo Networks. */
2/* Date: 20220930(AAAAMMDD) */
3
4#ifndef DINAMO_H_INCLUDED
5#define DINAMO_H_INCLUDED
6
13#ifdef _WIN32
14 #include <windows.h>
15#endif
16
17#include <time.h>
18
28#ifdef _WIN32
29 typedef unsigned __int64 ND_uint64_t;
30 typedef unsigned __int64 ND_OATH_uint64_t;
31 #define AAP_API __stdcall
32
33 typedef unsigned long long int QWORD;
34 #define DWORD_PRINT_TYPE "lu"
35 #define DWORD_PRINT "%" DWORD_PRINT_TYPE
36#else
37 typedef unsigned long long ND_uint64_t;
38 typedef unsigned long long ND_OATH_uint64_t;
39 #ifdef INTEL_GCC
40 #define AAP_API __attribute__((stdcall))
41 #else
42 #define AAP_API
43 #endif /* INTEL_GCC */
44
45 typedef unsigned char BYTE;
46 typedef unsigned int DWORD;
47 typedef unsigned long long int QWORD;
48 typedef unsigned short WORD;
49 typedef int BOOL;
50 typedef unsigned int UINT;
51 typedef signed int INT;
52 typedef signed char CHAR;
53
54 #define DWORD_PRINT_TYPE "u"
55 #define DWORD_PRINT "%" DWORD_PRINT_TYPE
56
57 #ifndef FALSE
58 #define FALSE (0)
59 #endif
60 #ifndef TRUE
61 #define TRUE (1)
62 #endif
63
64#endif
65
66typedef unsigned long DN_ULONG;
67
68typedef void *HSESSIONCTX;
69typedef void *HHASHCTX;
70typedef void *HKEYCTX;
71typedef void *HCERTCTX;
72typedef void *HSPBCTX;
73typedef void *HCHAPCTX;
74typedef void *HLOGCTX;
75typedef void *HOBJMETACTX;
76typedef void *HP11ATTRCTX;
77typedef void *HOBJMETASEARCHCTX;
78
79
80/* Client network errors. Negative errors. */
81
82#define D_SOCKET_FAILED (-10)
83#define D_GETHOSTNAME_FAILED (-11)
84#define D_CONNECT_FAILED (-12)
85#define D_SEND_FAILED (-13)
86#define D_RECV_FAILED (-14)
87#define D_INVALID_PACKAGE_SIZE (-15)
88#define D_SETSOCKOPT_FAILED (-16)
89#define D_GETSOCKOPT_FAILED (-17)
90#define D_ALL_LOAD_BALANCE_HSM_FAILED (-18)
91
92/* OpenSSL generated errors 1 to 100 */
93
94#define D_SSL_CTX_NEW_FAILED (1)
95#define D_SSL_NEW_FAILED (2)
96#define D_SSL_CONNECT_FAILED (3)
97#define D_SSL_GENERAL_ERROR (4)
98
99/* External communication generated errors 101 to 200 */
100
101#define D_CRL_GENERAL_ERROR (101)
102#define D_CRL_SSL_CACERT_BADFILE (102)
103#define D_CRL_COULDNT_RESOLVE_HOST (103)
104#define D_CRL_COULDNT_CONNECT (104)
105#define D_CRL_OPERATION_TIMEDOUT (105)
106#define D_CRL_PEER_FAILED_VERIFICATION (106)
107#define D_CRL_SSL_CONNECT_ERROR (107)
108#define D_CRL_SEND_ERROR (108)
109#define D_CRL_RECV_ERROR (109)
110#define D_CRL_SSL_CERTPROBLEM (110)
111#define D_CRL_SSL_ISSUER_ERROR (111)
112#define D_CRL_AUTH_ERROR (112)
113#define D_CRL_GOT_NOTHING (113)
114#define D_CRL_UNSUPPORTED_PROTOCOL (114)
115#define D_CRL_URL_MALFORMAT (115)
116#define D_CRL_WEIRD_SERVER_REPLY (116)
117#define D_CRL_REMOTE_ACCESS_DENIED (117)
118#define D_CRL_HTTP2 (118)
119#define D_CRL_WRITE_ERROR (119)
120#define D_CRL_READ_ERROR (120)
121#define D_CRL_HTTP_POST_ERROR (121)
122#define D_CRL_ABORTED_BY_CALLBACK (122)
123#define D_CRL_TOO_MANY_REDIRECTS (123)
124#define D_CRL_SSL_CIPHER (124)
125#define D_CRL_BAD_CONTENT_ENCODING (125)
126#define D_CRL_LOGIN_DENIED (126)
127#define D_CRL_INSTALL_SIGN_CALL_FAILED (127)
128#define D_CRL_CERT_LOAD_FAILED (128)
129#define D_CRL_CHAIN_LOAD_FAILED (129)
130#define D_CRL_PRIVATE_KEY_LOAD_FAILED (130)
131
132/* System errors */
133
134#define D_WSASTARTUP (2001)
135#define D_MEMORY_ALLOC (2002)
136
137
138/* Client errors */
139
140#define D_INVALID_PARAM (1001)
141#define D_INVALID_TYPE (1002)
142#define D_INVALID_STATE (1003)
143#define D_LOGGING_NOT_STARTED (1004)
144#define D_MORE_DATA (1005)
145#define D_INVALID_RESPONSE (1006)
146#define D_INVALID_CONTEXT (1007)
147#define D_KEY_GEN_ERROR (1008)
148#define D_KEY_DEL_ERROR (1009)
149#define D_KEY_NOT_EXISTS (1010)
150#define D_INVALID_DATA_LENGTH (1011)
151#define D_INVALID_KEY_ALG (1012)
152#define D_INVALID_PADDING (1013)
153#define D_INVALID_KEY (1014)
154#define D_BAD_DATA (1015)
155#define D_INVALID_PUBKEY (1016)
156#define D_INVALID_ALG_ID (1017)
157#define D_INVALID_HASH (1018)
158#define D_INIT_HASH_FAILED (1019)
159#define D_INVALID_HASH_STATE (1020)
160#define D_END_HASH_FAILED (1021)
161#define D_GET_INFO_ERROR (1022)
162#define D_INVALID_PIN_LEN (1023)
163#define D_OPEN_FILE_FAILED (1025)
164#define D_BACKUP_FAILED (1026)
165#define D_RESTORE_FAILED (1027)
166#define D_INVALID_CALLBACK (1028)
167#define D_NOT_IMPLEMENTED (1029)
168#define D_AUTH_FAILED (1030)
169#define D_INVALID_CLEAR_OP (1031)
170#define D_CHANGE_PWD_ERROR (1032)
171#define D_PWD_SIZE_ERROR (1033)
172#define D_IMPORT_KEY_ERROR (1034)
173#define D_INVALID_KEY_ID (1035)
174#define D_INVALID_FLAG (1036)
175#define D_INVALID_SIGNATURE (1037)
176#define D_INVALID_PUB_KEY (1038)
177#define D_INVALID_KEY_STATE (1039)
178#define D_CREATE_USER_ERROR (1040)
179#define D_NO_MORE_OBJECT (1041)
180#define D_PUT_ENV_VAR_FAILED (1042)
181#define D_INVALID_FILE_SIZE (1043)
182#define D_INVALID_TEXT_SIZE (1044)
183#define D_FILE_ACCESS_ERROR (1045)
184#define D_INVALID_COUNTER (1046)
185#define D_INVALID_MODE (1047)
186#define D_INVALID_STRUCT_ID (1048)
187#define D_INVALID_IP_ADDRESS (1049)
188#define D_GET_PEER_IP_ERROR (1050)
189#define D_CERTIFICATE_PARSE_FAILED (1051)
190#define D_INVALID_KEY_PART_1 (1052)
191#define D_INVALID_KEY_PART_2 (1053)
192#define D_INVALID_KEY_PART_3 (1054)
193#define D_VERIFY_DAC_FAILED (1055)
194#define D_DEPRECATED (1056)
195#define D_NO_MATCHING_KEY_FOUND (1057)
196#define D_CALLBACK_ERROR (1058)
197#define D_INTERNAL_ERROR (1059)
198#define D_KEY_NOT_EXPORTABLE_ERROR (1060)
199
200#define D_INVALID_SPB_ID (1062)
201#define D_JSON_PARSE_ERROR (1063)
202#define D_JSON_PARSE_WRONG_TYPE_ERROR (1064)
203#define D_JSON_SET_VALUE_ERROR (1065)
204#define D_JSON_UNSET_VALUE_ERROR (1066)
205#define D_JSON_VALUE_NOT_FOUND (1067)
206#define D_JSON_OBJ_CREATE_ERROR (1068)
207
208#define D_SLP_PARSE_ERROR (1069)
209#define D_SLP_INTERNAL_ERROR (1070)
210#define D_SLP_TOO_MANY_SERVERS_ERROR (1071)
211
212#define D_INVALID_SERVER_VERSION (1072)
213
214#define D_GENERATE_PKCS12_ERROR (1073)
215#define D_SET_LOAD_BALANCE_LIST_ERROR (1074)
216
217#define D_OATH_BLOB_UPDATE (1075)
218#define D_GZIP_DEFLATE_ERROR (1076)
219#define D_HTTP_UNEXPECTED_STATUS_CODE (1077)
220#define D_BASE64_ERROR (1078)
221
222#define D_SC_READER_NOT_READY (1079)
223#define D_SC_NOT_FORMATTED (1080)
224#define D_SC_INVALID_PIN (1081)
225#define D_SC_READ_FAILED (1082)
226#define D_SC_UNEXPECTED_SVMK_STATUS (1083)
227#define D_SC_FAILED_USB_LIB_LOAD (1084)
228
229/* Server errors */
230
231#define D_KEEP_ALIVE_ERROR (3001)
232#define D_RECEIVE_LOG_ERROR (3002)
233#define D_ERROR_NOTIFY (3003)
234
235
236/* Server returned errors */
237
238#define D_SUCCESS (0)
239#define D_ERR_UNKNOWN (5000)
240#define D_ERR_NET_FAIL (5001)
241#define D_ERR_ACCESS_DENIED (5002)
242#define D_ERR_CANNOT_CREATE_OBJ (5003)
243#define D_ERR_CANNOT_OPEN_OBJ (5004)
244#define D_ERR_CANNOT_DEL_OBJ (5005)
245#define D_ERR_CANNOT_ALLOC_RES (5006)
246#define D_ERR_INVALID_CTX (5007)
247#define D_ERR_INVALID_OPERATION (5008)
248#define D_ERR_INVALID_KEY (5009)
249#define D_ERR_NO_TLS_USED (5010)
250#define D_ERR_CANNOT_CHANGE_PWD (5011)
251#define D_ERR_OBJ_NOT_EXPORTABLE (5012)
252#define D_ERR_USR_ALREADY_EXISTS (5013)
253#define D_ERR_INVALID_USR_NAME (5014)
254#define D_ERR_CANNOT_CREATE_USR (5015)
255#define D_ERR_NO_MORE_LOG_SLOTS (5016)
256#define D_ERR_CANNOT_DELETE_USR (5017)
257#define D_ERR_CANNOT_DELETE_MASTER (5018)
258#define D_ERR_NOT_IMPLEMENTED (5019)
259#define D_ERR_USR_NOT_FOUND (5020)
260#define D_ERR_INVALID_PAYLOAD (5021)
261#define D_ERR_OBJ_ALREADY_EXISTS (5022)
262#define D_ERR_INVALID_OBJ_NAME (5023)
263#define D_ERR_OBJ_IN_USE (5024)
264#define D_ERR_CANNOT_WRITE_BACKUP_BLOB (5025)
265#define D_ERR_CANNOT_OPEN_BACKUP_BLOB (5026)
266#define D_ERR_CANNOT_RESTORE_BACKUP_BLOB (5027)
267#define D_ERR_INVALID_BACKUP_PIN_OR_LEN (5028)
268#define D_ERR_INVALID_XML_SIGNATURE (5029)
269#define D_ERR_INVALID_CERTIFICATE (5030)
270#define D_ERR_VERIFY_XML_FAILED (5031)
271#define D_ERR_INVALID_XML (5032)
272#define D_ERR_SIGN_XML_FAILED (5033)
273#define D_ERR_UPACK_VERIFY_FAILED (5034)
274#define D_ERR_CANNOT_TRUNCATE_LOG (5035)
275#define D_ERR_CANNOT_BACKUP_OLD_LOG (5036)
276#define D_ERR_CERTIFICATE_EXPIRED (5037)
277#define D_ERR_CERTIFICATE_FAILED (5038)
278#define D_ERR_CERTIFICATE_NOT_FOUND (5039)
279#define D_ERR_CERTIFICATE_REVOKED (5040)
280#define D_ERR_CERTIFICATE_ISSUER_FAILED (5041)
281#define D_ERR_CERTIFICATE_NOT_YET_VALID (5042)
282#define D_ERR_CERT_EXPIRED_SIGN_VALID (5043)
283#define D_ERR_CRL_EXPIRED (5044)
284#define D_ERR_INVALID_CRL_SIGN (5045)
285#define D_ERR_CRL_CERT_MISMATCH (5046)
286#define D_ERR_CERT_REVOKED (D_ERR_CERTIFICATE_REVOKED)
287#define D_ERR_CERT_REVOKED_LIBCLIENT_FIX1 (5047)
288#define D_ERR_ACCESS_DENIED_TOKEN_NOT_NEEDED (5048)
289#define D_ERR_ACCESS_DENIED_TOKEN_NEEDED (5049)
290#define D_ERR_CERT_REVOKED_CRL_VAL_UNUSED (5050)
291#define D_ERR_CERT_VALID_CRL_VAL_UNUSED (5051)
292#define D_ERR_CANNOT_PARSE_XML (5052)
293#define D_ERR_CANNOT_CREATE_XML_SIG_TEMPL (5053)
294#define D_ERR_CANNOT_ADD_XML_SIG_TEMPL_REF (5054)
295#define D_ERR_CANNOT_ADD_XML_SIG_TEMPL_TRANS (5055)
296#define D_ERR_CANNOT_ADD_XML_SIG_KEY_INFO (5056)
297#define D_ERR_CANNOT_ADD_XML_SIG_KEY_CERT (5057)
298#define D_ERR_CANNOT_ALLOC_XML_SIG_CTX (5058)
299#define D_ERR_CANNOT_PARSE_DER_PRIV_KEY (5059)
300#define D_ERR_XML_CANNOT_LOAD_PRIV_KEY (5060)
301#define D_ERR_XML_CANNOT_LOAD_CERT (5061)
302#define D_ERR_XML_CANNOT_CREATE_KEY_MNG (5062)
303#define D_ERR_XML_CANNOT_INIT_KEY_MNG (5063)
304#define D_ERR_XML_CANNOT_LOAD_TRUSTED_CERTS (5064)
305#define D_ERR_XML_SIG_NODE_NOT_FOUND (5065)
306#define D_ERR_XML_CERT_NODE_NOT_FOUND (5066)
307#define D_ERR_XML_CANNOT_DECODE_CERT_NODE (5067)
308#define D_ERR_CANNOT_PARSE_DER_CERT (5068)
309#define D_ERR_DEPRECATED_XML_COMPRESS (5069)
310#define D_ERR_INVALID_CERTIFICATE_NULL_RES (5070)
311#define D_ERR_CANNOT_RECREATE_MASTER (5071)
312#define D_ERR_CANNOT_CREATE_USR_STORAGE1 (5072)
313#define D_ERR_CANNOT_CREATE_USR_STORAGE2 (5073)
314#define D_ERR_CANNOT_CREATE_USR_DEFAULT_ACL (5074)
315#define D_ERR_CANNOT_ALLOC_CTX (5075)
316#define D_ERR_CANNOT_LOAD_PRIV_KEY (5076)
317#define D_ERR_CANNOT_DECODE_PUB_KEY (5077)
318#define D_ERR_CANNOT_GENERATE_RND_DATA (5078)
319#define D_ERR_CACHE_LAYER_EXHAUSTED (5079)
320#define D_ERR_RSA_POWER_SIGN_FAILED (5080)
321#define D_ERR_CANNOT_DEMOTE_MASTER (5081)
322#define D_ERR_CANNOT_GET_SYS_INFO (5100)
323#define D_ERR_CANNOT_ALLOC_UPACK_ID (5101)
324#define D_ERR_CANNOT_ALLOC_UPACK_PATH (5102)
325#define D_ERR_CANNOT_WRITE_UPACK_OBJ (5103)
326#define D_ERR_INVALID_CRL (5104)
327#define D_ERR_OPERATION_FAILED (5105)
328#define D_ERR_GET_USR_ACL_FAILED (5106)
329#define D_ERR_INVALID_SIGNATURE (5107)
330#define D_ERR_CANNOT_GENERATE_SOFT_TOKEN (5108)
331#define D_ERR_INVALID_SECRET (5109)
332#define D_ERR_ACCESS_DENIED_USR_BLOCKED (5120)
333#define D_ERR_INVALID_IMEI (5121)
334#define D_ERR_REPLAY_DETECTED (5122)
335#define D_ERR_NON_APPROVED_OPERATION (5123)
336#define D_ERR_ACCESS_DENIED_OBJ_BLOCKED (5124)
337#define D_ERR_DRBG_CONTINUOUS_TEST (5125)
338#define D_ERR_RSA_CONTINUOUS_TEST (5126)
339#define D_ERR_ECC_CONTINUOUS_TEST (5127)
340#define D_ERR_DES_CONTINUOUS_TEST (5128)
341#define D_ERR_AES_CONTINUOUS_TEST (5129)
342#define D_ERR_ALT_BN128_CONTINUOUS_TEST (5130)
343#define D_ERR_CANNOT_UPDATE_OBJ (5175)
344#define D_ERR_CANNOT_GET_PWD_POLICY (5176)
345#define D_ERR_PWD_BLOCKED_BY_POLICY (5177)
346#define D_ERR_PWD_EXPIRED (5178)
347#define D_ERR_CERT_VALID_CRL_VAL_UNUSED_CRL_EXPIRED (5179)
348#define D_ERR_CERT_VALID_CRL_EXPIRED (5180)
349#define D_ERR_INVALID_CERT_SIGN (5181)
350#define D_ERR_CANNOT_LOAD_CORRUPTED_OBJ (5200)
351#define D_ERR_INVALID_CERT_ISPB_MISMATCH (5230)
352#define D_ERR_INVALID_CA (5231)
353#define D_ERR_DEPRECATED_FUNCTION (5303)
354#define D_ERR_SERVER_BUSY (5304)
355#define D_ERR_SL_BE_BUSY (5305)
356#define D_ERR_SVMK_MISMATCH (5306)
357#define D_ERR_INVALID_CERT_SN_MISMATCH (5307)
358#define D_ERR_CANNOT_DEC_SYM_KEY (5308)
359#define D_ERR_CANNOT_REC_SYM_KEY (5309)
360#define D_SUCCESS_CANNOT_OPEN_OBJ_AT_REPL (5401)
361#define D_ERR_CANNOT_OPEN_INVALID_OBJ_AT_REPL (5402)
362#define D_ERR_CANNOT_SL_BE_CHECK_OBJ (5500)
363#define D_ERR_CANNOT_WRITE_AUTH_INFO_OBJ (5501)
364#define D_ERR_CANNOT_GEN_RSA_KEY (5502)
365#define D_ERR_CANNOT_GEN_ECC_CURVE (5503)
366#define D_ERR_CANNOT_GEN_ECC_KEY (5504)
367#define D_ERR_CANNOT_GEN_ECC_DER (5505)
368#define D_ERR_CANNOT_GEN_ECC_DER_KEY (5506)
369#define D_ERR_CANNOT_CREATE_UNKNOWN_OBJ (5507)
370#define D_ERR_CANNOT_WRITE_HSM_MODE (5508)
371#define D_ERR_CANNOT_WRITE_LOGIN_BLOCK_INFO (5509)
372#define D_ERR_CANNOT_SETUP_LIVE_SYNC_OBJ (5510)
373#define D_ERR_CANNOT_CREATE_LIVE_SYNC_OBJ (5511)
374#define D_ERR_CANNOT_OPEN_LOG (5512)
375#define D_ERR_COULD_NOT_OPEN_OBJ (5513)
376#define D_ERR_CANNOT_EXPORT_RAW_OBJ (5514)
377#define D_ERR_CANNOT_RENAME_OBJ (5515)
378#define D_ERR_REPLICATION_CANNOT_OPEN_OBJ (5516)
379#define D_ERR_CANNOT_SETUP_LIVE_SYNC_IMG (5517)
380#define D_ERR_CANNOT_LOAD_LIVE_SYNC_IMG (5518)
381#define D_ERR_CANNOT_SETUP_LIVE_SYNC_DEL_USR (5519)
382#define D_ERR_CANNOT_DEL_LIVE_SYNC_USR (5520)
383#define D_ERR_CANNOT_SETUP_LIVE_SYNC_DEL_CONFIG (5521)
384#define D_ERR_CANNOT_DEL_LIVE_SYNC_CONFIG (5522)
385#define D_ERR_CANNOT_SETUP_LIVE_SYNC_CONFIG (5523)
386#define D_ERR_CANNOT_CREATE_LIVE_SYNC_CONFIG (5524)
387#define D_ERR_CANNOT_SETUP_LIVE_SYNC_USER (5525)
388#define D_ERR_CANNOT_CREATE_LIVE_SYNC_USER (5526)
389#define D_ERR_CANNOT_SETUP_LIVE_SYNC_ACL (5527)
390#define D_ERR_CANNOT_CREATE_LIVE_SYNC_ACL (5528)
391#define D_ERR_CANNOT_DEL_AUTH_INFO_OBJ (5529)
392#define D_ERR_INVALID_KEY_NULL_RES (5530)
393#define D_ERR_INVALID_MSG_NULL_RES (5531)
394#define D_ERR_CANNOT_GEN_SYM_KEY (5532)
395#define D_ERR_CANNOT_SETUP_USR_AUTH_INFO (5533)
396#define D_ERR_CANNOT_BIND_USR_AUTH_INFO (5534)
397#define D_ERR_CANNOT_GET_CERT_SN (5535)
398#define D_ERR_CANNOT_GET_CERT_ISPB (5536)
399#define D_ERR_INVALID_HASH (5537)
400#define D_ERR_INVALID_SIG_LEN (5538)
401#define D_ERR_INVALID_PUBKEY_LEN (5539)
402#define D_ERR_INVALID_PSKC_XML (5540)
403#define D_ERR_CANNOT_FIND_PSKC_XML_NODE (5541)
404#define D_ERR_CANNOT_FIND_PSKC_XML_ATTR (5542)
405#define D_ERR_INVALID_PSKC_KEY_DERIVATION (5543)
406#define D_ERR_INVALID_PSKC_KEY_DERIVATION_IT (5544)
407#define D_ERR_INVALID_PSKC_KEY_DERIVATION_LEN (5545)
408#define D_ERR_INVALID_PSKC_KEY_DERIVATION_SALT_LEN (5546)
409#define D_ERR_PSKC_KEY_DERIVATION_FAILED (5547)
410#define D_ERR_INVALID_PSKC_KEY_ALG (5548)
411#define D_ERR_INVALID_PSKC_KEY_METHOD (5549)
412#define D_ERR_INVALID_OATH_EPOCH (5550)
413#define D_ERR_INVALID_OATH_TIMESTEP (5551)
414#define D_ERR_INVALID_OATH_DRIFT (5552)
415#define D_ERR_INVALID_PSKC_SECRET_LEN (5553)
416#define D_ERR_UNKNOWN_PADDING_TYPE (5554)
417#define D_ERR_DATA_TOO_LARGE_FOR_MODULUS (5555)
418#define D_ERR_DATA_GREATER_THAN_MODULUS_LEN (5556)
419#define D_ERR_PADDING_CHECK_FAILED (5557)
420#define D_ERR_DATA_TOO_LARGE_FOR_KEY_SIZE (5558)
421#define D_ERR_DATA_TOO_SMALL_FOR_KEY_SIZE (5559)
422#define D_ERR_INVALID_TYPE1_PADDING (5560)
423#define D_ERR_INVALID_TYPE2_PADDING (5561)
424#define D_ERR_BAD_FIXED_HDR_PADDING (5562)
425#define D_ERR_MISSING_NULL_PADDING (5563)
426#define D_ERR_BAD_PAD_BYTE_COUNT (5564)
427#define D_ERR_DATA_TOO_LARGE_FOR_PADDING (5565)
428#define D_ERR_BN_NO_INVERSE (5566)
429#define D_ERR_STATIC_BN_CANNOT_EXPAND (5567)
430#define D_ERR_BN_IS_NOT_PRIME (5568)
431#define D_ERR_TOO_MANY_BN_ITERATIONS (5569)
432#define D_ERR_BN_IS_NOT_A_SQUARE (5570)
433#define D_ERR_BN_DIV_BY_ZERO (5571)
434#define D_ERR_BN_NOT_INITIALIZED (5572)
435#define D_ERR_BN_INVALID_RANGE (5573)
436#define D_ERR_BN_BAD_RECIPROCAL (5574)
437#define D_ERR_BN_CALLED_WITH_EVEN_MODULUS (5575)
438#define D_ERR_BN_INPUT_NOT_REDUCED (5576)
439#define D_ERR_BN_TOO_MANY_TMP_VARIABLES (5577)
440#define D_ERR_BN_INVALID_LEN (5578)
441#define D_ERR_BN_ENCODING_ERROR (5579)
442#define D_ERR_INVALID_PUBLIC_EXP (5580)
443#define D_ERR_INVALID_SPB_HDR_LEN (5581)
444#define D_ERR_INVALID_SPB_HDR_VER (5582)
445#define D_ERR_INVALID_SPB_HDR_SPECIAL_TREATMENT (5583)
446#define D_ERR_INVALID_SPB_HDR_R0 (5584)
447#define D_ERR_INVALID_SPB_HDR_DST_ASYM_ALG (5585)
448#define D_ERR_INVALID_SPB_HDR_DST_SYM_ALG (5586)
449#define D_ERR_INVALID_SPB_HDR_SIGN_KEY_TYPE (5587)
450#define D_ERR_INVALID_SPB_HDR_DST_CA (5588)
451#define D_ERR_INVALID_SPB_HDR_SIGN_CA (5589)
452#define D_ERR_INVALID_SIGN_CERT_SN_MISMATCH (5590)
453#define D_ERR_INVALID_DST_CERT_SN_MISMATCH (5591)
454#define D_ERR_INVALID_SPB_MSG_LEN (5592)
455#define D_ERR_CANNOT_PARSE_JSON (5593)
456#define D_ERR_INVALID_SPB_CHARSET_SIG_OK (5594)
457#define D_ERR_JSON_MORE_DATA (5595)
458#define D_ERR_CANNOT_VIRTUALIZE_JSON (5596)
459#define D_ERR_CANNOT_CHANGE_OEM_JSON (5597)
460#define D_ERR_CANNOT_MERGE_JSON (5598)
461#define D_ERR_INVALID_SPB_CHARSET (5599)
462#define D_ERR_CANNOT_GET_JSON (5600)
463#define D_ERR_INVALID_SPB_CHARSET_SIG_ERR (5601)
464#define D_ERR_INVALID_SPB_DOMAIN (5602)
465#define D_ERR_CANNOT_GEN_DSA_KEY (5603)
466#define D_ERR_DSA_CONTINUOUS_TEST (5604)
467#define D_ERR_CANNOT_GEN_DH_KEY (5605)
468#define D_ERR_DH_CONTINUOUS_TEST (5606)
469#define D_ERR_SERVER_STARTED (5700)
470#define D_ERR_HSM_AUTO_TEST_FAILURE (5701)
471#define D_ERR_SERVER_NOT_STARTED (5702)
472#define D_ERR_UNAPPROVED_TSP_OPERATION (5703)
473#define D_ERR_INVALID_COLD_PARTITION_OPERATION (5704)
474#define D_ERR_OBJ_BLOCKED_BY_DS_POLICY (7000)
475#define D_ERR_TRUNCATING_DS_LOG (7001)
476#define D_ERR_THROTTLED_VM_SIZE (10000)
477#define D_ERR_THROTTLED_RAM (10001)
478#define D_ERR_CANNOT_ALLOC_SOCKET (11000)
479#define D_ERR_CANNOT_ALLOC_MEM (11001)
480#define D_ERR_CANNOT_ALLOC_KEY (11002)
481#define D_ERR_CANNOT_ALLOC_SL_BE_HANDLE (11003)
482#define D_ERR_CANNOT_ALLOC_IOM (11004)
483#define D_ERR_CANNOT_INIT_DRBG (11005)
484#define D_ERR_CANNOT_SEED_DRBG (11006)
485#define D_ERR_CANNOT_USE_IOM (11007)
486#define D_ERR_CANNOT_ALLOC_OBJ_HANDLE (11008)
487#define D_ERR_REPL_CANNOT_ALLOC_SL_BE_HANDLE (11009)
488#define D_ERR_CANNOT_ALLOC_TLS_CTX (11010)
489#define D_ERR_CANNOT_ALLOC_TLS_SOCKET (11011)
490#define D_ERR_CANNOT_SERIALIZE_XML (11012)
491#define D_ERR_CANNOT_ALLOC_BN (11013)
492#define D_ERR_CANNOT_ALLOC_JSON (11014)
493#define D_ERR_CRYPTOHW_OPEN_FAILURE (12001)
494#define D_ERR_CRYPTOHW_SETUP_FAILURE (12002)
495#define D_ERR_CRYPTOHW_READ_FAILURE (12003)
496#define D_ERR_CRYPTOHW_INVALID_CRC (12004)
497#define D_ERR_CRYPTOHW_WRITE_FAILURE (12005)
498#define D_ERR_CRYPTOHW_UNEXPECTED_MSG (12006)
499#define D_ERR_CRYPTOHW_CONNECT_FAILED (12007)
500#define D_ERR_CRYPTOHW_SEND_FAILED (12008)
501#define D_ERR_CRYPTOHW_RECV_FAILED (12009)
502#define D_ERR_REPLICATION_BUSY (36000)
503#define D_ERR_REPLICATION_D_BUSY (36001)
504#define D_ERR_REPLICATION_S_BUSY (36002)
505#define D_ERR_REPLICATION_STORAGE_LAYER_BUSY (36003)
506#define D_ERR_REPLICATION_SEC_LAYER_BUSY (36004)
507#define D_ERR_REPLICATION_PEER_NOT_SYNCED (36500)
508#define D_ERR_REPLICATION_CANNOT_PREPARE_TRANS (37001)
509#define D_ERR_REPLICATION_CANNOT_P2P_HANDSHAKE (37002)
510#define D_ERR_REPLICATION_CANNOT_P2P_FIND (37003)
511#define D_ERR_REPLICATION_CANNOT_P2P_CONNECT (37004)
512#define D_ERR_REPLICATION_CANNOT_P2P_SEND (37005)
513#define D_ERR_REPLICATION_CANNOT_P2P_RECV (37006)
514#define D_ERR_REPLICATION_CANNOT_P2P_SEND_ALL (37007)
515#define D_ERR_REPLICATION_CANNOT_P2P_RECV_ALL (37008)
516#define D_ERR_REPLICATION_CANNOT_P2P_SCONNECT (37009)
517#define D_ERR_REPLICATION_CANNOT_P2P_SSEND (37010)
518#define D_ERR_REPLICATION_CANNOT_P2P_SRECV (37011)
519#define D_ERR_REPLICATION_CANNOT_P2P_SSEND_ALL (37012)
520#define D_ERR_REPLICATION_CANNOT_P2P_SRECV_ALL (37013)
521#define D_ERR_REPLICATION_CANNOT_P2P_WORK (37014)
522#define D_ERR_REPLICATION_NOT_FOUND (37015)
523#define D_ERR_REPLICATION_ACK_NOT_FOUND (37016)
524#define D_ERR_REPLICATION_INVALID_OPERATION (37017)
525#define D_ERR_REPLICATION_INVALID_EVENT (37018)
526#define D_ERR_REPLICATION_OPERATION_FAILED (37019)
527#define D_ERR_REPLICATION_COMMIT_FAILED (37020)
528#define D_ERR_REPLICATION_ERASE_FAILED (37021)
529#define D_ERR_REPLICATION_INQUIRE_FAILED (37022)
530#define D_ERR_REPLICATION_UPDATE_ACK_FAILED (37023)
531#define D_ERR_REPLICATION_DISPATCH_FAILED (37024)
532#define D_ERR_REPLICATION_CANNOT_SL_BE_TRANSP (37025)
533#define D_ERR_REPLICATION_CANNOT_PRUNE_LOG (37026)
534#define D_ERR_REPLICATION_CANNOT_LOAD_LOG (37027)
535#define D_ERR_REPLICATION_CANNOT_WORK (37028)
536#define D_ERR_REPLICATION_CANNOT_VALIDATE_EVENT (37029)
537#define D_ERR_REPLICATION_TRANS_MISMATCH (37030)
538#define D_ERR_REPLICATION_CANNOT_SYNC_POINT (37031)
539#define D_ERR_REPLICATION_UNDEFINED_LIVE_SYNC (37032)
540#define D_ERR_REPLICATION_CONNECTED_LIVE_SYNC (37033)
541#define D_ERR_REPLICATION_SELF_LIVE_SYNC (37034)
542#define D_ERR_REPLICATION_OBJ_IN_USE (37035)
543#define D_ERR_REPLICATION_CANNOT_BEGIN_TRANS (37036)
544#define D_ERR_REPLICATION_MAX_NODE_COUNT_REACHED (37037)
545#define D_ERR_REPL_CANNOT_PREPARE_LS_TRANS (37038)
546#define D_ERR_REPL_PART_CANNOT_ADD_LOG (37039)
547#define D_ERR_REPL_COOR_CANNOT_ADD_LOG (37040)
548#define D_ERR_CANNOT_LOAD_DEPRECATED_LICENSE (47000)
549#define D_ERR_INVALID_DEPRECATED_LICENSE (47001)
550#define D_ERR_DEPRECATED_LICENSE_EXPIRED (47002)
551#define D_ERR_DEPRECATED_LICENSE_BLOCKED (47003)
552
553// -------------------------------------------------------------------
554
555
556
557/* Server error macros */
558
559#define D_IS_REPL_BUSY_ERR(dw) ( \
560 (DWORD)(dw) == (DWORD) D_ERR_REPLICATION_BUSY || \
561 (DWORD)(dw) == (DWORD) D_ERR_REPLICATION_D_BUSY || \
562 (DWORD)(dw) == (DWORD) D_ERR_REPLICATION_S_BUSY || \
563 (DWORD)(dw) == (DWORD) D_ERR_REPLICATION_STORAGE_LAYER_BUSY || \
564 (DWORD)(dw) == (DWORD) D_ERR_REPLICATION_SEC_LAYER_BUSY \
565 )
566
567
568
569
570#define NOT_LISTED_ERROR (-999999)
571
572/* DOpenSession - Options/parameters */
573
574/* dwParam */
575#define SS_ANONYMOUS (0x00000001) /*pbData == AUTH_PWD ou AUTH_PWD_EX*/
576#define SS_USER_PWD (0x00000002) /*pbData == AUTH_PWD*/
577#define SS_CERTIFICATE (0x00000004) /*pbData == SS_MEDIA_FILE*/
578#define SS_CLUSTER (0x00000008) /*pbData == NULL*/
579#define SS_USR_PWD_EX (0x00000010) /*pbData == AUTH_PWD_EX*/
580#define SS_ATOKEN (0x00000020) /*pbData == AUTH_ATOKEN*/
581#define SS_HTTP (0x00000040) /*pbData == AUTH_HTTP*/
582#define SS_WIN_CREDENTIAL (0x00000080) /*pbData == AUTH_WIN_CREDENTIAL*/
583
584/* dwFlags */
585#define ENCRYPTED_CONN (0x00000001) /* Encrypted communication */
586#define USER_INTERACTIVE (0x00000002) /* User interactive. Not implemented. */
587#define CLEAR_CONN (0x00000004) /* Not encrypted communication */
588#define LB_BYPASS (0x00000008) /* Load balance bypass */
589#define CACHE_BYPASS (0x00000010) /* Session Cache bypass */
590#define DS_BYPASS (0x00000020) /* Dinamo Services bypass */
591
592/* Strong authentication */
593
594#define SA_AUTH_NONE (0x00000000) /* No strong authentication */
595#define SA_AUTH_OTP (0x00000001) /* OTP authentication */
596#define SA_AUTH_CERTIFICATE (0x00000002) /* Certificate authentication */
597
598/* Modos de operação do HSM */
599
600#define DN_HSM_OP_NRM (0)
601#define DN_HSM_OP_RM1 (1)
602#define DN_HSM_OP_RM2 (2)
603#define DN_HSM_OP_RM3 (3)
605/* SetSessionParam/GetSessionParam */
606
607/* dwParam */
608#define SP_SESSION_TIMEOUT (0x00000001) /* Time-out sessao pbData == dwTimeout (ms) */
609#define SP_SEND_TIMEOUT (0x00000002) /* Time-out send pbData == dwTimeout (ms) */
610#define SP_RECV_TIMEOUT (0x00000004) /* Time-out recv pbData == dwTimeout (ms) */
611#define SP_ENCRYPTED (0x00000008) /* Read-only pbData == bSessionEncrypted (TRUE/FALSE) */
612#define SP_SESSION_ID (0x00000010) /* Read-only pbData == dwSessionId */
613#define SP_SESSION_CID (0x00000020) /* Read-only pbData == DWORD */
614#define SP_SESSION_TYPE (0x00000040) /* Read-only pbData == DWORD */
615#define SP_SESSION_CIPHER (0x00000080) /* Read-only pbData == char * */
616#define SP_SESSION_PIX_HTTP_RET (0x00000100) /* Read-only pbData == long */
617#define SP_SESSION_PIX_HTTP_REQ_DETAILS (0x00000200) /* Read-only pbData == PIX_HTTP_REQUEST_DETAILS */
618#define SP_HSM_OP_MODE (0x00000400) /* Read-only pbData == DWORD (DN_HSM_OP_NRM ...)*/
619
620/* SP_SESSION_TYPE */
621
622#define SP_SESSION_TYPE_CLEAR_CONN (1)
623#define SP_SESSION_TYPE_SSL2 (2)
624#define SP_SESSION_TYPE_SSL3 (3)
625#define SP_SESSION_TYPE_TLS1 (4)
626#define SP_SESSION_TYPE_TLS1_1 (5)
627#define SP_SESSION_TYPE_TLS1_2 (6)
628#define SP_SESSION_TYPE_UNKNOWN (7)
629
630
631/* CloseSession */
632
633/* dwFlags */
634#define WAIT_OPERATIONS (0x00000004) /* Wait the end of all operations in progress. Not implemented. */
635#define CLOSE_PHYSICALLY (0x00000008) /* Force the end of the connection with the HSM. Session will not be cached. */
636
637/* DDSBindHSM */
638
639#define D_DS_BIND_VERSION (1)
640#define D_MAX_DS_BIND_URL (255)
641#define D_DS_BIND_PSK_LEN (16)
642#define D_MIN_DS_BIND_B62_ID (1)
643#define D_MAX_DS_BIND_B62_ID (22)
644
645/* DBackupObject */
646
647#define D_BACKUP_OBJ (1)
648#define D_RESTORE_OBJ (2)
649
650#define D_MAX_BACKUP_OBJ_LEN (1024*4)
651
652/* Backup */
653
654#define MAKE_BACKUP (0)
655#define MAKE_RESTORE (1)
656#define MAKE_RESTORE_WITH_NET_CONFIG MAKE_RESTORE
657#define MAKE_RESTORE_WITHOUT_NET_CONFIG (2)
658#define MAKE_USE_WIN_CREDENTIAL (0x80000000)
660/* GetHsmData/SetHsmData */
661
662/* dwParam */
663#define HD_AUDIT_START (0x00000001) /* Indicate that the connection will be used to retrieve logs. */
664#define HD_AUDIT_RECV (0x00000002) /* Receive logs from server. */
665
666/* dwFlags */
667#define DATA_ONLY (0x00000008) /* Backup/Restore only data */
668#define CONFIG_ONLY (0x00000010) /* Backup/Restore only configurations*/
669
670
671/* GetHsmConfig/SetHsmConfig */
672
673/* dwParam*/
674#define HC_PASS_PORT_VALUE (0x00000001) /* Monitoring port. pbData == wPortNumber */
675#define HC_PASS_PORT_ENABLE (0x00000002) /* Enable/disable monitoring port. pbData == bEnable */
676#define HC_MAX_CONNECT (0x00000004) /* Maximum connections (processing). pbData == dwMaxConnections */
677#define HC_MAX_MONITORING (0x00000008) /* Maximum connections (monitoring). pbData == dwMaxConnections */
678#define HC_PERMISSION_IP (0x00000010) /* Clients IP list. pbData == szIPList (xxx.xxx.xxx.xxx;xxx...) */
679
680/* dwFlags */
681#define ENABLE_VALUES (0x00000020) /* Enable values indicated by pbData. */
682#define DISABLE_VALUES (0x00000040) /* Disable values indicated by pbData. */
683
684
685/* DAdmOperation */
686
687/* dwParam */
688#define AO_SHUTDOWN (1) /* Shutdown HSM. pbData == NULL */
689#define AO_RESTART (2) /* Restart HSM services. pbData == NULL */
690#define AO_KEEPALIVE (4) /* Keep session alive. */
691#define AO_SET_DATE_TIME (8) /* Set the HSM's time and date. pbData == struct tm (time.h) */
692#define AO_ADD_CLUSTER_LIST (16) /* DEPRECATED! */
693#define AO_DEL_CLUSTER_LIST (18) /* DEPRECATED! */
694#define AO_GET_CLUSTER_LIST (20) /* DEPRECATED! */
695#define AO_RST_CLUSTER_LIST (24) /* DEPRECATED! */
696#define AO_SET_PWD_SEC_POLICY (25) /* Define password security policies. */
697#define AO_GET_PWD_SEC_POLICY (32) /* Recover password security policies. */
698#define AO_REPL_UPDATE (33) /* Process an update replication command. pbData == NULL */
699#define AO_REPL_NODE_MESSAGE (34) /* Send comands to the HSM's replication subsystem. pbData == *REPL_NODE_MSG */
700#define AO_LOG_CACHE_STATE (35) /* Get cache log state. pbData == *DWORD */
701#define AO_LOG_CACHE_ENABLE (36) /* Enable log cache. pbData == NULL */
702#define AO_LOG_CACHE_DISABLE (37) /* Disable log cache. pbData == NULL */
703#define AO_SET_TLS_BUNDLE (38) /* Set TLS bundle. pbData == TLS_BUNDLE_INFO */
704
705#define AO_EFTD_ACTIVATE (39)
706#define AO_EFTD_DEACTIVATE (40)
707#define AO_EFTD_RESET_CONF (41)
708#define AO_EFTD_GET_CONF (42)
709#define AO_EFTD_SET_MSG_HEADER_LEN (43)
710#define AO_EFTD_SET_PIN_LEN (44)
711#define AO_GET_GLOBAL_OBJ_STATS (45)
712#define AO_GET_SEC_POLICY_GFLAGS (46)
713#define AO_SET_SEC_POLICY_GFLAGS (47)
715#define AO_KEEPALIVE_FLAG_NOISELESS ((DWORD) -2371)
716
717#define AO_LOG_CACHE_STATE_ENABLED (11)
718#define AO_LOG_CACHE_STATE_DISABLED (22)
719
720
721/*
722 AO_GET_SEC_POLICY_GFLAGS and AO_SET_SEC_POLICY_GFLAGS supported GFLAGS.
723*/
724
725#define DN_SEPOL_GF_ENABLE_HTTP_X509_SA (1 << 0)
726#define DN_SEPOL_GF_ENABLE_NSA_API_AUTH (1 << 1)
728//
729// Replication operation messages
730// to be used with AO_REPL_NODE_MESSAGE.
731//
732#define RNM_PROBE (1)
733#define RNM_DOWN (2)
734#define RNM_SLP_BYPASS_ADD (3)
735#define RNM_SLP_BYPASS_DEL (4)
736
737#define DN_EFTD_DEFAULT_USER "eftd0"
738#define DN_EFTD_MIN_MSG_HEADER_LEN (1)
739#define DN_EFTD_MAX_MSG_HEADER_LEN (255)
740#define DN_EFTD_MIN_PIN_LEN (5)
741#define DN_EFTD_MAX_PIN_LEN (13)
743#define DN_EFTD_JSON_CONF_MSG_HDR_LEN "msg-hdr-len"
744#define DN_EFTD_JSON_CONF_PIN_LEN "pin-len"
745#define DN_EFTD_JSON_CONF_EFTD0_ACTIV "eftd0"
747/* SetUserParam/GetUserParam */
748
749/* dwParam */
750#define UP_USER_NAME (0x00000001) /* User name. pbData == szUserName */
751#define UP_AUTH_MASK (0x00000002) /* Authorization mask. pdData == dwAuthMask */
752#define UP_ACCESS_TYPE (0x00000004) /* Access type mask. pbData == dwAccessType */
753#define UP_CERTIFICATE (0x00000008) /* User certificate. pbData == pbCertificate */
754#define UP_PASSWORD (0x00000010) /* User password. pbData == pwd */
755#define UP_INVALID_LOGIN_ATTEMPTS (0x00000020) /* Amount of invalid login attempts. pbData == DWORD */
756#define UP_BLOCK_USR (0x00000040) /* Block user. == szUserName */
757#define UP_UNBLOCK_USR (0x00000080) /* Unblock user. == szUserName */
758#define UP_USR_PASSWORD (0x00000100) /* Re-define user password. == USER_INFO */
759#define UP_USR_PA_STATE (0x00000200) /* Partition autorization state. == USER_PA_INFO */
760#define UP_USR_OBJ_COUNT (0x00000400) /* User object count. == DN_USER_OBJ_COUNT */
761
762/* FindUser */
763
764/* dwFindType */
765#define FU_USER_ID (0x00000001) /* User ID pvFindParam == szUserId */
766#define FU_USER_NAME (0x00000002) /* User ID pvFindParam == szUserName */
767#define FU_AUTH_MASK (0x00000004) /* Authorization mask. pvFindParam == dwAuthMask */
768#define FU_ACCESS_TYPE (0x00000008) /* Access type. pvFindParam == dwAccessType */
769#define FU_ROOT_ID (0x00000010) /* Root certificate issuer. pvFindParam == szRootCN */
770
771/* dwFlags */
772#define PARTIAL_VALUE (0x00000080) /* pvFindParam contains part of the search value. */
773
774/* DGetHsmInfo */
775
776#define HI_BATTERY_LIFE (0x00000001) /* Battery remaining life time. pbData == tLife (time_t) */
777#define HI_PERFOMANCE_COUNT (0x00000002) /* Use percentage: CPU, Memory e disk. pbData == * PERFOMANCE_COUNT */
778#define HI_MODULE_INFO (0x00000004) /* Existing modules. pbData == * MODULE_INFO */
779#define HI_HSM_INFO (0x00000008) /* HSM's model and version. pbData == szHsmInfo */
780#define HI_OPERATIONS_COUNT (0x00000010) /* Operation counter. pbData == * OPERATIONS_INFO */
781#define HI_SYS_HEALTH (0x00000020) /* Elapsed time since last update and battery check. pbData == * SYS_HEALTH */
782#define HI_FIPS_MODE (0x00000040) /* Recover HSM's operation mode. pbData == *DWORD */
783#define HI_DISK_INFO (0x00000080) /* Recover HSM's disk usage information. pbData == *SYS_DISK_INFO */
784#define HI_REPL_INFO (0x00000100) /* Recover HSM's replication information. pbData == *SYS_REPL_INFO */
785#define HI_CURRENT_DATE (0x00000200) /* Recover HSM's date and time. pbData == *QWORD */
786#define HI_HW_STR (0x00000400) /* Recover HSM's date and time. pbData == *SYS_HW_STR_INFO */
787#define HI_NTP_INFO (0x00000800) /* Recover HSM's date and time. pbData == *SYS_NTP_INFO */
788#define HI_STATS_INFO (0x00001000) /* Recover HSM's statistics info. pbData == *SYS_STATUS_INFO */
789#define HI_COUNTER_INFO (0x00002000) /* Recover HSM's counter info. pbData == *SYS_COUNTER_INFO */
790#define HI_FIPS_RCODE_INFO (0x00004000) /* Recover HSM's Restrict Modes auto-test return code. pbData == *DWORD */
791#define HI_PENDING_INFO (0x00008000) /* Recover HSM's pending info. pbData == *SYS_PENDING_INFO */
792#define HI_ALL_INFO (0x00010000) /* Recover HSM's ALL info. pbData == *SYS_ALL_INFO */
793
794
795#define INVALID_OBJ_TYPE (0)
796
797#define MSGSH_NO_INFO (0xFFFFFFFF)
798
799
800#define GET_INFO_MAX_REPL_DOMAIN_NAME (1024)
801#define GET_INFO_MAX_REPL_NODES (255)
802#define GET_INFO_MAX_SN_LEN (255)
803#define GET_INFO_MAX_HW_STR_LEN (255)
804#define GET_INFO_MAX_TPKEY_LEN (16)
805#define GET_INFO_MAX_NTP_SVRS (16)
806#define GET_INFO_MAX_NTPQ_LEN (256)
807#define GET_INFO_MAX_NTP_KT_LEN (16)
808#define GET_INFO_MAX_NTP_KM_LEN (64)
809
810
811//Replication states returned by SYS_REPL_INFO structure.
812#define REPL_STATE_TWOPC_VIRTUAL (1)
813#define REPL_STATE_TWOPC_PREPARED (2)
814#define REPL_STATE_TWOPC_COMMITTED (3)
815#define REPL_STATE_TWOPC_COMMITTED_TM (4)
816
817//Replication events returned by SYS_REPL_INFO structure.
818#define REPL_EVENT_ET_NULL (1)
819#define REPL_EVENT_ET_CREATE_USR (2)
820#define REPL_EVENT_ET_DELETE_USR (3)
821#define REPL_EVENT_ET_CREATE_OBJ (4)
822#define REPL_EVENT_ET_DELETE_OBJ (5)
823#define REPL_EVENT_ET_DELETE_USR_OTP_AUTH_INFO (6)
824#define REPL_EVENT_ET_WRITE_USR_OTP_AUTH_INFO (7)
825#define REPL_EVENT_ET_UPDATE_USR_OTP_AUTH_INFO (8)
826#define REPL_EVENT_ET_CHANGE_USR_PWD (9)
827#define REPL_EVENT_ET_SET_USR_LOCK_COUNT (10)
828#define REPL_EVENT_ET_SET_GLOBAL_SEC_POLICY (11)
829#define REPL_EVENT_ET_SET_SYS_DATE_TIME (12)
830#define REPL_EVENT_ET_UPDATE_ACL (13)
831#define REPL_EVENT_ET_BLOCK_OBJ (14)
832#define REPL_EVENT_ET_UPDATE_OBJ (15)
833#define REPL_EVENT_ET_SET_USR_NS_AUTH_COOKIE (16)
834#define REPL_EVENT_ET_SET_USR_OTP_MOV_FACTOR (17)
835
836/* DListUserTrusts */
837
838#define OP_LST_USR_TRUSTERS (0x01) /* List users that permits the current logged user to access it's partition. */
839#define OP_LST_USR_TRUSTEES (0x02) /* List users that have permission to access the current logged user's partition. */
840
841
842/* DAssignToken/DUnassignToken */
843
844#define AT_GO3_TOKEN (1) /* DEPRECATED! */
845#define AT_OATH_TOKEN (2) /* Assign a OATH EVENT OTP token */
846#define AT_OATH_TOKEN_TOTP (3) /* Assign a OATH TIME OTP token */
847
848//
849// mod_OATH's NEW_SA; use with structure OATH_SA_v1.
850//
851#define MAX_OATH_HMAC_LEN (128) // up to hmac-sha512, in bytes
852
853#define OATH_SA_v1_type_SHA1 (0x01)
854#define OATH_SA_v1_HOTP_DYN_TRUNC_OFF (16)
855#define OATH_SA_v2_default_TIME_STEP (30)
856#define OATH_SA_v2_default_T0_Epoch (0)
857
858
859/* DOATHResync */
860
861#define OATH_MIN_HOTP_LEN (6 + 1) //plus 1 for the null terminator
862#define OATH_MAX_HOTP_LEN (16 + 1) //plus 1 for the null terminator
863
864/* DOATHGetBlobInfo */
865
866#define OATH_ISSUE_OATH_BLOB_t (1)
867#define OATH_ISSUE_OATH_INFO_t (2)
868
869
870/* DEncrypt/DDecrypt */
871
872#define D_NO_RSA_PADDING (3)
873#define D_FORCE_ACTUAL_RSA (4)
874
875
876/* DPKCS7Sign - Sign using PKCS#7 */
877
878#define TAC_MOD_CORE_P7_TEXT 0x0001
879#define TAC_MOD_CORE_P7_NOCERTS 0x0002
880#define TAC_MOD_CORE_P7_NOSIGS 0x0004
881#define TAC_MOD_CORE_P7_NOCHAIN 0x0008
882#define TAC_MOD_CORE_P7_NOINTERN 0x0010
883#define TAC_MOD_CORE_P7_NOVERIFY 0x0020
884#define TAC_MOD_CORE_P7_DETACHED 0x0040
885#define TAC_MOD_CORE_P7_BINARY 0x0080
886#define TAC_MOD_CORE_P7_NOATTR 0x0100
887#define TAC_MOD_CORE_P7_NOSMIMECAP 0x0200
888#define TAC_MOD_CORE_P7_NOOLDMIMETYPE 0x0400
889#define TAC_MOD_CORE_P7_CRLFEOL 0x0800
890#define TAC_MOD_CORE_P7_NOCRL 0x2000
891
892#define TAC_MOD_CORE_P7_COSIGN 0x80000000
893
894
895
896/* HASH algorithms */
897
898#define ALG_MD5 (1)
899#define ALG_SHA1 (2)
900#define ALG_SSL_SHA1_MD5 (3)
901#define ALG_SHA2_256 (4)
902#define ALG_SHA2_384 (5)
903#define ALG_SHA2_512 (6)
904#define ALG_SHA2_224 (7)
905#define ALG_SHA3_224 (8)
906#define ALG_SHA3_256 (9)
907#define ALG_SHA3_384 (10)
908#define ALG_SHA3_512 (11)
909
910#define ALG_IDENTITY_FUNC (255)
911
912/*
913 DSignXML/DSignXML2/DPIXSign hash mode options.
914*/
915#define ALG_MD5_InclC14N (1)
916#define ALG_SHA1_InclC14N (2)
917#define ALG_SHA256_InclC14N (3)
918#define ALG_SHA384_InclC14N (4)
919#define ALG_SHA512_InclC14N (5)
920#define ALG_SHA224_InclC14N (6)
921#define ALG_MD5_ExclC14N (31)
922#define ALG_SHA1_ExclC14N (32)
923#define ALG_MD5_InclC14NWithComments (33)
924#define ALG_SHA1_InclC14NWithComments (34)
925#define ALG_MD5_ExclC14NWithComments (35)
926#define ALG_SHA1_ExclC14NWithComments (36)
927#define ALG_SHA256_ExclC14N (37)
928#define ALG_SHA256_InclC14NWithComments (38)
929#define ALG_SHA256_ExclC14NWithComments (39)
930#define ALG_SHA384_ExclC14N (40)
931#define ALG_SHA384_InclC14NWithComments (41)
932#define ALG_SHA384_ExclC14NWithComments (42)
933#define ALG_SHA512_ExclC14N (43)
934#define ALG_SHA512_InclC14NWithComments (44)
935#define ALG_SHA512_ExclC14NWithComments (45)
936#define ALG_SHA224_ExclC14N (46)
937#define ALG_SHA224_InclC14NWithComments (47)
938#define ALG_SHA224_ExclC14NWithComments (48)
939
940/*
941 DSignXML2 flags
942*/
943
944
945#define XML_SIGN_FLAGS_FQN (1 << 31)
946#define XML_SIGN_FLAGS_NOL (1 << 30)
947#define XML_SIGN_FLAGS_NO_RNS (1 << 29)
948
949
950/*
951 DSignXML/DSignXML2 filter options
952*/
953
954#define XML_FILTER_NULL_URI "''"
955
956/*
957 DPIXSign flags
958*/
959
960#define PIX_SIGN_RNS (1)
961
962/* DPIXPost/DPIXGet/DPIXDelete */
963
964#define PIX_VERIFY_HOST_NAME (0x00000001)
965#define PIX_BASIC_HTTP_HEADER (0x00000002)
966#define PIX_GZIP (0x00000004)
967
968/*
969 DPIXJWSSign
970*/
971
972#define PIX_JWS_GEN_MAX_LEN (8*1024)
973
974#define MD5_LEN (16)
975#define SHA1_LEN (20)
976#define SSL_SHA1_MD5_LEN (36)
977#define SHA2_224_LEN (28)
978#define SHA2_256_LEN (32)
979#define SHA2_384_LEN (48)
980#define SHA2_512_LEN (64)
981#define CMAC_3DES_LEN (8)
982#define CMAC_AES_LEN (16)
983#define SHA3_224_LEN (28)
984#define SHA3_256_LEN (32)
985#define SHA3_384_LEN (48)
986#define SHA3_512_LEN (64)
987
988#define MAX_HASH_LEN (64)//SHA2_512_LEN
989
990/* Digital signature */
991
992#define NO_HASH_OID (1)
993#define MD5_HASH_OID (2)
994#define SHA_HASH_OID (3)
995#define SHA256_HASH_OID (4)
996#define SHA384_HASH_OID (5)
997#define SHA512_HASH_OID (6)
998#define SHA224_HASH_OID (7)
999
1000#define MD5_HASH_OID_LEN (18)
1001#define SHA_HASH_OID_LEN (15)
1002#define SHA224_HASH_OID_LEN (19)
1003#define SHA256_HASH_OID_LEN (19)
1004#define SHA384_HASH_OID_LEN (19)
1005#define SHA512_HASH_OID_LEN (19)
1006
1007/* DSignHash flags */
1008
1009#define DN_SIGN_NO_HASH_OID (0x01)
1010#define DN_SIGN_DISABLE_LEGACY_OPERATION (0x02)
1011#define DN_SIGN_ECC_P11_FMT (0x04)
1012
1013/* DVerifySignature flags */
1014
1015#define DN_VERIFY_NO_HASH_OID (0x01)
1016#define DN_VERIFY_ECC_P11_FMT (0x02)
1017
1018#define DN_SIG_EDDSA_MAX_DATA_LEN (4 * 1024 * 1024)
1019
1020/* Symmetric cryptography algorithms */
1021
1022#define ALG_DES (1)
1023#define ALG_3DES_112 (2) /* EDE */
1024#define ALG_3DES_168 (3) /* EDE */
1025#define ALG_DESX (91)
1026
1027#define ALG_AES_128 (7)
1028#define ALG_AES_192 (8)
1029#define ALG_AES_256 (9)
1030
1031#define ALG_ARC4 (10)
1032#define ALG_ARC5 (89)
1033
1034/* Symmetric key sizes (bytes) */
1035
1036#define ALG_DES_LEN (8)
1037#define ALG_DES3_112_LEN (16)
1038#define ALG_DES3_168_LEN (24)
1039
1040//Deprecated
1041#define DES_LEN (ALG_DES_LEN)
1042#define DES3_112_LEN (ALG_DES3_112_LEN)
1043#define DES3_168_LEN (ALG_DES3_168_LEN)
1044
1045#define ALG_DESX_LEN (24)
1046
1047#define ALG_AES_128_LEN (16)
1048#define ALG_AES_192_LEN (24)
1049#define ALG_AES_256_LEN (32)
1050
1051#define ALG_ARC4_LEN (16)
1052#define ALG_ARC5_LEN (16)
1053
1054/* Block sizes */
1055
1056#define DES_BLOCK (8)
1057#define DES3_BLOCK (8)
1058#define DESX_BLOCK (8)
1059#define AES_BLOCK (16)
1060#define AES_128_BLOCK (16)
1061#define AES_192_BLOCK (16)
1062#define AES_256_BLOCK (16)
1063#define ARC5_BLOCK (8)
1064
1065/* Operation modes */
1066
1067#define MODE_DEFAULT (0xFFFFFFFF)
1068#define MODE_NONE (0)
1069#define MODE_ECB (1 << 0)
1070#define MODE_CBC (1 << 1)
1071#define MODE_KWP (1 << 2)
1072#define MODE_OFB (1 << 3)
1073#define MODE_CTR (1 << 4)
1074#define MODE_GCM (1 << 5)
1075#define MODE_KW (1 << 6)
1077/* Operation directions */
1078
1079#define D_ENCRYPT (0 << 7)
1080#define D_DECRYPT (1 << 7)
1081
1082/* Asymmetric algorithms */
1083
1084#define ALG_RSA_512 (4)
1085#define ALG_RSA_1024 (5)
1086#define ALG_RSA_2048 (6)
1087#define ALG_RSA_4096 (11)
1088#define ALG_RSA_1152 (121)
1089#define ALG_RSA_1408 (122)
1090#define ALG_RSA_1536 (131)
1091#define ALG_RSA_1976 (130)
1092#define ALG_RSA_1984 (123)
1093#define ALG_RSA_8192 (124)
1094#define ALG_RSA_2304 (126)
1095#define ALG_RSA_2560 (127)
1096#define ALG_RSA_2816 (128)
1097#define ALG_RSA_3072 (129)
1098
1099#define ALG_DSA_2048 (150)
1100#define ALG_DSA_3072 (151)
1101
1102#define ALG_DH_RFC5114_2048 (152)
1103#define ALG_DH_RFC7919_2048 (153)
1104#define ALG_DH_RFC7919_3072 (154)
1105
1106#define ALG_OBJ_CSP (193)
1108#define ALG_ECX_ED25519 (201)
1109#define ALG_ECX_ED448 (202)
1110#define ALG_ECX_X25519 (203)
1111#define ALG_ECX_X448 (204)
1112
1113#define ALG_ECC_SECP112R1 (18) // SECG/WTLS curve over a 112 bit prime field
1114#define ALG_ECC_SECP112R2 (19) // SECG curve over a 112 bit prime field
1115#define ALG_ECC_SECP128R1 (20) // SECG curve over a 128 bit prime field
1116#define ALG_ECC_SECP128R2 (21) // SECG curve over a 128 bit prime field
1117#define ALG_ECC_SECP160K1 (22) // SECG curve over a 160 bit prime field
1118#define ALG_ECC_SECP160R1 (23) // SECG curve over a 160 bit prime field
1119#define ALG_ECC_SECP160R2 (24) // SECG/WTLS curve over a 160 bit prime field
1120#define ALG_ECC_SECP192K1 (25) // SECG curve over a 192 bit prime field
1121#define ALG_ECC_SECP192R1 (26) // NIST/X9.62/SECG curve over a 192 bit prime field
1122#define ALG_ECC_SECP224K1 (27) // SECG curve over a 224 bit prime field
1123#define ALG_ECC_SECP224R1 (28) // NIST/SECG curve over a 224 bit prime field
1124#define ALG_ECC_SECP256K1 (29) // SECG curve over a 256 bit prime field
1125#define ALG_ECC_SECP256R1 (30) // X9.62/SECG curve over a 256 bit prime field
1126#define ALG_ECC_SECP384R1 (31) // NIST/SECG curve over a 384 bit prime field
1127#define ALG_ECC_SECP521R1 (32) // NIST/SECG curve over a 521 bit prime field
1128#define ALG_ECC_X9_62_PRIME192V1 (ALG_ECC_SECP192R1)
1129#define ALG_ECC_X9_62_PRIME192V2 (33) // X9.62 curve over a 192 bit prime field
1130#define ALG_ECC_X9_62_PRIME192V3 (34) // X9.62 curve over a 192 bit prime field
1131#define ALG_ECC_X9_62_PRIME239V1 (35) // X9.62 curve over a 239 bit prime field
1132#define ALG_ECC_X9_62_PRIME239V2 (36) // X9.62 curve over a 239 bit prime field
1133#define ALG_ECC_X9_62_PRIME239V3 (37) // X9.62 curve over a 239 bit prime field
1134#define ALG_ECC_X9_62_PRIME256V1 (ALG_ECC_SECP256R1)
1135
1136#define ALG_ECC_BRAINPOOL_P160R1 (38) // RFC 5639 standard curves
1137#define ALG_ECC_BRAINPOOL_P160T1 (39)
1138#define ALG_ECC_BRAINPOOL_P192R1 (40)
1139#define ALG_ECC_BRAINPOOL_P192T1 (41)
1140#define ALG_ECC_BRAINPOOL_P224R1 (42)
1141#define ALG_ECC_BRAINPOOL_P224T1 (43)
1142#define ALG_ECC_BRAINPOOL_P256R1 (44)
1143#define ALG_ECC_BRAINPOOL_P256T1 (45)
1144#define ALG_ECC_BRAINPOOL_P320R1 (46)
1145#define ALG_ECC_BRAINPOOL_P320T1 (47)
1146#define ALG_ECC_BRAINPOOL_P384R1 (48)
1147#define ALG_ECC_BRAINPOOL_P384T1 (49)
1148#define ALG_ECC_BRAINPOOL_P512R1 (50)
1149#define ALG_ECC_BRAINPOOL_P512T1 (51)
1150
1151/* ECC bchain */
1152#define ALG_BLKC_BTC_MINI_KEY (1771)
1153#define ALG_BLKC_BIP32_SXPRIV (1772)
1154#define ALG_BLKC_BIP39_SXPRIV (1773)
1155#define ALG_BLKC_BIP32_XPRIV (1774)
1156#define ALG_BLKC_BIP32_ED25519_XPRIV (1775)
1157
1158/* blobs */
1159#define BLOB_TYPE (12)
1160#define ALG_OBJ_BLOB (12)
1161#define ALG_OBJ_BLOB_X509 (13)
1162#define ALG_OBJ_BLOB_PKCS7 (14)
1163#define ALG_OBJ_BLOB_CRL (15)
1164#define ALG_OBJ_BLOB_HOTP (16)
1165#define ALG_OBJ_BLOB_DPGO3 (17) /* TAC-PASS (Vasco Digipass GO3 Compatible) */
1166#define ALG_OBJ_MAP (90)
1167#define ALG_OBJ_EXT_MAP_2_OBJ (125)
1168
1169
1170/* Public key objects */
1171
1172#define ALG_OBJ_PUBKEY_BLOB (350)
1173#define ALG_OBJ_PUBKEY_RSA_BLOB (351) // pkcs1/oem
1174#define ALG_OBJ_PUBKEY_ECC_BLOB (352) // SubjectPublicKeyInfo
1175#define ALG_OBJ_PUBKEY_SPKI_RSA_BLOB (353) // SubjectPublicKeyInfo
1176#define ALG_OBJ_PUBKEY_ECC_Ed_BLOB (354) // SubjectPublicKeyInfo
1177#define ALG_OBJ_PUBKEY_ECC_X_BLOB (355) // SubjectPublicKeyInfo
1178#define ALG_OBJ_PUBKEY_DSA_BLOB (356) // SubjectPublicKeyInfo
1179#define ALG_OBJ_PUBKEY_DH_BLOB (357) // SubjectPublicKeyInfo
1180
1181/* HMAC objects */
1182
1183#define ALG_HMAC_MD5 (92)
1184#define ALG_HMAC_SHA1 (93)
1185#define ALG_HMAC_SHA2_256 (94)
1186#define ALG_HMAC_SHA2_384 (95)
1187#define ALG_HMAC_SHA2_512 (96)
1188#define ALG_HMAC_SHA2_224 (97)
1189#define ALG_HMAC_SHA3_224 (98)
1190#define ALG_HMAC_SHA3_256 (99)
1191#define ALG_HMAC_SHA3_384 (100)
1192#define ALG_HMAC_SHA3_512 (101)
1193
1194/* CMAC algorithms - DCreateHash Only */
1195
1196#define ALG_CMAC_AES (250)
1197#define ALG_CMAC_DES (251)
1198
1199
1200/* PKCS11 objects */
1201
1202#define ALG_PKCS11_MAP (120) // pkcs11 shell obj
1203
1204
1205
1206#define MAX_ALG_ID (ALG_OBJ_PUBKEY_SPKI_RSA_BLOB)
1207
1208
1209/* Public keys -> most significant bit of the DWORD must be set. */
1210
1211#define ALG_RSA_512_PUB (ALG_RSA_512 | 1 << 31)
1212#define ALG_RSA_1024_PUB (ALG_RSA_1024 | 1 << 31)
1213#define ALG_RSA_2048_PUB (ALG_RSA_2048 | 1 << 31)
1214#define ALG_RSA_4096_PUB (ALG_RSA_4096 | 1 << 31)
1215#define ALG_RSA_1152_PUB (ALG_RSA_1152 | 1 << 31)
1216#define ALG_RSA_1408_PUB (ALG_RSA_1408 | 1 << 31)
1217#define ALG_RSA_1536_PUB (ALG_RSA_1536 | 1 << 31)
1218#define ALG_RSA_1976_PUB (ALG_RSA_1976 | 1 << 31)
1219#define ALG_RSA_1984_PUB (ALG_RSA_1984 | 1 << 31)
1220#define ALG_RSA_8192_PUB (ALG_RSA_8192 | 1 << 31)
1221#define ALG_RSA_2304_PUB (ALG_RSA_2304 | 1 << 31)
1222#define ALG_RSA_2560_PUB (ALG_RSA_2560 | 1 << 31)
1223#define ALG_RSA_2816_PUB (ALG_RSA_2816 | 1 << 31)
1224#define ALG_RSA_3072_PUB (ALG_RSA_3072 | 1 << 31)
1225
1226#define ALG_ECX_ED25519_PUB (ALG_ECX_ED25519 | 1 << 31)
1227#define ALG_ECX_ED448_PUB (ALG_ECX_ED448 | 1 << 31)
1228#define ALG_ECX_X25519_PUB (ALG_ECX_X25519 | 1 << 31)
1229#define ALG_ECX_X448_PUB (ALG_ECX_X448 | 1 << 31)
1230
1231
1232#define ALG_ECC_SECP112R1_PUB (ALG_ECC_SECP112R1 | (1 << 31))
1233#define ALG_ECC_SECP112R2_PUB (ALG_ECC_SECP112R2 | (1 << 31))
1234#define ALG_ECC_SECP128R1_PUB (ALG_ECC_SECP128R1 | (1 << 31))
1235#define ALG_ECC_SECP128R2_PUB (ALG_ECC_SECP128R2 | (1 << 31))
1236#define ALG_ECC_SECP160K1_PUB (ALG_ECC_SECP160K1 | (1 << 31))
1237#define ALG_ECC_SECP160R1_PUB (ALG_ECC_SECP160R1 | (1 << 31))
1238#define ALG_ECC_SECP160R2_PUB (ALG_ECC_SECP160R2 | (1 << 31))
1239#define ALG_ECC_SECP192K1_PUB (ALG_ECC_SECP192K1 | (1 << 31))
1240#define ALG_ECC_SECP192R1_PUB (ALG_ECC_SECP192R1 | (1 << 31))
1241#define ALG_ECC_SECP224K1_PUB (ALG_ECC_SECP224K1 | (1 << 31))
1242#define ALG_ECC_SECP224R1_PUB (ALG_ECC_SECP224R1 | (1 << 31))
1243#define ALG_ECC_SECP256K1_PUB (ALG_ECC_SECP256K1 | (1 << 31))
1244#define ALG_ECC_SECP256R1_PUB (ALG_ECC_SECP256R1 | (1 << 31))
1245#define ALG_ECC_SECP384R1_PUB (ALG_ECC_SECP384R1 | (1 << 31))
1246#define ALG_ECC_SECP521R1_PUB (ALG_ECC_SECP521R1 | (1 << 31))
1247#define ALG_ECC_X9_62_PRIME192V1_PUB (ALG_ECC_SECP192R1_PUB)
1248#define ALG_ECC_X9_62_PRIME192V2_PUB (ALG_ECC_X9_62_PRIME192V2 | (1 << 31))
1249#define ALG_ECC_X9_62_PRIME192V3_PUB (ALG_ECC_X9_62_PRIME192V3 | (1 << 31))
1250#define ALG_ECC_X9_62_PRIME239V1_PUB (ALG_ECC_X9_62_PRIME239V1 | (1 << 31))
1251#define ALG_ECC_X9_62_PRIME239V2_PUB (ALG_ECC_X9_62_PRIME239V2 | (1 << 31))
1252#define ALG_ECC_X9_62_PRIME239V3_PUB (ALG_ECC_X9_62_PRIME239V3 | (1 << 31))
1253#define ALG_ECC_X9_62_PRIME256V1_PUB (ALG_ECC_SECP256R1_PUB)
1254
1255#define ALG_ECC_BRAINPOOL_P160R1_PUB (ALG_ECC_BRAINPOOL_P160R1 | (1 << 31))
1256#define ALG_ECC_BRAINPOOL_P160T1_PUB (ALG_ECC_BRAINPOOL_P160T1 | (1 << 31))
1257#define ALG_ECC_BRAINPOOL_P192R1_PUB (ALG_ECC_BRAINPOOL_P192R1 | (1 << 31))
1258#define ALG_ECC_BRAINPOOL_P192T1_PUB (ALG_ECC_BRAINPOOL_P192T1 | (1 << 31))
1259#define ALG_ECC_BRAINPOOL_P224R1_PUB (ALG_ECC_BRAINPOOL_P224R1 | (1 << 31))
1260#define ALG_ECC_BRAINPOOL_P224T1_PUB (ALG_ECC_BRAINPOOL_P224T1 | (1 << 31))
1261#define ALG_ECC_BRAINPOOL_P256R1_PUB (ALG_ECC_BRAINPOOL_P256R1 | (1 << 31))
1262#define ALG_ECC_BRAINPOOL_P256T1_PUB (ALG_ECC_BRAINPOOL_P256T1 | (1 << 31))
1263#define ALG_ECC_BRAINPOOL_P320R1_PUB (ALG_ECC_BRAINPOOL_P320R1 | (1 << 31))
1264#define ALG_ECC_BRAINPOOL_P320T1_PUB (ALG_ECC_BRAINPOOL_P320T1 | (1 << 31))
1265#define ALG_ECC_BRAINPOOL_P384R1_PUB (ALG_ECC_BRAINPOOL_P384R1 | (1 << 31))
1266#define ALG_ECC_BRAINPOOL_P384T1_PUB (ALG_ECC_BRAINPOOL_P384T1 | (1 << 31))
1267#define ALG_ECC_BRAINPOOL_P512R1_PUB (ALG_ECC_BRAINPOOL_P512R1 | (1 << 31))
1268#define ALG_ECC_BRAINPOOL_P512T1_PUB (ALG_ECC_BRAINPOOL_P512T1 | (1 << 31))
1269
1270/* Binary objects */
1271
1272#define ALG_OBJ_INVALID_TYPE (0)
1273#define ALG_OBJ_NULL (ALG_OBJ_INVALID_TYPE)
1274#define ALG_OBJ (12)
1275#define OBJ_BLOCK (1)
1276
1277
1278/* RSA module sizes */
1279#define RSA_512_LEN (64)
1280#define RSA_1024_LEN (128)
1281#define RSA_2048_LEN (256)
1282#define RSA_4096_LEN (512)
1283#define RSA_1152_LEN (144)
1284#define RSA_1408_LEN (176)
1285#define RSA_1536_LEN (192)
1286#define RSA_1976_LEN (247)
1287#define RSA_1984_LEN (248)
1288#define RSA_8192_LEN (1024)
1289#define RSA_2304_LEN (288)
1290#define RSA_2560_LEN (320)
1291#define RSA_2816_LEN (352)
1292#define RSA_3072_LEN (384)
1293
1294#define RSA_512_PUB_LEN (RSA_512_LEN * 2)
1295#define RSA_1024_PUB_LEN (RSA_1024_LEN * 2)
1296#define RSA_2048_PUB_LEN (RSA_2048_LEN * 2)
1297#define RSA_4096_PUB_LEN (RSA_4096_LEN * 2)
1298#define RSA_1152_PUB_LEN (RSA_1152_LEN * 2)
1299#define RSA_1408_PUB_LEN (RSA_1408_LEN * 2)
1300#define RSA_1536_PUB_LEN (RSA_1536_LEN * 2)
1301#define RSA_1976_PUB_LEN (RSA_1976_LEN * 2)
1302#define RSA_1984_PUB_LEN (RSA_1984_LEN * 2)
1303#define RSA_8192_PUB_LEN (RSA_8192_LEN * 2)
1304#define RSA_2304_PUB_LEN (RSA_2304_LEN * 2)
1305#define RSA_2560_PUB_LEN (RSA_2560_LEN * 2)
1306#define RSA_2816_PUB_LEN (RSA_2816_LEN * 2)
1307#define RSA_3072_PUB_LEN (RSA_3072_LEN * 2)
1308
1309#define MAX_RSA_PUB_LEN RSA_8192_PUB_LEN
1310#define MAX_RSA_LEN RSA_8192_LEN
1311
1312
1313/* ECC key sizes (bits) */
1314#define ECC_SECP112R1_LEN (112)
1315#define ECC_SECP112R2_LEN (112)
1316#define ECC_SECP128R1_LEN (128)
1317#define ECC_SECP128R2_LEN (128)
1318#define ECC_SECP160K1_LEN (160)
1319#define ECC_SECP160R1_LEN (160)
1320#define ECC_SECP160R2_LEN (160)
1321#define ECC_SECP192K1_LEN (192)
1322#define ECC_SECP192R1_LEN (192)
1323#define ECC_SECP224K1_LEN (224)
1324#define ECC_SECP224R1_LEN (224)
1325#define ECC_SECP256K1_LEN (256)
1326#define ECC_SECP256R1_LEN (256)
1327#define ECC_SECP384R1_LEN (384)
1328#define ECC_SECP521R1_LEN (521)
1329#define ECC_X9_62_PRIME192V1_LEN (ECC_SECP192R1_LEN)
1330#define ECC_X9_62_PRIME192V2_LEN (192)
1331#define ECC_X9_62_PRIME192V3_LEN (192)
1332#define ECC_X9_62_PRIME239V1_LEN (239)
1333#define ECC_X9_62_PRIME239V2_LEN (239)
1334#define ECC_X9_62_PRIME239V3_LEN (239)
1335#define ECC_X9_62_PRIME256V1_LEN (ECC_SECP256R1_LEN)
1336
1337#define ECC_BRAINPOOL_P160R1_LEN (160) // RFC 5639 standard curves
1338#define ECC_BRAINPOOL_P160T1_LEN (160)
1339#define ECC_BRAINPOOL_P192R1_LEN (192)
1340#define ECC_BRAINPOOL_P192T1_LEN (192)
1341#define ECC_BRAINPOOL_P224R1_LEN (224)
1342#define ECC_BRAINPOOL_P224T1_LEN (224)
1343#define ECC_BRAINPOOL_P256R1_LEN (256)
1344#define ECC_BRAINPOOL_P256T1_LEN (256)
1345#define ECC_BRAINPOOL_P320R1_LEN (320)
1346#define ECC_BRAINPOOL_P320T1_LEN (320)
1347#define ECC_BRAINPOOL_P384R1_LEN (384)
1348#define ECC_BRAINPOOL_P384T1_LEN (384)
1349#define ECC_BRAINPOOL_P512R1_LEN (512)
1350#define ECC_BRAINPOOL_P512T1_LEN (512)
1351
1352#define ECC_Ed25519_LEN (256)
1353#define ECC_Ed448_LEN (448)
1354#define ECC_X25519_LEN (256)
1355#define ECC_X448_LEN (448)
1356
1357/* Initialization vector sizes */
1358
1359#define DES_IV_LEN (8)
1360#define AES_IV_LEN (16)
1361
1362/* Padding */
1363
1364#define D_DEFAULT_PADDING (0xFFFFFFFF) // Placeholder for default padding
1365#define D_NO_PADDING (0)
1366#define D_PKCS5_PADDING (1)
1367#define D_ZERO_PADDING (2)
1368#define D_OAEP_PADDING (3)
1369#define D_OAEP_SHA1_PADDING (D_OAEP_PADDING)
1370#define D_PKCS1_PADDING (4)
1371#define D_PSS_PADDING (5)
1372#define D_X931_PADDING (6)
1373#define D_PSS_SALT_LEN_MD_PADDING (7)
1374#define D_OAEP_SHA2_256_PADDING (8)
1375
1376
1377/* Key Blobs */
1378
1379#define PRIVATEKEY_BLOB (1)
1380#define PUBLICKEY_BLOB (2)
1381#define SIMPLE_BLOB (3)
1382#define PLAINTEXTKEY_BLOB (4)
1383#define RAW_BLOB (5) //Deprecated
1384#define HOTP_BLOB (6)
1385#define SIMPLE_BLOB_OAEP (7)
1386#define SIMPLE_BLOB_PKCS1 (SIMPLE_BLOB)
1387#define PUBLICKEY_BLOB_X509 (8)
1388#define SYM_WRAPPED_KEY_BLOB (9)
1389#define OPAQUE_BLOB (10)
1390#define PUBLICKEY_BLOB_HSM (11)
1391#define PUBLICKEY_RSA_PARTS_HSM (12)
1392#define PRIVATEKEY_BLOB_P8 (13)
1393#define PRIVATEKEY_BLOB_STRICT (14)
1394#define SYM_WRAPPED_KEY_BLOB_P11 (15)//Importkey only
1395#define WRAPPED_KEY_BLOB (16)
1396#define PRIVATE_RSA_KEY_INFO (17)
1397#define WRAPPED_KEY_BLOB_P8 (18)
1398
1399
1400
1401/* Pkcs11 Blobs */
1402#define P11_BLOB (1)
1403
1404/* Pkcs11 Update Flags */
1405
1406#define UPDATE_P11_target ( 1 << 0 )
1407#define UPDATE_P11_associate ( 1 << 1 )
1408#define UPDATE_P11_Class ( 1 << 2 )
1409#define UPDATE_P11_App ( 1 << 3 )
1410#define UPDATE_P11_Id ( 1 << 4 )
1411#define UPDATE_P11_Label ( 1 << 5 )
1412#define UPDATE_P11_Trusted ( 1 << 6 )
1413#define UPDATE_P11_WrapWithTrusted ( 1 << 7 )
1414#define UPDATE_P11_Local ( 1 << 8 )
1415#define UPDATE_P11_CertificateCategory ( 1 << 9 )
1416#define UPDATE_P11_JavaMidpSecDomain ( 1 << 10 )
1417#define UPDATE_P11_KeyGenMechanism ( 1 << 11 )
1418
1419/* Key types */
1420
1421/* DGenerateKey DImportKey and related */
1422/* Flags */
1423#define EXPORTABLE_KEY (0x00000001) // Mark the key as exportable.
1424#define NO_CRYPTO (0x00000002) // The key will not be encrypted inside the HSM. Deprecated in newer versions.
1425#define TEMPORARY_KEY (0x00000004) // Mark key as temporary. Key will exist while the session exists. (default in ImportKey).
1426#define PERMANENT_KEY (0x00000008) // The key will be persistent in the HSM. (default in GenerateKey and ImportKeyPart).
1427#define RSA_PUB_EXP3 (0x00000800) // Use exponent 0x03 when generating a RSA key pair
1428#define MOD_SPB_RELATED (0x00001000) // Mark as mod_SPB related object
1429#define TSP_KEY (0x00002000) // TSP keys: don't replicate, export, backup, etc;
1430#define BCHAIN_KEY (0x00004000) // BChain keys: PBKs are handled specially, etc;
1431#define HSM_LOCAL_GEN (0x00008000) // set on HSM generated keys;
1432
1433// Attribute Usage-profile
1434#define AUP_DIG_SIG (0x01000000) // signature generation/verification
1435#define AUP_DATA_CRYPTO (0x02000000) // data encryption/decryption
1436#define AUP_KeK (0x03000000) // key wrapping/unwrapping
1437#define AUP_MAC (0x04000000) // MAC generation/verification
1438#define AUP_KDF (0x05000000) // key derivation function
1439#define AUP_CRYPTOGRAM (0x06000000) // cryptogram generation/verification
1440#define AUP_KEY_TRANSLATE (0x07000000) // key translation
1441#define AUP_EFT_CVK (0x08000000) // CVV generation/verification
1442#define AUP_EFT_VISA_PVK (0x09000000) // PVV generation
1443#define AUP_EFT_IBM_3624 (0x0a000000) // PIN generation/validation
1444#define AUP_EFT_PEK (0x0b000000) // PIN encryption/decryption
1445#define AUP_EFT_BDK (0x0c000000) // DUKPT
1446#define AUP_EFT_IPEK (0x0d000000) // DUKPT IPEK
1447#define AUP_EMV_IMK (0x0e000000) // ICC MK, IDN derivation
1448#define AUP_EMV_IMKDAC (0x0f000000) // ICC DAC derivation
1449#define AUP_EMV_IMKENC (0x10000000) // ICC data encryption - PinBlock
1450#define AUP_EMV_IMKMAC (0x11000000) // ICC data cryptogram - EmvMac
1451#define AUP_EMV_KeK (0x12000000) // ICC MK wrapping
1452#define AUP_EMV_IMKKDF (0x13000000) // EMV key derivation
1453#define AUP_EMV_IMKACRYPTO (0x14000000) // ARPC calculation
1454#define AUP_EFT_KeK (0x15000000) // EFT key wrapping/unwrapping
1455#define AUP_EMV_DIG_SIG (0x16000000) // EMV signature generation/verification
1456#define AUP_EFT_TR31_KBPK (0x17000000) // TR31 key-block protection key
1457#define AUP_EFT_TR34_PK (0x18000000) // TR34 sign/envelope
1458#define AUP_SPB_PK (0x19000000) // Brazilian National banking system sig gen/verify and key-wrapping key
1459
1460#define AUP_RESERVED_MASK (0xFF000000) // Mask of reserved Usage profile bits.
1461
1462/* DRemoveKey */
1463#define REMOVE_FROM_HSM (0x00000020) // Erase a key from the HSM and destroys it's handle.
1464#define REMOVE_FROM_HCM (REMOVE_FROM_HSM) // DEPRECATED. use REMOVE_FROM_HSM
1465
1466/* SetKeyParam/GetKeyParam */
1467
1468#define DKP_ALGID (1) /* Key algorithm ID. pbData == nAlgId */
1469#define DKP_IV (2) /* Initialization Vector. pbData == pbIV */
1470#define DKP_PADDING (3) /* Padding format. pbData == dwPadding */
1471#define DKP_MODE (4) /* Operation mode. pbData == dwOpMode */
1472#define DKP_OWNER (5) /* Key owner. pbData == szUserId (separated by ";" ) */
1473#define DKP_USER (6) /* Key user. pbData == szUserId (separated by ";" )*/
1474#define DKP_READ_LOCK (7) /* Key read lock status. pbData == NULL */
1475#define DKP_ENCRYPTED (8) /* Encrypted object. */
1476#define DKP_KEYLEN (9) /* Key size (bytes). */
1477#define DKP_TEMPORARY_KEY (10) /* Temporary key. pbData == dwTempKey */
1478#define DKP_MAP_VALUE (11) /* Values of a MAP object.pbData == MAP_2_OBJ_INFO*/
1479#define DKP_BLOCKED (12) /* Block object. pbData == nBlocked (TRUE|FALSE)*/
1480#define DKP_CERT_X509_INFO (13) /* Returns information of a x.509 certificate. pbData == CERT_X509_INFO */
1481#define DKP_SESSION (14) /* Session associated to the key handle. pbData == HSESSIONCTX */
1482#define DKP_KEY_ID (15) /* Key name associated to the key handle. pbData == szKeyId */
1483#define DKP_PUB_KEY_EXP (16) /* Public exponent for the key. pbData == DBLOB */
1484#define DKP_SP80057_INFO (17) /* Object's SP80057 info. pbData == OBJ_SP80057_INFO */
1485#define DKP_KEY_INFO (18) /* Key info. pbData == GET_USR_KEY_OFFLINE */
1486#define DKP_BLOCK_SIZE (19) /* Key block size (bytes). */
1487#define DKP_OBJ_ATTRIBUTES (20) /* Object attributes. pbData == DWORD */
1488#define DKP_OBJ_STATS (21) /* Object statistics. pbData == DN_OBJ_STATS */
1489
1490//Flags
1491#define REMOVE_ATTRIBUTE (0x00000040)
1492
1493/* SetHashParam/GetHashParam */
1494
1495#define DHP_ALGID (1) /* Hash algorithm. */
1496#define DHP_HASH_VALUE (2) /* Hash value. */
1497#define DHP_HASH_SIZE (4) /* Hash size (bytes). */
1498#define DHP_RESET (5) /* Reset hash state. */
1499
1500/* HashSessionKey */
1501
1502#define DHS_LITTLE_ENDIAN (1)
1503
1504/* DSetObjParam */
1505#define OP_OBJ_BLOCKED (1) /* User blocked */
1506#define OP_OBJ_UNBLOCKED (2) /* Used unblocked */
1507
1508/* LogParam */
1509
1510#define LP_LOG_PATH (0x00000001) /* Log file full path. */
1511#define LP_LOG_LEVEL (0x00000002) /* Log level. */
1512
1513#define LOG_ERROR_LEVEL (0)
1514#define LOG_DEBUG_LEVEL (3)
1515
1516#define LOG_DISABLED_LEVEL (1000)
1517
1518/*
1519 DGetHSMLogInit
1520 Remote log start and offset options
1521*/
1522
1523#define GET_LOG_START_FULL (0x00000000) //Deprecated - Use RLOG_GET_LOG_START_FULL instead.
1524#define GET_LOG_END_FULL (0x00000000) //Deprecated - Use RLOG_GET_LOG_END_FULL instead.
1525
1526#define RLOG_GET_LOG_START_FULL (0x00000000)
1527#define RLOG_GET_LOG_END_FULL (0x00000000)
1528
1529#define RLOG_GET_ZLOG_START_FULL (RLOG_GET_LOG_START_FULL)
1530#define RLOG_GET_ZLOG_END_FULL (0xFFFFFFFF)
1531
1532// Set both to get full compressed OEM log (pkzip format).
1533#define RLOG_GET_OEM_ZLOG_START_FULL (RLOG_GET_LOG_START_FULL)
1534#define RLOG_GET_OEM_ZLOG_END_FULL (RLOG_GET_ZLOG_END_FULL -1)
1535
1536
1537/* Permissions */
1538
1539#define ACL_NOP (0x00000000) // "may the Force be with ya'!"
1540#define ACL_OBJ_DEL (ACL_NOP + 1) // delete objects
1541#define ACL_OBJ_READ (ACL_OBJ_DEL << 1) // read obj content
1542#define ACL_OBJ_LIST (ACL_OBJ_READ) // list usr objs
1543#define ACL_OBJ_CREATE (ACL_OBJ_DEL << 2) // create obj
1544#define ACL_OBJ_UPDATE (ACL_OBJ_DEL << 3) // update obj (hdr and alike)
1545#define ACL_OBJ_WRITE (ACL_OBJ_UPDATE) // update obj
1546#define ACL_USR_CREATE (ACL_OBJ_DEL << 4) // create usr
1547#define ACL_USR_DELETE (ACL_USR_CREATE) // makes no sense only to create
1548#define ACL_USR_REMOTE_INFO (ACL_OBJ_DEL << 5) // can usr use remote log/info?
1549#define ACL_USR_LIST (ACL_OBJ_DEL << 6) // can usr get user-list?
1550#define ACL_SYS_OPERATOR (ACL_OBJ_DEL << 7) // operate as master (adm mode)
1551#define ACL_SYS_BACKUP (ACL_OBJ_DEL << 8) // extract full appliance backup
1552#define ACL_SYS_RESTORE (ACL_SYS_BACKUP) // restore full appliance backup
1553#define ACL_SYS_UDATE_HSM (ACL_OBJ_DEL << 9) // firmware and stuff like that
1554#define ACL_NS_AUTHORIZATION (ACL_OBJ_DEL << 10) // user must be authorized with "m of n"
1555#define ACL_LOCAL_CRYPTO (ACL_OBJ_DEL << 11) // user keys crypto ops must be done locally
1556#define ACL_VIRTUAL_X509_AUTH (ACL_OBJ_DEL << 28) // presence means SA (user must use 2F PKI)
1557#define ACL_VIRTUAL_OTP_AUTH (ACL_OBJ_DEL << 29) // presence means SA (user must use 2-F OTP)
1558#define ACL_CHANGE_PWD_NEXT_TIME (ACL_OBJ_DEL << 30) // can force usrs to change pwd on next login
1559
1560// Deprecated use ACL_USR_REMOTE_INFO
1561#define ACL_USR_REMOTE_LOG ACL_USR_REMOTE_INFO
1562
1563#define ACL_DEFAULT_OWNER (ACL_OBJ_DEL | ACL_OBJ_READ | ACL_OBJ_CREATE | \
1564 ACL_OBJ_UPDATE)
1565
1566#define ACL_SYS_PERMISSIONS (ACL_USR_CREATE | ACL_USR_REMOTE_INFO | ACL_USR_LIST | \
1567 ACL_SYS_OPERATOR | ACL_SYS_BACKUP | \
1568 ACL_SYS_UDATE_HSM)
1569
1570#define ACL_CREATION_TIME_ONLY (ACL_NS_AUTHORIZATION | ACL_LOCAL_CRYPTO)
1571
1572// DNSAuthSetState
1573
1574//
1575// NSAuth specific ACLs; NSAuth always grants ACL_OBJ_READ by default;
1576//
1577#define NSAUTH_ACL_NOP (ACL_NOP)
1578#define NSAUTH_ACL_OBJ_OPEN (ACL_OBJ_READ)
1579#define NSAUTH_ACL_OBJ_EXPORT (ACL_OBJ_CREATE)
1580#define NSAUTH_ACL_OBJ_DEL (ACL_OBJ_DEL)
1581#define NSAUTH_ACL_OBJ_BLOCK (ACL_OBJ_UPDATE)
1582#define NSAUTH_ACL_NS_DEL (ACL_USR_DELETE)
1583
1584/* DGenerateCVV/DVerifyCVV */
1585
1586#define MIN_CVV_LEN (3 + 1)
1587#define MAX_PAN_LEN (24 + 1)
1588#define MAX_EXP_DATE_LEN (4 + 1)
1589#define MAX_SVC_LEN (3 + 1)
1590
1591/* DEFTExportTR31 */
1592
1593// A.5.1, Table 6, inverted (little-endian);
1594#define EFT_ME_TR31_EXP_USAGE_AUTO (0x0000)
1595#define EFT_ME_TR31_EXP_USAGE_B0 (0x3042)
1596#define EFT_ME_TR31_EXP_USAGE_B1 (0x3142)
1597#define EFT_ME_TR31_EXP_USAGE_B2 (0x3242)
1598#define EFT_ME_TR31_EXP_USAGE_C0 (0x3043)
1599#define EFT_ME_TR31_EXP_USAGE_D0 (0x3044)
1600#define EFT_ME_TR31_EXP_USAGE_D1 (0x3144)
1601#define EFT_ME_TR31_EXP_USAGE_D2 (0x3244)
1602#define EFT_ME_TR31_EXP_USAGE_E0 (0x3045)
1603#define EFT_ME_TR31_EXP_USAGE_E1 (0x3145)
1604#define EFT_ME_TR31_EXP_USAGE_E2 (0x3245)
1605#define EFT_ME_TR31_EXP_USAGE_E3 (0x3345)
1606#define EFT_ME_TR31_EXP_USAGE_E4 (0x3445)
1607#define EFT_ME_TR31_EXP_USAGE_E5 (0x3545)
1608#define EFT_ME_TR31_EXP_USAGE_E6 (0x3645)
1609#define EFT_ME_TR31_EXP_USAGE_I0 (0x3049)
1610#define EFT_ME_TR31_EXP_USAGE_K0 (0x304B)
1611#define EFT_ME_TR31_EXP_USAGE_K1 (0x314B)
1612#define EFT_ME_TR31_EXP_USAGE_K2 (0x324B)
1613#define EFT_ME_TR31_EXP_USAGE_K3 (0x334B)
1614#define EFT_ME_TR31_EXP_USAGE_M0 (0x304D)
1615#define EFT_ME_TR31_EXP_USAGE_M1 (0x314D)
1616#define EFT_ME_TR31_EXP_USAGE_M2 (0x324D)
1617#define EFT_ME_TR31_EXP_USAGE_M3 (0x334D)
1618#define EFT_ME_TR31_EXP_USAGE_M4 (0x344D)
1619#define EFT_ME_TR31_EXP_USAGE_M5 (0x354D)
1620#define EFT_ME_TR31_EXP_USAGE_M6 (0x364D)
1621#define EFT_ME_TR31_EXP_USAGE_M7 (0x374D)
1622#define EFT_ME_TR31_EXP_USAGE_M8 (0x384D)
1623#define EFT_ME_TR31_EXP_USAGE_P0 (0x3050)
1624#define EFT_ME_TR31_EXP_USAGE_S0 (0x3053)
1625#define EFT_ME_TR31_EXP_USAGE_S1 (0x3153)
1626#define EFT_ME_TR31_EXP_USAGE_S2 (0x3253)
1627#define EFT_ME_TR31_EXP_USAGE_V0 (0x3056)
1628#define EFT_ME_TR31_EXP_USAGE_V1 (0x3156)
1629#define EFT_ME_TR31_EXP_USAGE_V2 (0x3256)
1630#define EFT_ME_TR31_EXP_USAGE_V3 (0x3356)
1631#define EFT_ME_TR31_EXP_USAGE_V4 (0x3456)
1632
1633// A.5.3, Table 8
1634#define EFT_ME_TR31_EXP_MODE_AUTO (0x00)
1635#define EFT_ME_TR31_EXP_MODE_B (0x42)
1636#define EFT_ME_TR31_EXP_MODE_C (0x43)
1637#define EFT_ME_TR31_EXP_MODE_D (0x44)
1638#define EFT_ME_TR31_EXP_MODE_E (0x45)
1639#define EFT_ME_TR31_EXP_MODE_G (0x47)
1640#define EFT_ME_TR31_EXP_MODE_N (0x4E)
1641#define EFT_ME_TR31_EXP_MODE_S (0x53)
1642#define EFT_ME_TR31_EXP_MODE_T (0x55)
1643#define EFT_ME_TR31_EXP_MODE_V (0x56)
1644#define EFT_ME_TR31_EXP_MODE_X (0x58)
1645#define EFT_ME_TR31_EXP_MODE_Y (0x59)
1646
1647// A.5.5, Table 10
1648#define EFT_ME_TR31_EXP_AUTO (0x00)
1649#define EFT_ME_TR31_EXP_X9_24 (0x45) // ANSI X9.24 approved kek form
1650#define EFT_ME_TR31_EXP_NON_EXPORTABLE (0x4E)
1651#define EFT_ME_TR31_EXP_KEK_EXPORTABLE (0x53)
1652
1653/* DGeneratePVV */
1654
1655#define EFT_MIN_PVKI (0x00)
1656#define EFT_MAX_PVKI (0x06)
1657#define EFT_PVV_LEN (4)
1658
1659/* DGeneratePIN */
1660
1661#define GP_DEFAULT_PIN (1)
1662#define GP_USER_DEF_PIN (2)
1663#define GP_RANDOM_PIN (3)
1664
1665/* DEFTExportKey/DEFTKeKImport */
1666
1667#define EK_EFT_KEK_EXPORT_RAW (1) // BLOB() == envelope + checksum[3];
1668#define EK_EFT_KEK_EXPORT_VISA1 (2) // Variant-1 ZCMK, BLOB() == envelope + checksum[3];
1669#define EK_EFT_KEK_EXPORT_LMK (3) // BLOB() == 3DES_CBC(SVMK, Key)
1670#define EK_EFT_KEK_EXPORT_JCB (4) // BLOB() == envelope + checksum[8];
1671
1672/* DPINBlockTranslate */
1673
1674// translate types
1675#define TP_TRANSLATE_TYPE_AUTO (0xFF)
1676#define TP_TRANSLATE_TYPE_IBM_3624 (0x36)
1677#define TP_TRANSLATE_TYPE_ISO_0 (1) // == VISA 1; HSM default
1678#define TP_TRANSLATE_TYPE_ISO_1 (2)
1679#define TP_TRANSLATE_TYPE_ISO_3 (3)
1680
1681/* Other constants */
1682
1683#define MAX_USR_PWD (16)
1684#define MAX_USR_LEN (16)
1685#define MAX_CN_LEN (256)
1686#define MAX_PATH_LEN (256)
1687#define MAX_MODULE_NAME_LEN (128)
1688#define MAX_MODULE_VERSION_LEN (32)
1689#define MAX_ADDR_LEN (128)
1690#define MAX_CHANNEL_CIPHER_NAME_LEN (128)
1691#define MIN_PIN_LEN (8)
1692#define MIN_BACKUP_OBJ_PIN_LEN (8)
1693#define MAX_BACKUP_OBJ_PIN_LEN (32)
1694#define MIN_BACKUP_PIN_LEN (8)
1695#define MAX_BACKUP_PIN_LEN (32)
1696#define MAX_OBJ_NAME_LEN (32)
1697#define MAX_PIN_LEN (6)
1698#define MAX_MODULE_NAME_VERSION_LEN (1024)
1699#define MAX_IP_LEN (15)
1700#define MAX_NET_NAME (16)
1701#define MAX_HOTP_PIN (4)
1702#define MAX_HOTP_IMEI (24)
1703#define MAX_HOTP_APP_NAME (13)
1704#define MAX_HOTP_LOGO_LEN (1632)
1705#define MAX_P11_OBJ_ID (128)
1706#define MAX_OBJ_ID_BIN_LEN (32 + 1)
1707#ifndef MAX_OBJ_ID
1708#define MAX_OBJ_ID MAX_OBJ_ID_BIN_LEN
1709#endif
1710#ifndef MAX_OBJ_ID_LEN
1711#define MAX_OBJ_ID_LEN (MAX_USR_LEN + 1 + MAX_OBJ_ID)
1712#endif
1713#ifndef MAX_OBJ_ID_FQN_LEN
1714#define MAX_OBJ_ID_FQN_LEN (MAX_OBJ_ID_LEN)
1715#endif
1716#define MAX_P11_DATE_TXT (8)
1717#define MIN_EFT_PIN_LEN (4)
1718#define MAX_EFT_PIN_LEN (12)
1719#define MIN_KSI_LEN (5)
1720#define MIN_CTR_LEN (5)
1721#define MAX_HSM_DOMAIN_NAME (32)
1722#define MAX_HSM_MODEL_NAME (32)
1723#define MAX_HSM_ID_NAME (32)
1724
1725
1726/* MOD EFT*/
1727
1728#define EFT_AES_KEY_CHECKSUM_LEN (3)
1729#define EFT_VISA_KEY_CHECKSUM_LEN (3)
1730#define EFT_JCB_KEY_CHECKSUM_LEN (8)
1731#define EFT_EXP_DATE_LEN (4)
1732
1733#define EFT_EMV_SDA_SEQ_LEN (2)
1734#define EFT_EMV_SDA_DAC_LEN (2)
1735#define EFT_EMV_ARC_LEN (2)
1736#define EFT_EMV_CSU_LEN (4)
1737#define EFT_EMV_PAD_LEN (8)
1738
1739#define EFT_EMV_IDN_LEN (2)
1740#define EFT_EMV_IDN_ATC_LEN (2)
1741#define EFT_EMV_IDN_UN_LEN (4)
1742
1743#define EFT_EMV_CSR_VISA_TRACK_NUM_LEN (3)
1744#define EFT_EMV_CSR_VISA_SERVICE_ID_LEN (4)
1745#define EFT_EMV_CSR_VISA_ISSUER_ID_LEN (4)
1746#define EFT_EMV_CSR_VISA_PUB_KEY_INDEX_LEN (3)
1747
1748#define EFT_EMV_CSR_VISA_HASH_SIZE (20)
1749#define EFT_EMV_CSR_MASTER_HASH_SIZE (28)
1750
1751
1752
1753/* DGenerateICCMK */
1754
1755#define EFT_EMV_GEN_ICC_MK_OP_CBC_EXP (0x01)
1756#define EFT_EMV_GEN_ICC_MK_OP_ECB_EXP (0x02)
1757
1758/* DMAC_ISO9797_1_Met2*/
1759
1760#define EMV_MAC_TYPE_ALG1 (1)
1761#define EMV_MAC_TYPE_ALG3 (2)
1762
1763/* DGenerateEMV_MAC/DGenerateEMV_HMAC/DCalculateARPC */
1764
1765#define EMV_OP_ISO_9797_1_M2_COMMON (0x01)
1766#define EMV_OP_ISO_9797_1_M2_MCHIP (0x02)
1767#define EMV_OP_ISO_9797_1_M2_VISA (0x03)
1768#define EMV_OP_ISO_9797_1_M2_VISA_CRYPTOGRAM (0x04)
1769#define EMV_OP_ISO_9797_1_M2_VISA_ICC_V1_4_PAN_AUTO (0x05)
1770#define EMV_OP_ISO_9797_1_M2_RAW (0x06)
1771#define EMV_OP_ISO_9797_1_M1_VISA_CRYPTOGRAM_PADD_V10 (0x7F)
1772#define EMV_OP_ISO_9797_1_M2_ELO (0x07)
1773#define EMV_OP_ISO_9797_1_M2_JCB (0x08)
1774#define EMV_OP_ISO_9797_1_M1_JCB (0x09)
1775#define EMV_OP_ISO_9797_1_M1_JCB_CRYPTOGRAM (0x0A)
1776
1777/* DGenerateDDA_ICCCert */
1778
1779#define EFT_EMV_DDA_OP_RSA_SIGN1 (0x01) // rsa + sha1
1780
1781/* DGenerateEMV_CSR */
1782
1783#define EFT_EMV_OP_CSR_VISA (0x01)
1784#define EFT_EMV_OP_CSR_MASTER (0x02)
1785#define EFT_EMV_OP_CSR_ELO (0x03)
1786#define EFT_EMV_OP_CSR_JCB (0x04)
1787
1788
1789/* DGenerateISO9796Cert2 */
1790
1791#define CORE_P_ISO_9796_USER_ID_LEN (32)
1792#define CORE_P_ISO_9796_USER_NAME_LEN (32)
1793#define CORE_P_ISO_9796_KEY_LEN (512) // 128
1794#define CORE_P_ISO_9796_MIN_KEY_LEN (64)
1795#define CORE_P_ISO_9796_EXPONENT_LEN (8)
1796#define CORE_P_ISO_9796_MIN_EXPONENT_LEN (1)
1797
1798
1799/* DGenerateEMV_PinBlock */
1800
1801#define PBC_EMV_PIN_BLOCK_OP_COMMON (EMV_OP_ISO_9797_1_M2_COMMON)
1802#define PBC_EMV_PIN_BLOCK_OP_MCHIP (EMV_OP_ISO_9797_1_M2_MCHIP)
1803#define PBC_EMV_PIN_BLOCK_OP_VISA (EMV_OP_ISO_9797_1_M2_VISA)
1804#define PBC_EMV_PIN_BLOCK_OP_VISA_CRYPTOGRAM (EMV_OP_ISO_9797_1_M2_VISA_CRYPTOGRAM)
1805#define PBC_EMV_PIN_BLOCK_OP_ELO (EMV_OP_ISO_9797_1_M2_ELO)
1806#define PBC_EMV_PIN_BLOCK_OP_JCB (EMV_OP_ISO_9797_1_M2_JCB)
1807
1808#define PBC_EMV_PIN_BLOCK_MAX_OUTPUT (64)
1809
1810
1811/* DDeriveKeyFromBuffer */
1812
1813#define EMV_DERIVE_KEY_OP_XOR (0x01)
1814#define EMV_DERIVE_KEY_OP_ECB (0x02)
1815
1816
1817/* DGeneratePKCS10CSR */
1818
1819#define CORE_P10_CSR_VERSION1 (0x00)
1820#define CORE_P10_CSR_DN_MAX_LEN (2048)
1821
1822#define P10_CSR_DER (1)
1823#define P10_CSR_PEM (2)
1824
1825#define CORE_P10_HASH_SHA1 (0x01)
1826#define CORE_P10_HASH_SHA224 (0x02)
1827#define CORE_P10_HASH_SHA256 (0x03)
1828#define CORE_P10_HASH_SHA384 (0x04)
1829#define CORE_P10_HASH_SHA512 (0x05)
1830#define CORE_P10_HASH_SHA2_224 CORE_P10_HASH_SHA224
1831#define CORE_P10_HASH_SHA2_256 CORE_P10_HASH_SHA256
1832#define CORE_P10_HASH_SHA2_384 CORE_P10_HASH_SHA384
1833#define CORE_P10_HASH_SHA2_512 CORE_P10_HASH_SHA512
1834#define CORE_P10_HASH_SHA3_224 (0x06)
1835#define CORE_P10_HASH_SHA3_256 (0x07)
1836#define CORE_P10_HASH_SHA3_384 (0x08)
1837#define CORE_P10_HASH_SHA3_512 (0x09)
1838
1839/* DPKCS8ExportKey */
1840
1841// ASCII
1842#define CORE_P8_EXPORT_PWD_LEN (16)
1843#define ND_MIN_P8_PWD_LEN (8)
1844#define ND_MAX_P8_PWD_LEN (CORE_P8_EXPORT_PWD_LEN)
1845
1846/* DImportPKCS12Buffer */
1847
1848#define DN_MAX_P12_PWD_LEN (CORE_P8_EXPORT_PWD_LEN)
1849
1850/* DExportPKCS12 */
1851
1852#define DN_EXPORT_P12_LEGACY (1)
1853
1854/* SPB */
1855
1856#define DN_SPB_MSG_HEADER_V2_LEN (588)
1857#define ND_SPB_MSG_HEADER_V2_LEN DN_SPB_MSG_HEADER_V2_LEN
1858#define DN_SPB_MSG_HEADER_V3_LEN ND_SPB_MSG_HEADER_V2_LEN
1859#define DN_SPB_MAX_NOTIFY_DATA_SEG (32 * 1024)
1860#define ND_SPB_MAX_NOTIFY_DATA_SEG DN_SPB_MAX_NOTIFY_DATA_SEG
1861#define DN_SPB_V3_TAG_LEN (16)
1862#define DN_SPB_MAX_RCV_NOTIFY_DATA_SEG (ND_SPB_MAX_NOTIFY_DATA_SEG + DN_SPB_V3_TAG_LEN)
1863
1864//dwFlags
1865#define ND_SPB_USE_CIP1 (0x80000000)
1866#define ND_SPB_USE_ANY (0x40000000)
1867#define ND_SPB_RAW (0x20000000)
1868
1869/* DSPBEncode */
1870
1871//dwFlags
1872#define ND_SPB_ENCODE_GEN_01 (0x01)
1873#define ND_SPB_ENCODE_HEADER_V3 (0x02)
1874
1875/* DSPBDecode */
1876
1877//dwFlags
1878#define ND_SPB_OUT_NO_PADDING (0x01)
1879#define ND_SPB_OUT_WITH_PADDING (0x02)
1880
1881#define ND_SPB_ISPB_LEN (8)
1882#define ND_SPB_CA_LEN (2)
1883#define ND_SPB_DOMAIN_MAX_LEN (5)
1884#define ND_SPB_SN_MAX_LEN (32)
1885#define ND_SPB_ID_MAX_LEN (ND_SPB_SN_MAX_LEN + 1 + ND_SPB_CA_LEN + 1)
1886#define ND_SPB_ID_MAX_FQN_LEN (MAX_USR_LEN + 1 + ND_SPB_SN_MAX_LEN + 1 + ND_SPB_CA_LEN + 1)
1887#define ND_SPB_MAX_SUBJECT (1024)
1888#define ND_SPB_MAX_ISSUER (1024)
1889#define ND_SPB_MAX_ALG_ID (256)
1890
1891
1892//strong auth
1893#define SA_TP_MAX_DES_LEN (16 + 1)
1894#define SA_TP_MAX_OFFSET_LEN (6 + 1)
1895#define SA_TP_MAX_SERIAL_LEN (10 + 1)
1896#define SA_TP_MAX_MKEY_LEN (32 + 1)
1897#define SA_TP_MAX_OTP_LEN (6 + 1)
1898
1899#define SA_HOTP_CHAP_LEN (10)
1900
1901/* Module OATH */
1902
1903/* DOATHIssueHOTPBlob */
1904#define ISSUE_OATH_MIN_OTP_LEN (6)
1905#define ISSUE_OATH_MAX_OTP_LEN (16)
1906#define ISSUE_OATH_MAX_OTP_RETRY (129)
1907
1908//bSeedLen
1909#define ISSUE_OATH_SHA1_LEN (20)
1910#define ISSUE_OATH_SHA256_LEN (32)
1911#define ISSUE_OATH_SHA512_LEN (64)
1912
1913//bTruncationOffset
1914#define ISSUE_OATH_DYN_TRUNC (OATH_SA_v1_HOTP_DYN_TRUNC_OFF)
1915
1916//wTimeStep
1917#define ISSUE_OATH_DEFAULT_TIME_STEP (OATH_SA_v2_default_TIME_STEP)
1918#define ISSUE_OATH_HOTP_TS (0)
1919
1920//otT0
1921#define ISSUE_OATH_HOTP_T0 (OATH_SA_v2_default_T0_Epoch)
1922
1923//otMovingFactor
1924#define ISSUE_OATH_INIT_MF (0)
1925
1926#define ISSUE_OATH_OUTPUT_BLOB_V1_LEN (160)
1927#define ISSUE_OATH_OUTPUT_BLOB_V2_LEN (180)
1928#define ISSUE_OATH_OUTPUT_BLOB_LEN (ISSUE_OATH_OUTPUT_BLOB_V1_LEN)
1929#define ISSUE_OATH_OUTPUT_MAX_BLOB_LEN (ISSUE_OATH_OUTPUT_BLOB_V2_LEN)
1930
1931#define OATH_MAX_PSK_LEN (255)
1932
1933#define ISSUE_OATH_GENERATE_HOTP (1)
1934#define ISSUE_OATH_GENERATE_TOTP (2)
1935#define ISSUE_OATH_IMPORT_HOTP (3)
1936#define ISSUE_OATH_IMPORT_TOTP (4)
1937
1938
1939#define OATH_UPDATE_BLOB (0x80000000)
1940
1941#define ISSUE_OATH_BLOB_V2_IV_LEN (AES_BLOCK)
1942#define ISSUE_OATH_BLOB_V2_TAG_LEN (AES_BLOCK)
1943
1944/* DOATHCheckOTP */
1945
1946#define MAX_OTP_LOOK_AHEAD_INTERVAL (255)
1947
1948
1949#define DEFAULT_PORT (4433)
1950
1951
1952/* DListObjsFilter */
1953
1954#define LST_NO_FILTER (1)
1955#define LST_FILTER (2)
1956
1957/* DSPBCalculateObjectId */
1958
1959#define SPB_GENERATE_KEY_NAME (1)
1960#define SPB_GENERATE_CER_NAME (2)
1961
1962
1963/* DIPFilterOperation */
1964
1965#define D_IPF_ENABLE (1)
1966#define D_IPF_DISABLE (2)
1967#define D_IPF_LIST (33)
1968#define D_IPF_ADD (44)
1969#define D_IPF_DEL (55)
1970
1971
1972/* DCert2CertInfo */
1973
1974#define P2C_SPB_CERT_INFO (1)
1975#define P2C_CERT_BASIC_INFO (2)
1976
1977//CERT_X509_BASIC_INFO
1978#define DN_MAX_SUBJECT (1024)
1979#define DN_MAX_ISSUER (1024)
1980#define DN_MAX_SN (1024)
1981#define DN_MAX_EMAIL (1024)
1982#define DN_MAX_ALG_ID (256)
1983
1984
1985/* DGenerateDUKPT */
1986
1987// flags/modes; duk, pek, and mek are mutually exclusive;
1988#define NEW_DUKPT_MODE_DUK (0x00000000)
1989#define NEW_DUKPT_MODE_EXP (1 << 31)
1990#define NEW_DUKPT_MODE_DE (1 << 30)
1991#define NEW_DUKPT_MODE_PEK (1 << 29)
1992#define NEW_DUKPT_MODE_MEK (1 << 28)
1993#define NEW_DUKPT_MODE_TMP (1 << 27)
1994#define NEW_DUKPT_MODE_IPEK (1 << 26)
1995
1996
1997/* DGetNetInfo */
1998
1999#define NET_INFO_MAX_SROUTE_COUNT (48)
2000#define NET_INFO_MAX_SROUTE_LEN (52)
2001#define NET_INFO_MAX_SNMP_T_COUNT (16)
2002#define NET_INFO_MAX_SNMP_SC_STR (255)
2003#define NET_INFO_MAX_SNMP_SL_STR (255)
2004#define NET_INFO_MAX_SNMP_C_STR (64)
2005
2006//Flags
2007#define NET_INFO_INFO_0 (0)
2008#define NET_INFO_INFO_1 (1)
2009
2010/* Bond mode - comes in bond gateway info. */
2011#define NET_INFO_BOND_HOT_STANDBY "hot standby"
2012#define NET_INFO_BOND_BALANCE "balance"
2013#define NET_INFO_BOND_AGGREGATION "aggregation"
2014
2015
2016
2017/* DCertEncodingConvert and DGetHSMTLSCert*/
2018
2019#define CERT_OUT_DER 1
2020#define CERT_OUT_PEM 2
2021
2022
2023
2024/* DGenEcdhKey - dwOP*/
2025
2026#define DN_GEN_KEY_KDF_RAW_SECRET (0x01)
2027#define DN_GEN_KEY_X9_63_SHA256 (0x02)
2028
2029
2030#define DN_ECDH_GEN_KEY_MAX_DATA (1024)
2031#define DN_GEN_ECDH_MAX_SHARED_LEN (128)
2032
2033/* DCreateHash */
2034
2035#define DN_HASH_OFFLINE (1)
2036
2037/* DFindHSM */
2038
2039//Service Type
2040#define DN_FIND_SRVC_TYPE_IP (1)
2041#define DN_FIND_SRVC_TYPE_AAP (2)
2042#define DN_FIND_SRVC_TYPE_ALL (3)
2043
2044//Filter
2045#define DN_FIND_FILTER_TYPE_POCKET (0x01)
2046#define DN_FIND_FILTER_TYPE_XP (0x02) //Not implemented
2047#define DN_FIND_FILTER_TYPE_ST (0x04) //Not implemented
2048#define DN_FIND_FILTER_TYPE_LEGACY (0x08) //Not implemented
2049#define DN_FIND_FILTER_TYPE_UNKNOWN (0x10) //Not implemented
2050#define DN_FIND_FILTER_TYPE_HSM (0x40000000)
2051#define DN_FIND_FILTER_TYPE_ALL (0x80000000)
2052
2053#define DN_SLP_POCKET_ID "$pocket"
2054#define DN_SLP_HSM_MODEL_POCKET "DMP"
2055#define DN_SLP_HSM_MODEL_XP "DXP"
2056#define DN_SLP_HSM_MODEL_ST "DST"
2057#define DN_SLP_HSM_MODEL_LEGACY "lhM"
2058#define DN_SLP_HSM_MODEL_UNKNOWN "DHSM"
2059
2060
2061/* DManageAToken */
2062
2063#define DN_USR_A_TOKEN_KLEN (16)
2064#define DN_RND_CHAP_LEN (16)
2065
2066#define DN_A_TOKEN_OP_ISSUE (1)
2067#define DN_A_TOKEN_OP_REVOKE (2)
2068#define DN_A_TOKEN_OP_LIST (3)
2069#define DN_A_TOKEN_OP_L_ISSUE (4)
2070#define DN_A_TOKEN_OP_L_REVOKE (5)
2071
2072#define DN_A_TOKEN_INFINITE (~0)
2073
2074
2075/* DBatchSign */
2076
2077#define DN_BATCH_SIGN_BLOCK_HEADER ((DWORD *2) + MAX_OBJ_ID_FQN_LEN)
2078
2079
2080/* DSetLBList and DGetLBList */
2081
2082#define DN_LB_LIST (1)
2083#define DN_MAX_LB_HSM_COUNT (16)
2084#define DN_MAX_LB_SETS (16)
2085
2086/* DGetUserKey */
2087
2088#define D_GET_USR_KEY_OFFLINE (1)
2089#define D_GET_USR_KEY_NO_PUB (2)
2090
2091/* DSVaultGenToken and DSVaultGetData */
2092
2093#define D_SVAULT_MIN_TL (6)
2094#define D_SVAULT_MAX_TL (256)
2095
2096#define D_SVAULT_T_TKR2 (1)
2097
2098#define D_SVAULT_F_MASK_TOKEN (1)
2099#define D_SVAULT_F_MASK_SECRET (2)
2100
2101#define D_SVAULT_CKS_NULL (0)
2102#define D_SVAULT_CKS_CPF (1)
2103#define D_SVAULT_CKS_CNPJ (2)
2104#define D_SVAULT_CKS_PAN (3)
2105#define D_SVAULT_CKS_IEL (4)
2106
2107#define D_SVAULT_BASE10 (10)
2108#define D_SVAULT_BASE16 (16)
2109#define D_SVAULT_BASE26 (26)
2110#define D_SVAULT_BASE52 (52)
2111#define D_SVAULT_BASE62 (62)
2112
2113#define D_SVAULT_TOKEN_BLOB_LEN (805)
2114
2115/* DSVaultGetData */
2116
2117#define D_SVAULT_GET_OP_SECRET (1)
2118#define D_SVAULT_GET_OP_TOKEN (2)
2119
2120/* DBchainCreateBip32Ckd */
2121
2122#define DN_BCHAIN_SECURE_BIP32_INDEX_BASE 0x80000000
2124/* DBchainGetAddress */
2125
2126#define DN_BCHAIN_MAX_ADDR_LEN (128)
2127#define DN_BCHAIN_MAX_HRP (64)
2129// Type
2130#define DN_BCHAIN_AT_BTC_P2PKH (1)
2131#define DN_BCHAIN_AT_BTC_P2SH (2)
2132#define DN_BCHAIN_AT_BTC_B32_PKH (3)
2133#define DN_BCHAIN_AT_BTC_B32_SH (4)
2134#define DN_BCHAIN_AT_ETH_EOA (5)
2135#define DN_BCHAIN_AT_ETH_EOA_MC_CKS (6)
2136#define DN_BCHAIN_AT_ETH_EOA_ICAP (7)
2137#define DN_BCHAIN_AT_ALGORAND (8)
2138#define DN_BCHAIN_AT_TRON_HEX (9)
2139#define DN_BCHAIN_AT_TRON_B58 (10)
2140#define DN_BCHAIN_AT_XRP (11)
2141#define DN_BCHAIN_AT_SOL (12)
2142// Version
2143#define DN_BCHAIN_VER_UNUSED (0x00)
2144#define DN_BCHAIN_VER_BTC_A1_MAIN_NET (0x00)
2145#define DN_BCHAIN_VER_XRP_CLASSIC (0x00)
2146#define DN_BCHAIN_VER_BTC_AMN_TEST_NET (0x6F)
2147#define DN_BCHAIN_VER_BTC_A3_MAIN_NET (0x05)
2148#define DN_BCHAIN_VER_BTC_B32_WITVER (0x00)
2149#define DN_BCHAIN_VER_HTR_MAINNET (0x28)
2150#define DN_BCHAIN_VER_HTR_TESTNET (0x49)
2151#define DN_BCHAIN_VER_HTR_P2SH_MAINNET (0x64)
2152#define DN_BCHAIN_VER_HTR_P2SH_TESTNET (0x87)
2153// HRP
2154#define DN_BCHAIN_HRP_UNUSED ""
2155#define DN_BCHAIN_HRP_BTC_MAIN_NET "bc"
2156#define DN_BCHAIN_HRP_BTC_TEST_NET "tb"
2158/* DBchainSignHash */
2159
2160#define DN_BCHAIN_MAX_SIG_LEN (128)
2162// Type
2163#define DN_BCHAIN_SIG_DER_ECDSA (1)
2164#define DN_BCHAIN_SIG_RAW_ECDSA (2)
2165#define DN_BCHAIN_SIG_BIP340 (3)
2166#define DN_BCHAIN_DER_RFC_6979_ECDSA (4)
2167#define DN_BCHAIN_RAW_RFC_6979_ECDSA (5)
2169#define DN_BCHAIN_SIG_RAW_ECDSA_R_LEN (32)
2170#define DN_BCHAIN_SIG_RAW_ECDSA_S_LEN (32)
2171#define DN_BCHAIN_SIG_RAW_ECDSA_V_LEN (1)
2173#define DN_BCHAIN_SIG_RAW_ECDSA_R_LEN (32)
2174#define DN_BCHAIN_SIG_RAW_ECDSA_S_LEN (32)
2175#define DN_BCHAIN_SIG_RAW_ECDSA_V_LEN (1)
2177// Hash mode
2178#define DN_BCHAIN_HASH_BTC_H160 (1)
2179#define DN_BCHAIN_HASH_RIPEMD160 (2)
2180#define DN_BCHAIN_HASH_SHA256 (3)
2181#define DN_BCHAIN_HASH_BTC_SHA256_2X (4)
2182#define DN_BCHAIN_HASH_KECCAK256 (5)
2184// Hash length
2185#define DN_BCHAIN_HASH_BTC_H160_LEN (20)
2186#define DN_BCHAIN_HASH_RIPEMD160_LEN (20)
2187#define DN_BCHAIN_HASH_SHA256_LEN (32)
2188#define DN_BCHAIN_HASH_BTC_SHA256_2X_LEN (32)
2189#define DN_BCHAIN_HASH_KECCAK256_LEN (32)
2191#define DN_BCHAIN_MAX_HASH_LEN (DN_BCHAIN_HASH_KECCAK256_LEN)
2193/* DBchainEdDsaSign and DBchainEdDsaVerify */
2194
2195#define DN_BCHAIN_EDDSA_MAX_CSTRL (255)
2196#define DN_BCHAIN_EDDSA_CSTR_UNUSED ""
2197#define DN_BCHAIN_EDDSA_MAX_DATA_LEN (4 * 1024 * 1024)
2199#define DN_BCHAIN_EDDSA_SIG_PURE (254)
2200#define DN_BCHAIN_EDDSA_SIG_ALGORAND (253)
2201#define DN_BCHAIN_EDDSA_SIG_XRP (252)
2202#define DN_BCHAIN_EDDSA_SIG_SOL (251)
2204/* DBchainPkImport and DBchainPkExport */
2205#define DN_BCHAIN_KEY_WIF (1)
2206#define DN_BCHAIN_KEY_MINI (2)
2207#define DN_BCHAIN_KEY_HEX (3)
2208#define DN_BCHAIN_KEY_SEC1 (4)
2209#define DN_BCHAIN_KEY_XPRIV (5)
2210#define DN_BCHAIN_KEY_ED25519_B64 (6)
2211#define DN_BCHAIN_KEY_ED25519_XPRIV (7)
2213// Version
2214#define DN_BCHAIN_VER_WIF_MAIN_NET (0x80)
2215#define DN_BCHAIN_VER_WIF_TEST_NET (0xEF)
2217/* DBchainGetPubKey and DBchainVerify */
2218#define DN_BCHAIN_PBK_SEC1_UNCOMP (1)
2219#define DN_BCHAIN_PBK_SEC1_COMP (2)
2220#define DN_BCHAIN_PBK_BIP340 (3)
2221#define DN_BCHAIN_PBK_ED25519 (4)
2222#define DN_BCHAIN_PBK_AT_ALGORAND (5)
2223#define DN_BCHAIN_PBK_BIP32_XPUB (6)
2224#define DN_BCHAIN_PBK_AT_SOL (7)
2226#define DN_BCHAIN_X_LEN (32)
2227#define DN_BCHAIN_Y_LEN (32)
2228#define DN_BCHAIN_MAX_PBK_LEN (128)
2230/* DBchainHashData */
2231
2232#define DN_BCHAIN_MAX_HDATA_LEN (2 * 1024 * 1024)
2234/*
2235 *
2236 * Unaligned structures
2237 *
2238 */
2239
2243typedef struct tag_SVAULT_GEN_TOKEN
2244{
2275 char szSecret[D_SVAULT_MAX_TL + 1];
2278
2283typedef struct tag_HSM_ADDR
2284{
2285 char szAddr[MAX_ADDR_LEN];
2286 int nPort;
2287 time_t tmNow;
2288 int nqtdcache; /* Amount of sessions in cache.*/
2289}HSM_ADDR;
2290
2295typedef struct tag_LOAD_BALANCE_LIST
2296{
2300
2306typedef struct tag_SLP_SRVR_INFO
2307{
2308 int nPort;
2309 char szIP[MAX_IP_LEN + 1];
2310 char szId[MAX_HSM_ID_NAME + 1];
2311 char szModel[MAX_HSM_MODEL_NAME + 1];
2313
2318typedef struct tag_DBLOB
2319{
2320 void *pvData;
2322} DBLOB;
2323
2324/* DCert2CertInfo */
2325
2326typedef struct tag_SPB_CERT_X509_INFO
2327{
2329
2330 char szAlgId[ND_SPB_MAX_ALG_ID];
2331
2332 char szISPB[ND_SPB_ISPB_LEN+1];
2333 char szCA[ND_SPB_CA_LEN+1];
2334 char szSN[ND_SPB_SN_MAX_LEN+1];
2335
2336 char szSubject[ND_SPB_MAX_SUBJECT];
2337 char szIssuer[ND_SPB_MAX_ISSUER];
2338
2339 struct tm tmNotBefore;
2340 struct tm tmNotAfter;
2341
2344
2345typedef struct tag_CERT_X509_BASIC_INFO
2346{
2348
2349 char szAlgId[DN_MAX_ALG_ID];
2350
2351 char szSubject[DN_MAX_SUBJECT];
2352 char szIssuer[DN_MAX_ISSUER];
2353 char szSN[DN_MAX_SN];
2354
2355 struct tm tmNotBefore;
2356 struct tm tmNotAfter;
2357
2360 char szEmail[DN_MAX_EMAIL];
2362
2363
2364typedef struct tag_IP_FILTER_INFO
2365{
2366 char szUser[MAX_USR_LEN + 1];
2367 char szIp[MAX_IP_LEN + 1];
2369
2370
2371/* DECPrivateKey2Info and DECPublicKey2Info */
2372
2373#define DN_EC_MAX_BIG_NUM (1024)
2374
2375//Field type definitions
2376#define DN_EC_KEY_FIELD_TYPE_NOT_DEFINED (0)
2377#define DN_EC_KEY_FIELD_TYPE_PRIME_FIELD (1)
2378#define DN_EC_KEY_FIELD_TYPE_BINARY_FIELD (2)
2379
2380//Out format options
2381#define DN_BN_2_ARRAY_OUT_BIN (1)
2382#define DN_BN_2_ARRAY_OUT_HEX (2)
2383#define DN_EC_KEY_PUB_X962_EC_POINT (3)
2384
2385//In format options
2386#define DN_EC_KEY_IN_FORMAT_DER (1)
2387
2388typedef struct tag_DN_EC_BIG_NUMBER
2389{
2393
2394typedef struct tag_DN_EC_POINT_INFO
2395{
2396 DN_EC_BIG_NUMBER bnX;//Point's x-coordinate
2397 DN_EC_BIG_NUMBER bnY;//Point's y-coordinate
2399
2400typedef struct tag_DN_EC_GROUP_INFO
2401{
2402 int nFieldType; //See definitions above
2403
2404 DN_EC_BIG_NUMBER bnP;//In Fp fields this is p for F2M fields it's m
2405
2406 DN_EC_BIG_NUMBER bnA;//Parameter a of the equation
2407 DN_EC_BIG_NUMBER bnB;//Parameter b of the equation
2408
2410
2411 DN_EC_BIG_NUMBER bnOrder;//Order n of the generator g
2412 DN_EC_POINT_INFO stGeneratorPoint;//Generator g / base point
2414
2415typedef struct tag_DN_EC_PUB_KEY_INFO
2416{
2420
2421typedef struct tag_DN_EC_PRIV_KEY_INFO
2422{
2426
2430typedef struct tag_RSA_PUB_KEY_PARTS
2431{
2435
2439typedef struct tag_DN_RSA_BIG_NUMBER
2440{
2444
2453
2454#define DN_USER_INFO_CERT_OP_ASSOCIATE (1)
2455#define DN_USER_INFO_CERT_OP_UNASSOCIATE (2)
2456
2460typedef struct tag_USER_INFO_CERT
2461{
2462 char szUserId[MAX_USR_LEN + 1];
2470
2474typedef struct tag_TLS_BUNDLE_INFO
2475{
2477 char szCERT[MAX_OBJ_ID_FQN_LEN];
2479
2489
2493typedef struct tag_GET_USR_KEY_OFFLINE
2494{
2495 char szKeyId[MAX_OBJ_ID_LEN];
2502
2530
2535typedef struct tag_DN_OBJ_COUNT
2536{
2539} DN_OBJ_COUNT;
2540
2545typedef struct tag_DN_USER_OBJ_COUNT
2546{
2547 char szUserId[MAX_OBJ_ID_FQN_LEN];
2551
2552#define DN_MAX_PRIVATE_KEY_ATTR_LEN (RSA_8192_LEN + 1)
2553
2573
2574#ifdef _WIN32
2575 #pragma pack(push, 1) /* Align by 1 for portability issues.*/
2576#else
2577 #pragma pack(1)
2578#endif
2579
2580/* Aligned structures */
2581
2582typedef struct tag_OBJ_HDR_V1
2583{
2588} OBJ_HDR_V1;
2589
2590/*
2591 Estrutura contendo os atributos SP80057 de um objeto do HSM.
2592*/
2608
2609
2610/*
2611 Estados de objetos KMIP/SP.800-57.
2612*/
2613#define DN_SL_SP80057_STATE_UNKNOWN (0)
2614#define DN_SL_SP80057_STATE_PRE_ACTIVE (1)
2615#define DN_SL_SP80057_STATE_ACTIVE (2)
2616#define DN_SL_SP80057_STATE_DEACTIVATED (3)
2617#define DN_SL_SP80057_STATE_COMPROMISED (4)
2618#define DN_SL_SP80057_STATE_DESTROYED (5)
2619#define DN_SL_SP80057_STATE_DESTROYED_C (6)
2620
2621/*
2622 Máscara de uso de objetos SP.800-57.
2623*/
2624#define DN_SP80057_UM_SIGN (0x00000001)
2625#define DN_SP80057_UM_VERIFY (0x00000002)
2626#define DN_SP80057_UM_ENCRYPT (0x00000004)
2627#define DN_SP80057_UM_DECRYPT (0x00000008)
2628#define DN_SP80057_UM_WRAP_KEY (0x00000010)
2629#define DN_SP80057_UM_UNWRAP_KEY (0x00000020)
2630#define DN_SP80057_UM_EXPORT (0x00000040)
2631#define DN_SP80057_UM_MAC_GENERATE (0x00000080)
2632#define DN_SP80057_UM_MAC_VERIFY (0x00000100)
2633#define DN_SP80057_UM_DERIVE_KEY (0x00000200)
2634#define DN_SP80057_UM_CONTENT_COMMITMENT (0x00000400)
2635#define DN_SP80057_UM_KEY_AGREEMENT (0x00000800)
2636#define DN_SP80057_UM_CERTIFICATE_SIGN (0x00001000)
2637#define DN_SP80057_UM_CRL_SIGN (0x00002000)
2638#define DN_SP80057_UM_GENERATE_CRYPTOGRAM (0x00004000)
2639#define DN_SP80057_UM_VALIDATE_CRYPTOGRAM (0x00008000)
2640#define DN_SP80057_UM_TRANSLATE_ENCRYPT (0x00010000)
2641#define DN_SP80057_UM_TRANSLATE_DECRYPT (0x00020000)
2642#define DN_SP80057_UM_TRANSLATE_WRAP (0x00040000)
2643#define DN_SP80057_UM_TRANSLATE_UNWRAP (0x00080000)
2644
2645
2646/* DListObjsFilter */
2647
2648typedef struct tag_OBJ_LIST_FILTER
2649{
2653
2654#define OBJ_LIST_VERB_VERSION ( 1 << 0 )
2655#define OBJ_LIST_VERB_TYPE ( 1 << 1 )
2656#define OBJ_LIST_VERB_ATTRIB ( 1 << 2 )
2657#define OBJ_LIST_OBJS_OR ( 1 << 31 )
2658
2673
2708
2743
2774
2778typedef struct tag_ISSUE_OATH_BLOB_t_v1
2779{
2781 DWORD pad_cks_tag[3];
2783
2787typedef struct tag_ISSUE_OATH_BLOB_t_v2
2788{
2793
2797typedef struct tag_OATH_PSKC_TRANSLATE_OUTPUT
2798{
2800 char szKeyId[OATH_MAX_PSK_LEN+1];
2802
2819
2820typedef struct tag_MOD_OATH_SA_v2
2821{
2831} OATH_SA_v2;
2832
2833
2834typedef struct tag_STAT_CLUSTER_IP
2835{
2836 char szIp[MAX_IP_LEN + 1];
2838
2839
2840//GMT
2841typedef struct tag_P11_DATE{
2842 char year[4]; /* the year ("1900" - "9999") */
2843 char month[2]; /* the month ("01" - "12") */
2844 char day[2]; /* the day ("01" - "31") */
2845} P11_DATE;
2846
2858
2859typedef struct tag_HOTP_INFO_EX
2860{
2861 DWORD dwStructId; //Structure identifier -> SA_ST_ID_HOTP_INFO_EX
2862 char szObjId[MAX_OBJ_NAME_LEN + 1]; //HSM HOTP object name
2863 DWORD dwObjAttr; //HSM object attributes
2864 DWORD dwObjHotpFlags; //SoftToken type -> SA_ATTR_OATH_USE_IMEI, SA_ATTR_OATH_USE_TIME ...
2865 char szStPin[MAX_HOTP_PIN + 1]; //SoftToken PIN
2866 char szStIMEI[MAX_HOTP_IMEI + 1]; //SoftToken related device's serial number
2867 char szStAppName[MAX_HOTP_APP_NAME + 1]; //SoftToken application name
2868 DBLOB *pdbStLogoImage; //SoftToken logo image
2869}HOTP_INFO_EX; //DESCONTINUADO!
2870
2871
2872//DGetNetInfo
2873typedef struct tag_SYS_NET_INFO
2874{
2875 BYTE pbMac[6];
2876 char szIp[MAX_IP_LEN + 1];
2877 char szMask[MAX_IP_LEN + 1];
2878 char szDefGateway[MAX_IP_LEN + 1];
2881 char szName[MAX_NET_NAME + 1];
2882} SYS_NET_INFO;
2883
2884typedef struct tag_SYS_NET_INFO_1
2885{
2888
2890 char szCommunity[NET_INFO_MAX_SNMP_C_STR + 1];
2891 char szSysContact[NET_INFO_MAX_SNMP_SC_STR + 1];
2892 char szSyaLocation[NET_INFO_MAX_SNMP_SL_STR + 1];
2895
2900typedef struct tag_SYS_HEALTH
2901{
2904}SYS_HEALTH;
2905
2912
2927
2940
2941
2942#define DN_MAX_HSM_ALIAS (128)
2943#define DN_UPACK_MAX_DESCRIPTION (255 + 1)
2944
2949typedef struct tag_SYS_PENDING_INFO
2950{
2952 char szPendingUpackDescription[DN_UPACK_MAX_DESCRIPTION];
2953 char szHsmAlias[DN_MAX_HSM_ALIAS+1];
2955
2956
2957typedef struct tag_SYS_HW_STR_INFO
2958{
2959 char szSerialNumber[GET_INFO_MAX_SN_LEN + 1];
2960 char szHardwareString[GET_INFO_MAX_HW_STR_LEN + 1];
2961 char szTpKey[GET_INFO_MAX_TPKEY_LEN + 1];
2963
2964typedef struct tag_SYS_NTP_SVR_INFO
2965{
2966 char szAddr[MAX_IP_LEN + 1];
2967 char szNtpqInfo[GET_INFO_MAX_NTPQ_LEN + 1];
2970 char szKeyType[GET_INFO_MAX_NTP_KT_LEN + 1];
2971 char szKeyMat[GET_INFO_MAX_NTP_KM_LEN + 1];
2973
2974typedef struct tag_SYS_NTP_INFO
2975{
2979
2980
2981
2982typedef struct tag_SYS_REPL_INFO
2983{
2990 DWORD dwaPeers[GET_INFO_MAX_REPL_NODES + 1]; //Zero terminated IPv4 array. Last item == 0x00000000
2991 DWORD dwaPendingAcks[GET_INFO_MAX_REPL_NODES + 1]; //Zero terminated IPv4 array. Last item == 0x00000000
2998 DWORD dwaNodes[GET_INFO_MAX_REPL_NODES + 1]; //Zero terminated IPv4 array. Last item == 0x00000000
3000
3001
3019
3020
3021typedef struct tag_REPL_NODE_MSG
3022{
3023 BYTE bOP; //RNM_PROBE, RNM_DOWN...
3026
3027
3028typedef struct tag_HOTP_CHAP
3029{
3030 DWORD dwStructId; //Structure Id -> SA_ST_ID_HOTP_CHAP
3031 char szChallenge[SA_HOTP_CHAP_LEN + 1]; //Server created challenge
3032}HOTP_CHAP;//DEPRECATED!
3033
3034typedef struct tag_HOTP_SYNC
3035{
3036 DWORD dwStructId; //Structure Id -> SA_ST_ID_HOTP_SYNC
3037 char szObjId[MAX_OBJ_NAME_LEN + 1]; //HOTPToken to synchronize
3038 char szOTP1[SA_TP_MAX_OTP_LEN]; //Expected response from HOTPToken
3039 char szOTP2[SA_TP_MAX_OTP_LEN]; //Server Counter Response
3040}HOTP_SYNC;
3041
3042typedef struct tag_HIP_PARAM
3043{
3047}HIP_PARAM; //DEPRECATED!
3048
3049typedef struct tag_HIP_OUTPUT
3050{
3051 char szHipChallenge[1];
3053 BYTE pbImage[1];
3054}HIP_OUTPUT; //DEPRECATED!
3055
3059typedef struct tag_USER_BLOCK
3060{
3061 char szUserId[MAX_USR_LEN+1];
3064}USER_BLOCK;
3065
3069typedef struct tag_DN_A_TOKEN
3070{
3071 char pcUserName[MAX_USR_LEN];
3073}DN_A_TOKEN;
3074
3079typedef struct tag_DN_A_TOKEN_FULL
3080{
3084
3096
3115
3116/* HTTP session parameters */
3117
3118#define MAX_HTTP_ADDR_LEN (2048)
3119#define MAX_HTTP_API_TOKEN_LEN (128)
3120
3130
3135typedef struct tag_AUTH_ATOKEN
3136{
3137 char szAddr[MAX_ADDR_LEN];
3138 int nPort;
3141
3146typedef struct tag_AUTH_WIN_CREDENTIAL
3147{
3148 char szAddr[MAX_ADDR_LEN];
3149 int nPort;
3151
3163
3173
3174/*
3175 Estados de autorização de partição do usuário.
3176*/
3177
3178#define ND_PA_ACL_OBJ_OPEN (ACL_OBJ_READ)
3179#define ND_PA_ACL_OBJ_EXPORT (ACL_OBJ_CREATE)
3180#define ND_PA_ACL_OBJ_DEL (ACL_OBJ_DEL)
3181#define ND_PA_ACL_OBJ_BLOCK (ACL_OBJ_UPDATE)
3182#define ND_PA_ACL_NS_DEL (ACL_USR_DELETE)
3183
3184#define NSAUTH_ACL_FULL (~0)
3185
3186/*
3187 Estados de autorização de partição do usuário.
3188*/
3189#define ND_PA_STATE_Unknown (0)
3190#define ND_PA_STATE_Absent (1)
3191#define ND_PA_STATE_Null (2)
3192#define ND_PA_STATE_Associated (3)
3193#define ND_PA_STATE_Authorized (4)
3194
3198typedef struct tag_USER_PA_INFO
3199{
3200 char szUserId[MAX_USR_LEN + 1];
3219
3227
3228typedef struct tab_EXT_MAP_2_OBJ_INFO
3229{
3231 char szObjId1[MAX_OBJ_ID_FQN_LEN];
3233 char szObjId2[MAX_OBJ_ID_FQN_LEN];
3235
3236
3242
3243typedef struct tag_PKCS11_OBJ_MAP
3244{
3247
3248 DWORD Class; // CKO_DATA, etc;
3249
3253
3254 //The three BYTEs below are overloaded
3255 //must use the MACROs to set the desired parameters.
3256 //Macros defined below.
3257
3258 BYTE Trusted; // boolean/overloaded
3259 BYTE WrapWithTrusted; // boolean/overloaded
3260 BYTE Local; // boolean/overloaded
3261
3266
3267//Trusted -> CKA_TRUSTED, CKA_DERIVE, CKA_ENCRYPT,
3268//CKA_DECRYPT, CKA_WRAP, CKA_UNWRAP
3269#define PKCS11_SET_FLAG(x, p) ((x) |= (1 << (p)))
3270#define PKCS11_UNSET_FLAG(x, p) ((x) &= ~(1 << (p)))
3271#define PKCS11_GET_FLAG(x, p) ((x) & (1 << (p)))
3272
3273//Enable driven option. Disabled by default.
3274#define PKCS11_SET_OBJ_MAP_CKA_TRUSTED(x) PKCS11_SET_FLAG(x, 7)
3275#define PKCS11_UNSET_OBJ_MAP_CKA_TRUSTED(x) PKCS11_UNSET_FLAG(x, 7)
3276#define PKCS11_GET_OBJ_MAP_CKA_TRUSTED(x) PKCS11_GET_FLAG(x, 7)
3277
3278//Disable driven option. Enabled by default.
3279#define PKCS11_SET_OBJ_MAP_CKA_DERIVE(x) PKCS11_UNSET_FLAG(x, 6)
3280#define PKCS11_UNSET_OBJ_MAP_CKA_DERIVE(x) PKCS11_SET_FLAG(x, 6)
3281#define PKCS11_GET_OBJ_MAP_CKA_DERIVE(x) (!PKCS11_GET_FLAG(x, 6))
3282
3283#define PKCS11_SET_OBJ_MAP_CKA_ENCRYPT(x) PKCS11_UNSET_FLAG(x, 5)
3284#define PKCS11_UNSET_OBJ_MAP_CKA_ENCRYPT(x) PKCS11_SET_FLAG(x, 5)
3285#define PKCS11_GET_OBJ_MAP_CKA_ENCRYPT(x) (!PKCS11_GET_FLAG(x, 5))
3286
3287#define PKCS11_SET_OBJ_MAP_CKA_DECRYPT(x) PKCS11_UNSET_FLAG(x, 4)
3288#define PKCS11_UNSET_OBJ_MAP_CKA_DECRYPT(x) PKCS11_SET_FLAG(x, 4)
3289#define PKCS11_GET_OBJ_MAP_CKA_DECRYPT(x) (!PKCS11_GET_FLAG(x, 4))
3290
3291#define PKCS11_SET_OBJ_MAP_CKA_WRAP(x) PKCS11_UNSET_FLAG(x, 3)
3292#define PKCS11_UNSET_OBJ_MAP_CKA_WRAP(x) PKCS11_SET_FLAG(x, 3)
3293#define PKCS11_GET_OBJ_MAP_CKA_WRAP(x) (!PKCS11_GET_FLAG(x, 3))
3294
3295#define PKCS11_SET_OBJ_MAP_CKA_UNWRAP(x) PKCS11_UNSET_FLAG(x, 2)
3296#define PKCS11_UNSET_OBJ_MAP_CKA_UNWRAP(x) PKCS11_SET_FLAG(x, 2)
3297#define PKCS11_GET_OBJ_MAP_CKA_UNWRAP(x) (!PKCS11_GET_FLAG(x, 2))
3298
3299//WrapWithTrusted
3300
3301//Enable driven option. Disabled by default.
3302#define PKCS11_SET_OBJ_MAP_CKA_WRAP_WITH_TRUSTED(x) PKCS11_SET_FLAG(x, 7)
3303#define PKCS11_UNSET_OBJ_MAP_CKA_WRAP_WITH_TRUSTED(x) PKCS11_UNSET_FLAG(x, 7)
3304#define PKCS11_GET_OBJ_MAP_CKA_WRAP_WITH_TRUSTED(x) PKCS11_GET_FLAG(x, 7)
3305
3306//Local
3307//Enable driven option. Disabled by default.
3308#define PKCS11_SET_OBJ_MAP_CKA_LOCAL(x) PKCS11_SET_FLAG(x, 7)
3309#define PKCS11_UNSET_OBJ_MAP_CKA_LOCAL(x) PKCS11_UNSET_FLAG(x, 7)
3310#define PKCS11_GET_OBJ_MAP_CKA_LOCAL(x) PKCS11_GET_FLAG(x, 7)
3311
3312//DAdmOperation options - AO_SET_PWD_SEC_POLICY/AO_GET_PWD_SEC_POLICY
3313
3314#define PWD_SEC_POLICY_USE_MIN_PWD_LEN (8)
3315#define PWD_SEC_POLICY_USE_MAX_PWD_LEN (16)
3317typedef struct tag_PWD_SEC_POLICY
3318{
3319 //USE
3320 BYTE bMaxInvalidLogins; //Number of attempts. 0 == sets to HSM internal default.
3321 BYTE bExpiration; //Number of days. 0 == disable policy.
3322 BYTE bHistory; //Number of passwords to track. 0 == disable policy.
3323 //FORMAT
3324 BYTE bMinLength; //Minimal number of chars (ASCII).
3325 BYTE bMinSpecial; //Minimal number of non-alpha chars.
3326 BYTE bUpper; //Minimal number of upper-case chars.
3327 BYTE bLower; //Minimal number of lower-case chars.
3329
3333typedef struct tag_EFT_VISA_KEY_PARTS
3334{
3335 BYTE pbKeyPart1[3 * DES_BLOCK];
3336 BYTE pbKeyPart1Checksum[EFT_VISA_KEY_CHECKSUM_LEN];
3337 BYTE pbKeyPart2[3 * DES_BLOCK];
3338 BYTE pbKeyPart2Checksum[EFT_VISA_KEY_CHECKSUM_LEN];
3339 BYTE pbKeyPart3[3 * DES_BLOCK];
3340 BYTE pbKeyPart3Checksum[EFT_VISA_KEY_CHECKSUM_LEN];
3343
3347typedef struct tag_EFT_AES_KEY_PARTS
3348{
3349 BYTE pbKeyPart1[ALG_AES_256_LEN];
3350 BYTE pbKeyPart2[ALG_AES_256_LEN];
3351 BYTE pbKeyPart3[ALG_AES_256_LEN];
3354
3358typedef struct tag_EFT_AES_KEY_PARTS_DATA
3359{
3363
3367typedef struct tag_EFT_FULL_CKS_KEY_PARTS
3368{
3369 BYTE pbKeyPart1[3 * DES_BLOCK];
3370 BYTE pbKeyPart1Checksum[DES_BLOCK];
3371 BYTE pbKeyPart2[3 * DES_BLOCK];
3372 BYTE pbKeyPart2Checksum[DES_BLOCK];
3373 BYTE pbKeyPart3[3 * DES_BLOCK];
3374 BYTE pbKeyPart3Checksum[DES_BLOCK];
3375 BYTE pbMKCheckSum[DES_BLOCK];
3377
3382typedef struct tag_DN_CALC_ARPC_EMV_METHOD_1
3383{
3384 char szIssuerMK[MAX_OBJ_ID_BIN_LEN];
3385 char szPAN[MAX_PAN_LEN];
3387 BYTE pbARQC[DES_BLOCK];
3389 BYTE pbNONCE[DES_BLOCK];
3392
3393typedef struct tag_DN_CALC_ARPC_EMV_METHOD_2
3394{
3395 char szIssuerMK[MAX_OBJ_ID_BIN_LEN];
3396 char szPAN[MAX_PAN_LEN];
3398 BYTE pbNONCE[DES_BLOCK];
3401 BYTE pbARQC[DES_BLOCK];
3407
3408
3422
3428typedef struct tag_DS_BIND_INFO
3429{
3432 char szHSM[D_MAX_DS_BIND_B62_ID + 1];
3435 char szAccount[D_MAX_DS_BIND_B62_ID + 1];
3440 char szURL[D_MAX_DS_BIND_URL + 1];
3442} DS_BIND_INFO;
3443
3444#define DN_RCC_MAX_NODE_COUNT (16)
3445#define DN_RCC_MAX_REPL_MC_VER (256)
3446
3451typedef struct tag_CROSS_CHECK_NODE
3452{
3457 char szVersion[DN_RCC_MAX_REPL_MC_VER];
3459
3460/*
3461 Blockchain module
3462*/
3463
3464/* DBchainCreateXPrv */
3465
3466// Types
3467#define DN_BCHAIN_BTC_MINIKEY (1)
3468#define DN_BCHAIN_BIP32_SEED_XPRV (2)
3469#define DN_BCHAIN_BIP39_SEED_XPRV (3)
3470#define DN_BCHAIN_BIP32_XPRV (4)
3471#define DN_BCHAIN_BIP32_ED25519_XPRV (5)
3473// Version
3474#define DN_BCHAIN_VER_BIP32_MAINNET (DN_BCHAIN_VER_WIF_MAIN_NET)
3475#define DN_BCHAIN_VER_BIP32_TESTNET (DN_BCHAIN_VER_WIF_TEST_NET)
3476#define DN_BCHAIN_VER_BIP32_HTR_MAINNET (1)
3477#define DN_BCHAIN_VER_BIP32_HTR_TESTNET (2)
3479#define DN_BCHAIN_BIP32_SEED_LEN_MAX (765)
3483typedef struct tag_DN_BCHAIN_BIP32_SEED_XPRV_DATA
3484{
3489
3490#define DN_BCHAIN_BIP39_SEED_LEN_MAX (765)
3491#define DN_BCHAIN_BIP39_PWD_LEN_MAX (255)
3496typedef struct tag_DN_BCHAIN_BIP39_SEED_XPRV_DATA
3497{
3502
3503#define DN_BCHAIN_KEY_INFO_ST_SL (0)
3504#define DN_BCHAIN_KEY_INFO_ST_BLKC (1)
3506/* DBchainCreateBip32Ckd */
3507
3511typedef struct tag_DN_BCHAIN_KEY_INFO
3512{
3515 BYTE pbBip32Ver[4];
3517 BYTE pbParentFingerprint[4];
3518 BYTE pbChildNumber[4];
3520
3521/* DBchainVerify */
3522
3526typedef struct tag_DN_BCHAIN_PBK
3527{
3532
3533/*
3534 DMofNSplit
3535*/
3536
3537#define DN_M_OF_N_S_LEN (24)
3538#define DN_M_OF_N_ES_LEN (32)
3539#define DN_M_OF_N_S_MIN (2)
3540#define DN_M_OF_N_S_MAX (16)
3541#define DN_M_OF_N_PART_LEN (3 + DN_M_OF_N_S_LEN)
3546typedef struct tag_DN_M_OF_N_PART_DETAILS
3547{
3553
3557typedef struct tag_DN_M_OF_N_PART
3558{
3561
3565typedef struct tag_DN_M_OF_N_SPLIT_INFO
3566{
3572
3583
3587typedef struct tag_DN_OBJ_STATS
3588{
3591} DN_OBJ_STATS;
3592
3598#define DN_GLOBAL_OBJ_STATS_COUNT (39)
3600#define DN_GLOBAL_OBJ_STATS_INDEX_RSA (0)
3601#define DN_GLOBAL_OBJ_STATS_INDEX_DSA (1)
3602#define DN_GLOBAL_OBJ_STATS_INDEX_ECC (2)
3603#define DN_GLOBAL_OBJ_STATS_INDEX_ECX (3)
3604#define DN_GLOBAL_OBJ_STATS_INDEX_AES (4)
3605#define DN_GLOBAL_OBJ_STATS_INDEX_DES (5)
3606#define DN_GLOBAL_OBJ_STATS_INDEX_CSP (6)
3607#define DN_GLOBAL_OBJ_STATS_INDEX_BCHAIN (7)
3608#define DN_GLOBAL_OBJ_STATS_INDEX_X509 (8)
3609#define DN_GLOBAL_OBJ_STATS_INDEX_PKCS7 (9)
3615typedef struct tag_DN_GLOBAL_OBJ_STATS
3616{
3620
3621/* DSKeepProbeSecret */
3622
3626typedef struct tag_SKeepProbeInfo
3627{
3631
3632/* DSKeepSplitSecret e outros */
3633#define DN_SKEEP_M_OF_N_S_MIN (2)
3634#define DN_SKEEP_M_OF_N_S_MAX (16)
3635#define DN_SKEEP_M_OF_N_S_LEN (64)
3640typedef struct tag_SKeepRecoverInfo
3641{
3643 char szSecret[DN_SKEEP_M_OF_N_S_LEN + 1];
3645
3649typedef struct tag_SKeepShare
3650{
3651 char szShare[DN_SKEEP_M_OF_N_S_LEN + 1];
3652} SKeepShare;
3653
3654// DSCGetShadow
3655#define DN_SC_M_OF_N_SHADOW_MATERIAL_V1_LEN (24)
3656#define DN_SC_M_OF_N_SHADOW_MATERIAL_V2_LEN (56)
3657#define DN_SC_M_OF_N_SHADOW_EXTRA_DATA_LEN (3)
3659#define DN_SC_M_OF_N_SHADOW_MATERIAL_MAX_LEN (DN_SC_M_OF_N_SHADOW_MATERIAL_V2_LEN)
3660#define DN_SC_M_OF_N_SHADOW_MAX_LEN (DN_SC_M_OF_N_SHADOW_MATERIAL_V2_LEN + DN_SC_M_OF_N_SHADOW_EXTRA_DATA_LEN)
3662#define DN_SC_MAX_PIN_LEN (8)
3664#define DN_SC_M_OF_N_SHADOW_V1_TYPE (1)
3665#define DN_SC_M_OF_N_SHADOW_V2_TYPE (2)
3670typedef struct tag_DN_SC_M_OF_N_SHADOW_DETAILS
3671{
3677
3681typedef struct tag_DN_SC_M_OF_N_SHADOW
3682{
3686
3687#ifdef _WIN32
3688 #pragma pack(pop)
3689#else
3690 #pragma pack()
3691#endif
3692
3693/* Library exported functions */
3694
3695#ifdef __cplusplus
3696 extern "C" {
3697#endif /* __cplusplus */
3698
3704#define DN_INIT_PARAM_CONF_FAST_FAIL (128)
3716 DWORD dwReserved
3717);
3718
3735 void *pvList,
3736 DWORD dwListCount,
3737 DWORD dwReserved);
3738
3754 void *pvList,
3755 DWORD *pdwListCount,
3756 DWORD dwReserved);
3757
3794 HSESSIONCTX * phSession,
3795 DWORD dwParam,
3796 BYTE * pbData,
3797 DWORD dwDataLen,
3798 DWORD dwFlags
3799);
3800
3818 HSESSIONCTX hSession,
3819 DWORD dwParam,
3820 BYTE * pbData,
3821 DWORD dwDataLen,
3822 DWORD dwFlags
3823);
3824
3845 HSESSIONCTX hSession,
3846 DWORD dwParam,
3847 BYTE* pbData,
3848 DWORD* pdwDataLen,
3849 DWORD dwFlags
3850);
3851
3866 HSESSIONCTX * phSession,
3867 DWORD dwFlags
3868);
3869
3878
3894typedef int (AAP_API * funcListKeyCallback)(char *szKeyName, void *pParam, BOOL bFinal);
3895
3900 HSESSIONCTX hSession,
3901 funcListKeyCallback fncallback,
3902 void *pParam
3907);
3908
3913 HSESSIONCTX hSession,
3914 funcListKeyCallback fncallback,
3915 void *pParam
3920);
3921
3944 HSESSIONCTX hSession,
3945 char * szBackupFile,
3946 char * szPin,
3947 int nDirection
3948);
3949
3977 DWORD dwOP,
3978 char *szObjectId,
3979 char *szPin,
3980 BYTE *pbData,
3981 DWORD *pdwDataLen,
3982 DWORD dwReserved );
3983
3991typedef int (AAP_API * funcLogEventCallback)(char *szEvent, void *pParam, BOOL bFinal);
3992
4005 HSESSIONCTX hSession,
4006 funcLogEventCallback fncallback,
4007 void *pParam
4008);
4009
4051 HSESSIONCTX hSession,
4052 DWORD dwParam,
4053 BYTE * pbData,
4054 DWORD dwDataLen,
4055 DWORD dwFlags
4056);
4057
4074int AAP_API DGetHSMTLSCert(char *szAddress,
4075 int nPort,
4076 DWORD dwOutFormat,
4077 BYTE **ppbOutCert,
4078 DWORD *pdwOutCertLen,
4079 DWORD dwFlags);
4080
4081#define DN_NT_MAX_TARGET_LEN (255)
4082#define DN_NTOOL_PING (1)
4083#define DN_NTOOL_TRACERT (2)
4084#define DN_NTOOL_CROSS_CHECK (100)
4085
4104 DWORD dwOption,
4105 const char *szTarget,
4106 void **pvResult,
4107 DWORD *pdwResultLen,
4108 DWORD dwFlags);
4109
4110#define DN_WRITE_FILE_OPT_CERT_CHAIN (1)
4111#define DN_WRITE_FILE_OPT_NO_CONVERSION (2)
4112
4137 const char *szFileId,
4138 BYTE *pbFile,
4139 DWORD dwFileSize,
4140 DWORD dwOptions);
4141
4152typedef int (AAP_API * funcReadLocalFileCallback)(BYTE *pbData, DWORD * pdwDataLen, void *pParam, BOOL *pbFinal);
4153
4176 HSESSIONCTX hSession,
4177 char * szFileId,
4178 DWORD dwFileSize,
4179 funcReadLocalFileCallback fncallback,
4180 void *pParam
4181);
4182
4193typedef int (AAP_API * funcWriteLocalFileCallback)(BYTE *pbData, DWORD dwDataLen, void *pParam, BOOL bFinal);
4194
4208 HSESSIONCTX hSession,
4209 char * szFileId,
4210 funcWriteLocalFileCallback fncallback,
4211 void *pParam
4212);
4213
4228 const char *szFileId,
4229 BYTE **ppbData,
4230 DWORD *pdwDataLen,
4231 DWORD dwReserved);
4232
4242 HSESSIONCTX hSession,
4243 char *szObjId);
4244
4259 HSESSIONCTX hSession,
4260 DWORD dwStart,
4261 DWORD dwOffset,
4262 DWORD *pdwLogSize,
4263 BYTE **ppbLog
4264);
4265
4276 HSESSIONCTX hSession
4277);
4278
4303int AAP_API DFindHSM( DWORD dwServiceType,
4304 DWORD dwFilter,
4305 void **ppvOutputData,
4306 DWORD *pdwOutputDataLen,
4307 DWORD dwFlags );
4308
4317typedef int (AAP_API * funcListAKeysCallback)(void *pvToken, void *pParam, BOOL bFinal);
4318
4366 BYTE bOP,
4367 DN_A_TOKEN_FULL *pstATokenFull,
4368 funcListAKeysCallback fnCallBack,
4369 void *pvCallbackParam,
4370 DWORD dwParam);
4371
4372#define DN_ATOKEN_CACHE_GET_COUNT (0)
4373#define DN_ATOKEN_CACHE_GC (1)
4374
4401 DWORD dwOP,
4402 void *pOutData,
4403 DWORD dwParam);
4404
4414 const char *szBindKey,
4415 DWORD dwReserved);
4424 DWORD dwReserved);
4425
4434int AAP_API DSCGetShadow(const char *szPin, DN_SC_M_OF_N_SHADOW *pstShadow, DWORD dwReserved);
4435
4436// DNSAuthSetState
4437#define DN_S_NSAUTH_ASSOC (1)
4438#define DN_S_NSAUTH_RESET (2)
4439#define DN_S_NSAUTH_AUTH (3)
4440#define DN_S_NSAUTH_eAUTH (4)
4441#define DN_S_NSAUTH_CHECK (5)
4471 int AAP_API DNSAuthSetState(HSESSIONCTX hSession, DWORD dwAcl, BYTE bState,
4472 DN_SC_M_OF_N_SHADOW *pstShadows, DWORD dwShadowsCount,
4473 DWORD dwReserved);
4474
4475 /* Error codes */
4476
4480 int AAP_API DGetErrorString(int nErrorValue,
4481 char *szErrorCode,
4482 char *szErrorDesc);
4483
4487 typedef enum tag_RetCodeMsgType
4488 {
4490 DESC_MSG
4492
4506 const char *AAP_API DGetReturnCodeString(int nErrorValue,
4507 RetCodeMsgType eErrorType);
4508
4512 BYTE bOP,
4513 char *szUser,
4514 char *szIP,
4515 int(AAP_API *ListIpFilterCallback)(void *pInData, DWORD dwInDataLen, void *pParam, BOOL bFinal),
4516 void *pParam,
4517 DWORD *pdwStatus,
4518 DWORD dwReserved);
4519
4521 char *szOldObjName,
4522 char *szNewObjName,
4523 DWORD dwFlags);
4524
4525 int AAP_API DUPackPush(HSESSIONCTX hSession, DWORD dwPackSize,
4526 BYTE *pbPack);
4527
4528 int AAP_API DUPackInfo(DWORD dwPackSize, BYTE *pbPack,
4529 DWORD *pdwUPackVersion, BYTE **ppbUPackDescr,
4530 BYTE **ppbUPackSignature);
4531
4532 int AAP_API DGetObjInfo(const HSESSIONCTX hSession, const char *szObjId,
4533 const int nAlgId, const BYTE *pbData,
4534 DWORD *pdwDataLen);
4535
4536 int AAP_API DGenerateMapObj(const HSESSIONCTX hSession, const char *szMapId,
4537 const char *szObj1Id, const int nObj1AlgId,
4538 const char *szObj2Id, const int nObj2AlgId);
4539
4540 int AAP_API DRemoveMapObj(const HSESSIONCTX hSession, const char *szMapObjId);
4541
4543 int(AAP_API *ListUserSessionsCallback)(DWORD dwStartTime, char *szInfo, void *pParam, BOOL bFinal),
4544 void *pParam);
4545
4547 DWORD dwFilterType,
4548 void *pvFilter,
4549 int(AAP_API *ListObjCallback)(void *pvIN, void *pParam, BOOL bFinal),
4550 void *pParam);
4551
4553 int(AAP_API *ListLoadedModulesCallback)(char *szModuleInfo,
4554 void *pParam,
4555 BOOL bFinal),
4556 void *pParam);
4557
4588 HSESSIONCTX hSession,
4589 struct USER_INFO userInfo);
4590
4604 HSESSIONCTX hSession,
4605 char *szUserId);
4606
4630 HSESSIONCTX hSession,
4631 DWORD dwParam,
4632 BYTE *pbData,
4633 DWORD dwDataLen,
4634 DWORD dwFlags);
4635
4654 HSESSIONCTX hSession,
4655 DWORD dwParam,
4656 BYTE *pbData,
4657 DWORD *pdwDataLen,
4658 DWORD dwFlags);
4659
4669 typedef int(AAP_API *funcListUsersCallback)(char *szUserName, void *pParam, BOOL bFinal);
4670
4681 HSESSIONCTX hSession,
4682 funcListUsersCallback fncallback,
4683 void *pParam);
4684
4685 // OATH SA
4686
4707 const char *szUserId,
4708 const DWORD dwParam,
4709 BYTE *pbData,
4710 const DWORD dwDataLen);
4711
4725 const DWORD dwParam,
4726 const char *szUserId);
4727
4740 int AAP_API DOATHResync(const HSESSIONCTX hSession,
4741 char *szUser,
4742 char *szOTP1,
4743 char *szOTP2,
4744 DWORD dwParam);
4745
4748 /* PKCS#11 */
4749
4750 int AAP_API DGeneratePkcs11Map(HSESSIONCTX hSession, char *szP11MapId,
4751 BYTE bTemporary, DWORD dwBlobType,
4752 DWORD dwFlags, BYTE *pbData,
4753 DWORD dwDataLen);
4754
4755 int AAP_API DUpdatePkcs11Map(HSESSIONCTX hSession, char *szP11MapId,
4756 DWORD dwBlobType, DWORD dwFlags,
4757 DWORD dwUpdateMask, BYTE *pbData,
4758 DWORD dwDataLen);
4759
4760 int AAP_API DGetPkcs11Map(HSESSIONCTX hSession, char *szP11MapId,
4761 DWORD dwBlobType, DWORD dwFlags,
4762 BYTE **ppbData, DWORD *pdwDataLen);
4763
4765 int(AAP_API *ListKeyCallback)(char *szKeyName,
4766 void *pParam,
4767 BOOL bFinal),
4768 void *pParam);
4769
4770
4771#define MNG_OBJ_META_A_KEY_TYPE (1)
4772#define MNG_OBJ_META_A_CLASS (2)
4773#define MNG_OBJ_META_A_EXTRACTABLE (3)
4774#define MNG_OBJ_META_A_SENSITIVE (4)
4775#define MNG_OBJ_META_A_N_EXTRACTABLE (5)
4776#define MNG_OBJ_META_A_LOCAL (6)
4777#define MNG_OBJ_META_A_CERT_TYPE (7)
4778#define MNG_OBJ_META_A_RSA_MODULUS (8)
4779#define MNG_OBJ_META_A_RSA_PUB_EXP (9)
4780#define MNG_OBJ_META_A_PUB_KEY_INFO (10)
4781#define MNG_OBJ_META_A_EC_PARAMS (11)
4782#define MNG_OBJ_META_A_SUBJECT (12)
4783#define MNG_OBJ_META_A_ISSUER (13)
4784#define MNG_OBJ_META_A_SN (14)
4785#define MNG_OBJ_META_A_TOKEN (15)
4786#define MNG_OBJ_META_A_MODIFIABLE (16)
4787#define MNG_OBJ_META_A_DERIVE (17)
4788#define MNG_OBJ_META_A_WRAP (18)
4789#define MNG_OBJ_META_A_UNWRAP (19)
4790#define MNG_OBJ_META_A_SIGN (20)
4791#define MNG_OBJ_META_A_VERIFY (21)
4792#define MNG_OBJ_META_A_ENCRYPT (22)
4793#define MNG_OBJ_META_A_DECRYPT (23)
4794#define MNG_OBJ_META_A_OBJ_ID (24)
4795#define MNG_OBJ_META_A_MODULUS_BITS (25)
4796#define MNG_OBJ_META_A_PRIVATE (26)
4797#define MNG_OBJ_META_A_LABEL (27)
4798#define MNG_OBJ_META_A_ID (28)
4799#define MNG_OBJ_META_A_APPLICATION (29)
4800#define MNG_OBJ_META_A_TRUSTED (30)
4801#define MNG_OBJ_META_A_JMIDP_SEC_DOMAIN (31)
4802#define MNG_OBJ_META_A_CERT_CATEGORY (32)
4803#define MNG_OBJ_META_A_KEY_GEN_MECHANISM (33)
4804#define MNG_OBJ_META_A_WRAP_WITH_TRUSTED (34)
4805#define MNG_OBJ_META_A_HSM_ASSOCIATE (35)
4806#define MNG_OBJ_META_A_SIGN_RECOVER (36)
4807#define MNG_OBJ_META_A_VERIFY_RECOVER (37)
4808
4809#define MNG_OBJ_META_A_HSM_OBJ_VERSION (502)
4810#define MNG_OBJ_META_A_HSM_OBJ_TYPE (503)
4811#define MNG_OBJ_META_A_HSM_OBJ_ATTR (504)
4812#define MNG_OBJ_META_A_HSM_OBJ_LEN (505)
4813#define MNG_OBJ_META_A_HSM_OBJ_ID (506)
4814#define MNG_OBJ_META_A_HSM_OBJ_PVALUE (507)
4815#define MNG_OBJ_META_A_HSM_OBJ_CNG_UTF8_ID (508) // Client side attribute
4816
4817#define MNG_OBJ_META_READ_ONLY_ATTR(a) ((MNG_OBJ_META_A_KEY_TYPE == (a)) || \
4818 (MNG_OBJ_META_A_CLASS == (a)) || \
4819 (MNG_OBJ_META_A_EXTRACTABLE == (a)) || \
4820 (MNG_OBJ_META_A_SENSITIVE == (a)) || \
4821 (MNG_OBJ_META_A_N_EXTRACTABLE == (a)) || \
4822 (MNG_OBJ_META_A_LOCAL == (a)) || \
4823 (MNG_OBJ_META_A_CERT_TYPE == (a)) || \
4824 (MNG_OBJ_META_A_RSA_MODULUS == (a)) || \
4825 (MNG_OBJ_META_A_RSA_PUB_EXP == (a)) || \
4826 (MNG_OBJ_META_A_PUB_KEY_INFO == (a)) || \
4827 (MNG_OBJ_META_A_EC_PARAMS == (a)) || \
4828 (MNG_OBJ_META_A_ISSUER == (a)) || \
4829 (MNG_OBJ_META_A_SN == (a)) || \
4830 (MNG_OBJ_META_A_TOKEN == (a)) || \
4831 (MNG_OBJ_META_A_MODIFIABLE == (a)) || \
4832 (MNG_OBJ_META_A_MODULUS_BITS == (a)) || \
4833 (MNG_OBJ_META_A_PRIVATE == (a)) || \
4834 (MNG_OBJ_META_A_HSM_OBJ_VERSION == (a)) || \
4835 (MNG_OBJ_META_A_HSM_OBJ_TYPE == (a)) || \
4836 (MNG_OBJ_META_A_HSM_OBJ_ATTR == (a)) || \
4837 (MNG_OBJ_META_A_HSM_OBJ_LEN == (a)) || \
4838 (MNG_OBJ_META_A_HSM_OBJ_ID == (a)) || \
4839 (MNG_OBJ_META_A_HSM_OBJ_PVALUE == (a)) || \
4840 (MNG_OBJ_META_A_DERIVE == (a)) || \
4841 (MNG_OBJ_META_A_WRAP == (a)) || \
4842 (MNG_OBJ_META_A_UNWRAP == (a)) || \
4843 (MNG_OBJ_META_A_SIGN == (a)) || \
4844 (MNG_OBJ_META_A_VERIFY == (a)) || \
4845 (MNG_OBJ_META_A_ENCRYPT == (a)) || \
4846 (MNG_OBJ_META_A_DECRYPT == (a)) || \
4847 (MNG_OBJ_META_A_SIGN_RECOVER == (a)) || \
4848 (MNG_OBJ_META_A_VERIFY_RECOVER == (a)))
4849
4850/* DManageObjMetadata */
4851
4852#define MNG_OBJ_META_GET (1)
4853#define MNG_OBJ_META_UPDATE (3)
4854#define MNG_OBJ_META_DEL (4)
4855
4856
4858 DWORD dwParam );
4859
4861 DWORD dwParam );
4862
4864 DWORD dwOption,
4865 void *pvOptionData,
4866 DWORD dwOptionDataLen,
4867 DWORD dwParam );
4868
4870 DWORD dwOption,
4871 DWORD dwParam );
4872
4874 DWORD dwOption,
4875 void *pvOptionData,
4876 DWORD *pdwOptionDataLen,
4877 DWORD dwParam );
4878
4880 char *szData,
4881 DWORD dwDataLen,
4882 DWORD dwParam);
4883
4885 char *szData,
4886 DWORD *pdwDataLen,
4887 DWORD dwParam);
4888
4890 BYTE bOP,
4891 char *szObjName,
4892 HOBJMETACTX hInMeta,
4893 HOBJMETACTX *phOutMeta,
4894 DWORD dwParam );
4895
4897 HOBJMETACTX hInMeta,
4898 HOBJMETASEARCHCTX *phMetaSearchCtx,
4899 DWORD dwParam );
4900
4902 HOBJMETACTX *phOutMeta,
4903 DWORD dwOutMetaMaxCount,
4904 DWORD *pdwOutMetaDataCount,
4905 DWORD dwParam );
4906
4908 DWORD dwParam );
4909
4910#define MNG_OBJ_META_TYPE_ULONG (1)
4911#define MNG_OBJ_META_TYPE_STR (2)
4912#define MNG_OBJ_META_TYPE_BOOL (3)
4913#define MNG_OBJ_META_TYPE_INT_BOOL (4)
4914
4915typedef struct tag_OBJ_MET_ATTR
4916{
4918 const char *pszString;
4921
4923 void *pvData,
4924 DWORD *pdwDataLen,
4925 DWORD dwReserved );
4926
4928
4929
4930#define DN_MAX_OBJ_JSON_STRING (15 * 1024)
4932#define DN_JSON_OUT_TYPE_PRETTY (0)
4933#define DN_JSON_OUT_TYPE_RAW (1)
4934#define DN_JSON_OUT_TYPE_COMPACT (2)
4953 const char *szId,
4954 DWORD dwOutType,
4955 char **pszOutJson,
4956 DWORD *pdwOutJsonLen);
4957
4970 const char *szId,
4971 const char *szJson,
4972 DWORD dwJsonLen,
4973 DWORD dwReserved);
4974/* P11 HSM Info */
4975
4977 HP11ATTRCTX *phOutMeta,
4978 DWORD dwParam );
4979
4980#define MNG_HSM_P11_INFO_SLOT_DESC (1)
4981#define MNG_HSM_P11_INFO_MANUFACTURER_ID (2)
4982#define MNG_HSM_P11_INFO_SLOT_FLAGS (3)
4983#define MNG_HSM_P11_INFO_HDW_VERSION (4)
4984#define MNG_HSM_P11_INFO_FMW_VERSION (5)
4985#define MNG_HSM_P11_INFO_LABEL (6)
4986#define MNG_HSM_P11_INFO_MODEL (7)
4987#define MNG_HSM_P11_INFO_SERIAL_NUMBER (8)
4988#define MNG_HSM_P11_INFO_TOKEN_FLAGS (9)
4989#define MNG_HSM_P11_INFO_UTC_TIME (10)
4990#define MNG_HSM_P11_INFO_MAX_SESSION_COUNT (11)
4991#define MNG_HSM_P11_INFO_SESSION_COUNT (12)
4992#define MNG_HSM_P11_INFO_MAX_RW_SESS_COUNT (13)
4993#define MNG_HSM_P11_INFO_RW_SESS_COUNT (14)
4994#define MNG_HSM_P11_INFO_MAX_PIN_LEN (15)
4995#define MNG_HSM_P11_INFO_MIN_PIN_LEN (16)
4996#define MNG_HSM_P11_INFO_TOTAL_PUB_MEMORY (17)
4997#define MNG_HSM_P11_INFO_FREE_PUB_MEMORY (18)
4998#define MNG_HSM_P11_INFO_TOTAL_PRIV_MEMORY (19)
4999#define MNG_HSM_P11_INFO_FREE_PRIV_MEMORY (20)
5000#define MNG_HSM_P11_INFO_SVMK_FINGERPRINT (21)
5001#define MNG_HSM_INFO_TAMPERED_HSM (22)
5002#define MNG_HSM_INFO_OP_MODE (23)
5003#define MNG_HSM_INFO_DS_BOUND (24)
5004#define MNG_HSM_INFO_DS_HSM (25)
5005#define MNG_HSM_INFO_DS_ACCOUNT (26)
5006#define MNG_HSM_INFO_DS_URL (27)
5007#define MNG_HSM_INFO_DNS1 (28)
5008#define MNG_HSM_INFO_DNS2 (29)
5009#define MNG_HSM_INFO_REMOOT (30)
5010
5012 DWORD dwOption,
5013 void *pvOptionData,
5014 DWORD *pdwOptionDataLen,
5015 DWORD dwParam );
5016
5018 DWORD dwParam );
5019
5021
5022
5023
5024/* Users */
5025
5026
5027int AAP_API DGetUserAcl ( HSESSIONCTX hSession, char *szUser,
5028 DWORD *pdwUserAcl );
5029
5030int AAP_API DListUserTrusts(HSESSIONCTX hSession, char *szUserId,
5031 BYTE bType,
5032 int (AAP_API * ListUserTrustCallback)(char *szUserName,
5033 DWORD dwACL,
5034 void *pParam,
5035 BOOL bFinal),
5036 void *pParam);
5037
5038
5039/* Statistics */
5040
5041int AAP_API DGetHsmInfo(HSESSIONCTX hSession, BOOL *pbFinal,
5042 DWORD dwParam, BYTE * pbData,
5043 DWORD* pdwDataLen, DWORD dwFlags);
5044
5045
5046/* Local operations */
5047
5049 BYTE * pbData, DWORD dwDataLen,
5050 DWORD dwFlags);
5051
5053 BYTE * pbData, DWORD *pdwDataLen,
5054 DWORD dwFlags);
5055
5056int AAP_API DGetLibVersion(HSESSIONCTX hSession, char * szVersion,
5057 DWORD *pdwVersionLen, DWORD dwFlags);
5058
5059
5060/* Key management */
5061
5062int AAP_API DECParam2AlgId(BYTE *pbECParam, DWORD dwECParamLen,
5063 int *pnAlgId, DWORD dwFlags);
5064
5065int AAP_API DECPubKeyDER2AlgId( BYTE *pbECPubKeyDER,
5066 DWORD dwECPubKeyDERLen,
5067 int *pnAlgId,
5068 DWORD dwFlags );
5069
5241 HSESSIONCTX hSession,
5242 char *szKeyId,
5243 int nAlgId,
5244 DWORD dwFlags,
5245 HKEYCTX * phKey
5246);
5247
5261 int nAlgId,
5262 BYTE *pbData,
5263 DWORD *pdwDataLen,
5264 DWORD dwReserved);
5265
5284 HSESSIONCTX hSession,
5285 char *szKeyId,
5286 DWORD dwFlags,
5287 HKEYCTX * phKey
5288);
5289
5290
5291
5292#define D_IMPORT_ALG_PRIV_KEY_RSA (0xFFFFFFE1) /* Importa uma chave privada RSA. */
5293#define D_IMPORT_ALG_PRIV_KEY_ECC (0xFFFFFFE0) /* Importa uma chave privada ECC(Curvas Elípticas com exceção de ECX). */
5294#define D_IMPORT_ALG_PRIV_KEY_P8 (0xFFFFFFDF) /* Importa uma chave no formato P8 */
5295#define D_IMPORT_ALG_PRIV_KEY_ECX (0xFFFFFFDE) /* Import uma chave privada ECX */
5296
5376 HSESSIONCTX hSession,
5377 char *szKeyId,
5378 HKEYCTX hKEKey,
5379 DWORD dwBlobType,
5380 int nAlgId,
5381 DWORD dwFlags,
5382 BYTE * pbData,
5383 DWORD dwDataLen,
5384 HKEYCTX * phKey
5385);
5386
5402 HKEYCTX hKey,
5403 HKEYCTX hKEKey,
5404 DWORD dwBlobType,
5405 DWORD dwFlags,
5406 BYTE * pbData,
5407 DWORD * pdwDataLen
5408);
5409
5443 HSESSIONCTX hSession,
5444 char *szKeyId,
5445 char *szSecret,
5446 DWORD dwKeyAlg,
5447 DWORD dwAttrib,
5448 BYTE *pbKeyEnvelope,
5449 DWORD dwKeyEnvelopeLen
5450);
5451
5465 HSESSIONCTX hSession,
5466 char *szKeyId,
5467 char *szSecret,
5468 BYTE **ppbKeyEnvelope,
5469 DWORD *pdwKeyEnvelopeLen
5470);
5471
5492 HKEYCTX hKey,
5493 DWORD dwParam,
5494 BYTE * pbData,
5495 DWORD dwDataLen,
5496 DWORD dwFlags
5497);
5498
5523 HKEYCTX hKey,
5524 DWORD dwParam,
5525 BYTE * pbData,
5526 DWORD *pdwDataLen,
5527 DWORD dwFlags
5528);
5529
5542 HHASHCTX hHash,
5543 char * szKeyId,
5544 int nAlgId,
5545 DWORD dwFlags,
5546 HKEYCTX * phKey
5547);
5548
5561 HKEYCTX hKey,
5562 DWORD dwFlags,
5563 HKEYCTX * phKey
5564);
5565
5578 HKEYCTX hKey,
5579 HHASHCTX hHash,
5580 DWORD dwFlags
5581);
5582
5595 HKEYCTX * phKey,
5596 DWORD dwFlags
5597);
5598
5636 char *szPrivateKeyName,
5637 BYTE bVersion,
5638 char *szDN,
5639 DWORD dwOutType,
5640 DWORD *pdwCSRLen,
5641 BYTE **ppbCSR,
5642 DWORD dwParam);
5643
5668 char *szPriKey,
5669 char *szPubKey,
5670 char *szCert,
5671 void *pvReserved,
5672 DWORD dwReserved);
5673
5696 const char *szPkcs12Pwd,
5697 const char *szKeyId,
5698 const char *szCertId,
5699 const char *szReserved,
5700 BYTE **ppbPkcs12,
5701 DWORD *pdwPkcs12Len,
5702 DWORD dwFlags);
5703
5722 BYTE *pbPkcs12,
5723 DWORD dwPkcs12Len,
5724 const char *szPkcs12Pwd,
5725 const char *szKeyId,
5726 DWORD dwKeyAttr,
5727 const char *szCertId,
5728 const char *szPubKeyId,
5729 DWORD dwFlags);
5730
5746 const char *szPkcs12File,
5747 const char *szPkcs12Pwd,
5748 const char *szKeyId,
5749 const DWORD dwKeyAttr,
5750 const char *szCertId);
5751
5752#define DN_FORM_DER (1)
5769int AAP_API DRSAPublicKey2Info(BYTE *pbKey, DWORD dwKeyLen, DWORD dwInForm,
5770 void *pvPubKeyInfo, DWORD dwReserved);
5771
5788int AAP_API DRSAPrivateKey2Info(const BYTE *pbRsa, DWORD dwRsaLen, DWORD dwInForm,
5789 DN_RSA_PRIVATE_KEY_INFO *stRsaInfo, DWORD dwReserved);
5790
5792typedef struct tag_DN_EXPORT_BYOK_AZURE{
5793 char *szKeKKid;
5797
5798#define DN_BYOK_TYPE_AZURE (1)
5799#define DN_BYOK_TYPE_AWS (2)
5819int AAP_API DByokExport(HSESSIONCTX hSession, const char *cszKeyId,
5820 const char *cszKekId, DWORD dwType,
5821 const void *pvData, BYTE **ppbOutData,
5822 DWORD *pdwOutDataLen, DWORD dwReserved);
5823
5847 DWORD dwOp,
5848 BYTE *pbInData,
5849 BYTE *pbTokenBlob,
5850 DWORD *pdwTokenBlobLen,
5851 char *szToken,
5852 DWORD dwReserved);
5853
5899 DWORD dwOp,
5900 const char *szMK,
5901 const char *szMask,
5902 BYTE *pbTokenBlob,
5903 DWORD dwTokenBlobLen,
5904 char *szData,
5905 DWORD *pdwDataLen,
5906 DWORD dwReserved);
5907
5910int AAP_API DRemoveKey(HSESSIONCTX hSession, char *szKeyId);
5911
5913 DWORD dwCertLen,
5914 DWORD dwOutType,
5915 void *pvCertInfo,
5916 DWORD dwFlags );
5917
5918/* Symmetric/Asymmetric operations */
5919
5949 HKEYCTX hKey,
5950 HHASHCTX hHash,
5951 BOOL bFinal,
5952 DWORD dwFlags,
5953 BYTE* pbData,
5954 DWORD* pdwDataLen,
5955 DWORD dwBufLen
5956);
5957
5979 HKEYCTX hKey,
5980 HHASHCTX hHash,
5981 BOOL bFinal,
5982 DWORD dwFlags,
5983 BYTE* pbData,
5984 DWORD* pdwDataLen
5985);
5986
6020 HSESSIONCTX hSession,
6021 int nAlgId,
6022 HKEYCTX hKey,
6023 DWORD dwFlags,
6024 HHASHCTX *hHash
6025);
6026
6038 HHASHCTX hHash,
6039 BYTE* pbData,
6040 DWORD dwDataLen,
6041 DWORD dwFlags
6042);
6043
6060 HHASHCTX hHash,
6061 DWORD dwParam,
6062 BYTE * pbData,
6063 DWORD dwDataLen,
6064 DWORD dwFlags
6065);
6066
6084 HHASHCTX hHash,
6085 DWORD dwParam,
6086 BYTE* pbData,
6087 DWORD* pdwDataLen,
6088 DWORD dwFlags
6089);
6090
6123 HHASHCTX hHash,
6124 HKEYCTX hKey,
6125 DWORD dwFlags,
6126 BYTE* pbSignature,
6127 DWORD* pdwSigLen
6128);
6129
6130
6139 HHASHCTX * phHash
6140);
6141
6160 HHASHCTX hHash,
6161 BYTE* pbSignature,
6162 DWORD dwSigLen,
6163 HKEYCTX hPubKey,
6164 DWORD dwFlags
6165);
6166
6179 HHASHCTX hHash,
6180 DWORD dwFlag,
6181 HHASHCTX * phHash
6182);
6183
6194 HSESSIONCTX hSession,
6195 BYTE *pbData,
6196 DWORD dwDataLen
6197);
6198
6218 HSESSIONCTX hSession,
6219 DWORD dwOP,
6220 char *szPriKey,
6221 void *pvInData,
6222 DWORD dwInDataLen,
6223 BYTE *pbOutData,
6224 DWORD *pdwOutDataLen,
6225 DWORD dwFlags
6226);
6227
6240 char *szCRL,
6241 char *szCertId,
6242 char *szVerifyInfo);
6243
6262 BYTE bM,
6263 BYTE bN,
6264 BYTE *pbSecret,
6265 DWORD dwSecretLen,
6266 DN_M_OF_N_SPLIT_INFO *pstSplitInfo,
6267 DWORD dwReserved);
6268
6285 DN_M_OF_N_PART *pstParts,
6286 DWORD dwPartsCount,
6287 BYTE *pbSecret,
6288 DWORD dwReserved);
6289
6292/* PIN - CVV */
6293
6323 HSESSIONCTX hSession,
6324 char *szSrcPEK,
6325 char *szDstPEK,
6326 BYTE bTransBlockType,
6327 char *szPAN,
6328 BYTE *pbInPinBlock,
6329 BYTE *pbOutPinBlock,
6330 DWORD dwParam
6331);
6332
6351 HSESSIONCTX hSession,
6352 char *szKeyId,
6353 char *szPAN,
6354 char *szExpirationDate,
6355 char *szServiceCode,
6356 char *szCVV,
6357 DWORD dwParam
6358);
6359
6374 HSESSIONCTX hSession,
6375 char *szKeyId,
6376 char *szPAN,
6377 char *szExpirationDate,
6378 char *szServiceCode,
6379 char *szCVV,
6380 DWORD dwParam
6381);
6382
6404 HSESSIONCTX hSession,
6405 char *szPGK,
6406 char *szPAN,
6407 DWORD dwOperation,
6408 int nPinLen,
6409 char *szInPin,
6410 char *szOffset,
6411 char *szOutPin,
6412 DWORD dwParam
6413);
6414
6429 HSESSIONCTX hSession,
6430 char *szPTK,
6431 char *szPGK,
6432 char *szPAN,
6433 char *szOffset,
6434 BYTE *pbInPinBlock,
6435 DWORD dwParam
6436);
6437
6450 int nKeyAlgId,
6451 EFT_VISA_KEY_PARTS *pstKeyParts,
6452 DWORD dwParam
6453);
6454
6476 HSESSIONCTX hSession,
6477 BYTE *pbKSI,
6478 BYTE *pbDID_CTR,
6479 char *szDUKPT,
6480 DWORD dwParam
6481);
6482
6493 BYTE *pbKSI,
6494 char *szBDKName,
6495 DWORD dwParam
6496);
6497
6509 BYTE *pbKSI,
6510 BYTE *pbDID_CTR,
6511 char *szDUKPTName,
6512 DWORD dwParam
6513);
6514
6529 HSESSIONCTX hSession,
6530 char *szPGK,
6531 BYTE bPVKI,
6532 char *szPAN,
6533 char *szPIN,
6534 char *szPVV,
6535 DWORD dwParam
6536);
6537
6551 HSESSIONCTX hSession,
6552 char *szIMKDAC,
6553 char *szPAN,
6554 BYTE *pbSEQ,
6555 BYTE *pbDAC,
6556 DWORD dwParam
6557);
6558
6572 HSESSIONCTX hSession,
6573 char *szIMKDAC,
6574 char *szPAN,
6575 BYTE *pbSEQ,
6576 BYTE *pbDAC,
6577 DWORD dwParam
6578);
6579
6595 HSESSIONCTX hSession,
6596 char *szIK,
6597 BYTE *pbDAC,
6598 DWORD dwSDA_DATALen,
6599 BYTE *pbSDA_DATA,
6600 DWORD *pdwSigLen,
6601 BYTE *pbSig,
6602 DWORD dwParam
6603);
6604
6624 HSESSIONCTX hSession,
6625 BYTE bOP,
6626 char *szIK,
6627 char *szPAN,
6628 DWORD dwDDA_DATALen,
6629 BYTE *pbDDA_DATA,
6630 DWORD *pdwSigLen,
6631 BYTE *pbSig,
6632 DWORD dwParam
6633);
6634
6655 HSESSIONCTX hSession,
6656 BYTE bOP,
6657 char *szIK,
6658 char *szKeK,
6659 char *szPAN,
6660 BYTE *pbSEQ,
6661 DWORD *pdwEnvelopeLen,
6662 BYTE *pbEnvelope,
6663 DWORD dwParam
6664);
6665
6671 HSESSIONCTX hSession,
6672 BYTE bOP,
6673 char *szIK,
6674 char *szPAN,
6675 BYTE *pbSEQ,
6676 BYTE *pbNONCE,
6677 DWORD dwDataLen,
6678 BYTE *pbData,
6679 BYTE *pbMAC,
6680 DWORD dwParam
6681);
6682
6727 HSESSIONCTX hSession,
6728 BYTE bOP,
6729 char *szIK,
6730 char *szPAN,
6731 BYTE *pbSEQ,
6732 BYTE *pbNONCE,
6733 DWORD dwDataLen,
6734 BYTE *pbData,
6735 BYTE *pbMAC,
6736 DWORD dwParam
6737);
6738
6754 HSESSIONCTX hSession,
6755 char *szIK,
6756 char *szPAN,
6757 BYTE *pbSEQ,
6758 BYTE *pbATC,
6759 BYTE *pbUN,
6760 BYTE *pbIDN,
6761 DWORD dwParam
6762);
6763
6802 HSESSIONCTX hSession,
6803 BYTE bEncOP,
6804 char *szEncIK,
6805 BYTE *pbEncNONCE,
6806 BYTE bMacOP,
6807 char *szMacIK,
6808 BYTE *pbMacNONCE,
6809 char *szPAN,
6810 BYTE *pbSEQ,
6811 DWORD dwDataLen,
6812 BYTE *pbData,
6813 DWORD *pdwEncDataLen,
6814 BYTE *pbEncData,
6815 BYTE *pbMAC,
6816 DWORD dwParam
6817);
6818
6843 HSESSIONCTX hSession,
6844 BYTE bOP,
6845 char *szIK,
6846 BYTE *pbTrackNum,
6847 BYTE *pbServiceID,
6848 BYTE *pbIssuerID,
6849 BYTE *pbExpDate,
6850 DWORD *pdwCSRLen,
6851 BYTE *pbCSR,
6852 DWORD dwParam
6853);
6854
6878 HSESSIONCTX hSession,
6879 BYTE bOP,
6880 char *szIK,
6881 BYTE *pbTrackNum,
6882 BYTE *pbServiceID,
6883 BYTE *pbIssuerID,
6884 BYTE *pbExpDate,
6885 DBLOB *pdbCSR,
6886 BYTE *pbHash,
6887 DWORD dwParam
6888);
6889
6930 HSESSIONCTX hSession,
6931 BYTE bOP,
6932 BYTE *pbNONCE,
6933 char *szTransportKey,
6934 char *szISSUER_MK,
6935 char *szISSUER_SMC_MK,
6936 char *szPAN,
6937 BYTE *pbSEQ,
6938 BYTE *pbOLD_PB,
6939 BYTE *pbNEW_PB,
6940 BYTE *pbOutBlock,
6941 DWORD *pdwOutBlockLen,
6942 DWORD dwParam
6943);
6944
6950 HSESSIONCTX hSession,
6951 char *szSrcKey,
6952 WORD wBufferLen,
6953 BYTE *pbBuffer,
6954 BYTE bOP,
6955 DWORD dwAttrib,
6956 char *szDstKey,
6957 HKEYCTX *phKey,
6958 DWORD dwParam
6959);
6960
6978 HSESSIONCTX hSession,
6979 char *szIssuerMK,
6980 char *szPAN,
6981 BYTE *pbSEQ,
6982 BYTE *pbARQC,
6983 BYTE *pbARC,
6984 BYTE *pbARPC,
6985 DWORD dwParam
6986);
6987
6988
6989#define DN_CALC_ARPC_EMV_4_2_M1_ICC (1)
6990#define DN_CALC_ARPC_EMV_4_2_M1_SK (2)
6991#define DN_CALC_ARPC_EMV_4_2_M2 (3)
6992
7012 DWORD dwOp,
7013 void *pvInData,
7014 BYTE *pbARPC,
7015 DWORD dwParam );
7016
7030 DWORD dwType,
7031 BYTE *pbKey,
7032 DWORD dwAlg,
7033 const BYTE *pbMsg,
7034 DWORD dwMsgLen,
7035 BYTE *pbMAC
7036);
7037
7038#define DN_EFT_AES_KCV_TYPE_CMAC (1)
7062int AAP_API DEFTImportKey(HSESSIONCTX hSession, char *szKeyId,
7063 int nKeyAlgId, void *pstKeyParts,
7064 DWORD dwParam);
7065
7082#define DN_EFT_GET_KCV_TYPE_X9_24 (1)
7083#define DN_EFT_GET_KCV_TYPE_CMAC (2)
7086 const char *szKeyId, void *pvKeyParts,
7087 DWORD dwReserved);
7088
7089int AAP_API DEFTExportKey(HSESSIONCTX hSession, BYTE bExportMode,
7090 char *szKEKId, char *szKeyId,
7091 BYTE *pbEncryptedBlock, DWORD *pdwEncryptedBlockLen,
7092 BYTE *pbKeyCheckValue, DWORD dwParam);
7093
7094int AAP_API DEFTKeKImport( HSESSIONCTX hSession, BYTE bOP, DWORD dwAlgId,
7095 char *szKeKName, char *szKeyName, DWORD dwAttr,
7096 BYTE *pbKCV1, BYTE *pbKCV2, BYTE *pbKCV3,
7097 BYTE *pbKCVFinal, BYTE *pbBlob, DWORD dwFlags );
7098
7099/* DEFTExportZPK */
7100
7101#define DN_EXP_ZPK_FLAG_FULL_CKS (1)
7121int AAP_API DEFTExportZPK(HSESSIONCTX hSession, char *szKeyId,
7122 int *pnKeyAlg, int *pnKeySize,
7123 EFT_VISA_KEY_PARTS *pstKeyParts, DWORD dwParam);
7124
7125#define DN_EFT_GET_KCV_MAX_LEN (3)
7140int AAP_API DEFTGetKcv(HSESSIONCTX hSession, BYTE bType, const char *szKeyId,
7141 BYTE *pbKcv, DWORD *pdwKcvLen, DWORD dwReserved);
7142
7143
7144#define DN_EFT_GEN_OFFLINE_KCV_TYPE_X9_24 (1)
7145#define DN_EFT_GEN_OFFLINE_KCV_TYPE_CMAC (2)
7147#define DN_EFT_KCV_TYPE_X9_24_LEN (3)
7148#define DN_EFT_KCV_TYPE_CMAC_LEN (3)
7167int AAP_API DEFTGenKCVOffline(DWORD dwType, int nAlgId, const BYTE *pbKey,
7168 DWORD dwKeyLen, BYTE *pbKCV, DWORD *pdwKCVLen,
7169 DWORD reserved);
7254 const char *szKBPK,
7255 const char *szKey,
7256 void *pvReserved,
7257 WORD wUsage,
7258 BYTE bMode,
7259 BYTE bExport,
7260 BYTE *pbOutBlock,
7261 DWORD *pdwOutBlockLen,
7262 DWORD dwParam);
7263
7284 const char *szKBPK,
7285 const char *szKey,
7286 DWORD dwKeyAttributes,
7287 BYTE *pbKeyBlock,
7288 DWORD dwKeyBlockLen,
7289 DWORD dwParam);
7292/* Digital signature */
7293
7294int AAP_API DPowerSignHash(HSESSIONCTX hSession, char *szKeyId,
7295 int nHashAlgId, DWORD dwDataLen,
7296 BYTE *pbDataBuffer, DWORD *pdwSignLen,
7297 BYTE **ppbSignData);
7298
7333 HSESSIONCTX hSession,
7334 const char *szKeyName,
7335 const char *szKeyCert,
7336 const char *szCerts,
7337 DWORD dwAttrib,
7338 BYTE *pbContent,
7339 DWORD dwContentLen,
7340 DWORD *pdwSignatureLen,
7341 BYTE **ppbSignature,
7342 DWORD dwParam
7343);
7344
7348/* (CNS) Social Connectivity */
7350 char *szKeyID, char *szUsrID, char *szUsrName,
7351 WORD wModulusLen, BYTE *pbModulus,
7352 BYTE bExponentLen, BYTE *pbExponent,
7353 DWORD *pdwCertLen, BYTE *pbCert, DWORD dwParam );
7354
7355/* Hash */
7356int AAP_API DSignHashedData( HKEYCTX hKey, BYTE *pbData, DWORD dwDataLen,
7357 int nHashId, DWORD dwFlags, BYTE* pbSignature,
7358 DWORD* pdwSigLen );
7359
7361 DWORD dwPadding,
7362 BYTE*pbBlock,
7363 BYTE *pbData,
7364 DWORD* pdwDataLen,
7365 DWORD dwBlockSize,
7366 DWORD dwFlag );
7367
7369 BYTE *pbBlock,
7370 DWORD dwBlockCount,
7371 DWORD dwFlags );
7372
7373/* Base64 */
7374
7376 DWORD dwDataLen,
7377 char *szBase64,
7378 DWORD *pdwBase64Len,
7379 BOOL bNoNewLines );
7380
7382 DWORD dwBase64Len,
7383 BYTE *pbData,
7384 DWORD *pdwDataLen);
7385
7386
7421 HKEYCTX hKey,
7422 HHASHCTX hHash,
7423 char *szCertId,
7424 DWORD dwSizeUnsignedXml,
7425 BYTE *pbUnsignedXml,
7426 DWORD dwFilterLen,
7427 BYTE *pbFilter,
7428 DWORD *pdwSizeSignedXml,
7429 BYTE **ppbSignedXml
7430);
7431
7492 BYTE bHashMode,
7493 DWORD dwFlags,
7494 const char *szKeyId,
7495 const char *szCertId,
7496 DWORD dwSizeUnsignedXml,
7497 BYTE *pbUnsignedXml,
7498 DWORD dwFilterLen,
7499 BYTE *pbFilter,
7500 DWORD *pdwSizeSignedXml,
7501 BYTE **ppbSignedXml);
7502
7508int AAP_API DVerifySignedXml ( HSESSIONCTX hSession, char *szCertsId,
7509 DWORD dwSizeSignedXml, BYTE *pbSignedXml,
7510 DWORD dwFilterLen, BYTE *pbFilter);
7511
7532 HSESSIONCTX hSession,
7533 char *szCertsId,
7534 DWORD dwSizeSignedXml,
7535 BYTE *pbSignedXml,
7536 DWORD dwFilterLen,
7537 BYTE *pbFilter,
7538 char *szCRL
7539);
7540
7576 const char *szKeyId,
7577 const char *szCertId,
7578 DWORD dwFlags,
7579 DWORD dwSizeUnsignedPIXEnvelope,
7580 BYTE *pbUnsignedPIXEnvelope,
7581 DWORD *pdwSizeSignedPIXEnvelope,
7582 BYTE **ppbSignedPIXEnvelope);
7583
7584
7599 const char *szChainId,
7600 const char *szCRL,
7601 DWORD dwFlags,
7602 DWORD dwSizeSignedPIXEnvelope,
7603 BYTE* pbSignedPIXEnvelope);
7604
7625 const char *szKeyId,
7626 const char *szCertId,
7627 DWORD dwFlags,
7628 DWORD dwSizeUnsignedDictEnvelope,
7629 BYTE *pbUnsignedDictEnvelope,
7630 DWORD *pdwSizeSignedDictEnvelope,
7631 BYTE **ppbSignedDictEnvelope);
7632
7633
7648 const char *szChainId,
7649 const char *szCRL,
7650 DWORD dwFlags,
7651 DWORD dwSizeSignedDictEnvelope,
7652 BYTE* pbSignedDictEnvelope);
7653
7687 const char *szKeyId,
7688 DWORD dwFlags,
7689 DWORD dwHeaderLen,
7690 BYTE *pbHeader,
7691 DWORD dwPayloadLen,
7692 BYTE *pbPayload,
7693 DWORD *pdwJWSLen,
7694 BYTE *pbJWS);
7695
7714 const char *szChain,
7715 const char *szCRL,
7716 DWORD dwJWSLen,
7717 BYTE *pbJWS,
7718 DWORD dwFlags,
7719 DWORD *pdwHeaderLen,
7720 BYTE *pbHeader,
7721 DWORD *pdwPayloadLen,
7722 BYTE *pbPayload);
7723
7763 const char * szKeyId,
7764 const char * szCertId,
7765 const char * szPIXCertChainId,
7766 const char * szURL,
7767 DWORD dwCountRequestHeaderList,
7768 const char * pszRequestHeaderList[],
7769 DWORD dwSizeRequestData,
7770 BYTE* pbRequestData,
7771 DWORD dwTimeOut,
7772 DWORD * pdwSizeResponseHeaders,
7773 BYTE ** ppbResponseHeaders,
7774 DWORD * pdwSizeResponseBody,
7775 BYTE ** ppbResponseBody,
7776 DWORD dwParam);
7777
7778
7818 const char * szKeyId,
7819 const char * szCertId,
7820 const char * szPIXCertChainId,
7821 const char * szURL,
7822 DWORD dwCountRequestHeaderList,
7823 const char * pszRequestHeaderList[],
7824 DWORD dwSizeRequestData,
7825 BYTE* pbRequestData,
7826 DWORD dwTimeOut,
7827 DWORD * pdwSizeResponseHeaders,
7828 BYTE ** ppbResponseHeaders,
7829 DWORD * pdwSizeResponseBody,
7830 BYTE ** ppbResponseBody,
7831 DWORD dwParam);
7832
7869 const char * szKeyId,
7870 const char * szCertId,
7871 const char * szPIXCertChainId,
7872 const char * szURL,
7873 DWORD dwCountRequestHeaderList,
7874 const char * pszRequestHeaderList[],
7875 DWORD dwTimeOut,
7876 DWORD * pdwSizeResponseHeaders,
7877 BYTE ** ppbResponseHeaders,
7878 DWORD * pdwSizeResponseBody,
7879 BYTE ** ppbResponseBody,
7880 DWORD dwParam);
7881
7918 const char * szKeyId,
7919 const char * szCertId,
7920 const char * szPIXCertChainId,
7921 const char * szURL,
7922 DWORD dwCountRequestHeaderList,
7923 const char * pszRequestHeaderList[],
7924 DWORD dwTimeOut,
7925 DWORD * pdwSizeResponseHeaders,
7926 BYTE ** ppbResponseHeaders,
7927 DWORD * pdwSizeResponseBody,
7928 BYTE ** ppbResponseBody,
7929 DWORD dwParam);
7930
7933/* Library version */
7934
7935int AAP_API DVersion ( DWORD dwType, DWORD *pdwMajor,
7936 DWORD *pdwMinor, DWORD *pdwRevision,
7937 DWORD *pdwBuild );
7938
7957 DWORD dwsize
7958);
7959
7968 void *p
7969);
7970
7973//Free and clean CERT_X509_INFO structure members
7975
7976
7977/* Logs and monitoring */
7978
7979int AAP_API DLogLineFormat ( char *szIn, char *szOut );
7980
7982 HSESSIONCTX hSession,
7983 DWORD *pdwLogLen
7984);
7985
7987 DWORD dwStart,
7988 DWORD dwOffset,
7989 HLOGCTX *phLogCtx,
7990 DWORD dwParam );
7991
7993 BYTE *pbLog,
7994 DWORD *pdwLogSize );
7995
7997
7998
7999int AAP_API DGetStatInfo ( HSESSIONCTX hSession, DWORD *pdwSessions,
8000 DWORD *pdwCPU, DWORD *pdwUnit,
8001 DWORD *pdwMemTotal, DWORD *pdwMemUsed,
8002 DWORD *pdwSwapTotal, DWORD *pdwSwapUsed );
8003
8004int AAP_API DGetNetInfo ( HSESSIONCTX hSession, BYTE **ppbNetInfo, DWORD *pdwNetInfoCount, DWORD dwFlags );
8005
8006
8007/* Digital certificate */
8008
8010 DWORD dwCertLen,
8011 DWORD dwOutFormat,
8012 BYTE **ppbOutCert,
8013 DWORD *pdwOutCertLen,
8014 DWORD dwReserved );
8015
8016
8018 DWORD dwECLen,
8019 DWORD dwInForm,
8020 void *pvPrivKeyInfo,
8021 DWORD dwOutForm,
8022 DWORD dwReserved );
8023
8024
8026 DWORD dwECLen,
8027 DWORD dwInForm,
8028 void *pvPubKeyInfo,
8029 DWORD dwOutForm,
8030 DWORD dwReserved );
8031
8058 HSESSIONCTX hSession,
8059 char *szMasterKeyId,
8060 DWORD dwParamBlobType,
8061 void *pvParamBlob,
8062 DWORD dwParamBlobLen,
8063 BYTE *pbOTPBlob,
8064 DWORD *pdwOTPBlobLen,
8065 DWORD dwFlags
8066);
8067
8068
8069
8070
8100 HSESSIONCTX hSession,
8101 char *szMasterKeyId,
8102 char *szOTP,
8103 BYTE *pbOATHBlob,
8104 DWORD *pdwOATHBlobLen,
8105 DWORD dwFlags
8106);
8107
8122 HSESSIONCTX hSession,
8123 char *szMasterKeyId,
8124 BYTE bOTPLen,
8125 BYTE *pbOATHBlob,
8126 DWORD dwOATHBlobLen,
8127 char *szOTP,
8128 DWORD dwFlags
8129);
8130
8151 const HSESSIONCTX hSession,
8152 char *szMasterKey,
8153 BYTE *pbInBlob,
8154 DWORD dwInBlobLen,
8155 DWORD dwOutBlobType,
8156 BYTE *pbOutInfo,
8157 DWORD *pdwOutInfoLen,
8158 DWORD dwParam
8159);
8160
8184 HSESSIONCTX hSession,
8185 char *szMasterKeyId,
8186 char *szOTP1,
8187 char *szOTP2,
8188 BYTE *pbOATHBlob,
8189 DWORD *pdwOATHBlobLen,
8190 DWORD dwFlags
8191);
8192
8209 HSESSIONCTX hSession,
8210 char *szMasterKey,
8211 BYTE *pbPSK,
8212 BYTE bPSKLen,
8213 BYTE *pbPSKC,
8214 DWORD dwPSKCLen,
8215 void **pvBlobList,
8216 DWORD *pdwBlobListQuantity,
8217 DWORD dwParam
8218);
8219
8222//DOATHIssueHOTPBlob is DEPRECATED. Use DOATHIssueBlob instead.
8224 HSESSIONCTX hSession,
8225 char *szMasterKeyId,
8226 DWORD dwParamBlobType,
8227 void *pvParamBlob,
8228 DWORD dwParamBlobLen,
8229 BYTE *pbOTPBlob,
8230 DWORD *pdwOTPBlobLen,
8231 DWORD dwFlags
8232);
8233
8234//DOATHCheckHOTP is DEPRECATED. Use DOATHCheckOTP instead.
8236 char *szMasterKeyId,
8237 char *szOTP,
8238 BYTE *pbOATHBlob,
8239 DWORD *pdwOATHBlobLen,
8240 DWORD dwFlags );
8241
8242//Users
8244 DWORD dwSecretLen,
8245 ND_OATH_uint64_t nuiMovingFactor,
8246 int nCodeDigits,
8247 BOOL bAddChecksum,
8248 int nTruncOff,
8249 char *szResult);
8250
8251
8284 HSESSIONCTX hSession,
8285 char *szSrcISPB,
8286 char *szDstISPB,
8287 DWORD dwTotalDataLen,
8288 BYTE bErrorCode,
8289 BYTE bSpecialTreatment,
8290 HSPBCTX *hSPBCtx,
8291 DWORD dwFlags
8292);
8293
8308 HSPBCTX hSPBCtx,
8309 BYTE *pbDataIn,
8310 DWORD dwDataInLen,
8311 BYTE *pbDataOut,
8312 DWORD *pdwDataOutLen
8313);
8314
8325 HSPBCTX *hSPBCtx,
8326 BYTE *pbSPBHeader,
8327 DWORD *pdwSPBHeaderLen
8328);
8329
8369 HSESSIONCTX hSession,
8370 char *szSrcISPB,
8371 char *szDstISPB,
8372 BYTE *pbHeader,
8373 DWORD dwHeaderLen,
8374 BYTE bAcceptExpiredCert,
8375 BYTE bAutoUpdateCert,
8376 DWORD dwMessageDataLen,
8377 HSPBCTX *hSPBCtx,
8378 DWORD dwFlags
8379);
8380
8396 HSPBCTX hSPBCtx,
8397 BYTE *pbDataIn,
8398 DWORD dwDataInLen,
8399 BYTE **ppbDataOut,
8400 DWORD *pdwDataOutLen
8401);
8402
8411 HSPBCTX *hSPBCtx
8412);
8413
8426 HSESSIONCTX hSession,
8427 char *szID,
8428 char *szPrivateKeyName,
8429 DWORD dwKeyParam,
8430 DWORD dwParam
8431);
8432
8466 HSESSIONCTX hSession,
8467 char *szPrivateKeyName,
8468 BYTE bVersion,
8469 char *szSPBSubject,
8470 DWORD dwOutType,
8471 DWORD *pdwCSRLen,
8472 BYTE **ppbCSR,
8473 DWORD dwParam
8474);
8475
8500 HSESSIONCTX hSession,
8501 BYTE bActivate,
8502 const char *szUser,
8503 BYTE *pbCertificate,
8504 DWORD dwCertificateLen,
8505 const char *szDomain,
8506 DWORD dwParam);
8507
8525 BYTE bActivate,
8526 const char *szUser,
8527 const char *szPkcs12File,
8528 const char *szPkcs12Pwd,
8529 const char *szDomain,
8530 DWORD dwKeyAttr);
8531
8547 const char *szPkcs12Pwd,
8548 const char *szISPB,
8549 const char *szReserved,
8550 BYTE **ppbPkcs12,
8551 DWORD *pdwPkcs12Len,
8552 DWORD dwReserved);
8553
8565 HSESSIONCTX hSession,
8566 const char *szIdCert,
8567 const char *szDomain,
8568 DWORD dwParam
8569);
8570
8583 HSESSIONCTX hSession,
8584 const char *szIdCert,
8585 BYTE **ppbCertificate,
8586 DWORD *pdwCertificateLen,
8587 DWORD dwParam
8588);
8589
8606 char *szISPB,
8607 char *szDomain,
8608 DWORD dwKeyType,
8609 char *szOutObjName,
8610 DWORD dwParam
8611);
8612
8625 HSESSIONCTX hSession,
8626 const char *szIdCert,
8627 EXT_MAP_2_OBJ_INFO *pstExtMap,
8628 DWORD dwParam
8629);
8630
8648 HSESSIONCTX hSession,
8649 char *szISPB,
8650 char *szKeyId,
8651 char *szCertId,
8652 DWORD dwParam
8653);
8654
8657/* Esta API pertence ao grupo SPB, mas precisa da documentacao*/
8659 HSESSIONCTX hSession,
8660 char *szDomain,
8661 BOOL bActive,
8662 DBLOB **pdbList,
8663 DWORD *pdwListLen,
8664 DWORD dwParam
8665);
8666
8701int AAP_API DBchainCreateXPrv(HSESSIONCTX hSession, BYTE bType, DWORD dwAttributes,
8702 const char *szId, const BYTE *pcbData, DWORD dwDataLen,
8703 DWORD dwReserved);
8704
8725int AAP_API DBchainCreateBip32Ckd(HSESSIONCTX hSession, BYTE bVersion, DWORD dwIndex,
8726 DWORD dwAttributes, const char *cszPar,
8727 const char *cszDst, DN_BCHAIN_KEY_INFO *pKeyInfo,
8728 DWORD dwReserved);
8729
8780 const char *cszHrp, const char *cszPk,
8781 BYTE *pbAddress, DWORD *pdwAddressLen,
8782 DWORD dwReserved);
8783
8812int AAP_API DBchainSignHash(HSESSIONCTX hSession, BYTE bType, BYTE bHashMode,
8813 BYTE *pbHash, DWORD dwHashLen, const char *cszPk,
8814 BYTE *pbSig, DWORD *pdwSigLen, DWORD dwReserved);
8815
8852int AAP_API DBchainVerify(HSESSIONCTX hSession, BYTE bSigType, BYTE bHashMode,
8853 const BYTE *pbHash, DWORD dwHashLen, const BYTE *pbSig,
8854 DWORD dwSigLen, BYTE bInPbkType, const BYTE *pbInPbk,
8855 BYTE bInPbkLen, DWORD dwReserved);
8856
8879int AAP_API DBchainEdDsaSign(HSESSIONCTX hSession, BYTE bType, const char *cszCtxStr,
8880 BYTE *pbData, DWORD dwDataLen, const char *cszPk,
8881 BYTE *pbSig, DWORD *pdwSigLen, DWORD dwReserved);
8882
8915int AAP_API DBchainEdDsaVerify(HSESSIONCTX hSession, BYTE bType, const char *cszCtxStr,
8916 BYTE *pbData, DWORD dwDataLen, BYTE bPbkType,
8917 BYTE *pbPbk, DWORD dwPbkLen, BYTE *pbSig,
8918 DWORD dwSigLen, DWORD dwReserved);
8942int AAP_API DBchainPkImport(HSESSIONCTX hSession, BYTE bFormat, DWORD dwAttributes,
8943 const char *cszId, const BYTE *pcbData, DWORD dwDataLen,
8944 DWORD dwReserved);
8945
8974int AAP_API DBchainPkExport(HSESSIONCTX hSession, BYTE bFormat, BYTE bVersion,
8975 BYTE bCompressed, const char *cszId, BYTE **ppbData,
8976 DWORD *pdwDataLen, DWORD dwReserved);
8977
9000 const char *cszId, BYTE *pbData,
9001 DWORD *pdwDataLen, DWORD dwReserved);
9002
9030 BYTE bHashMode, const BYTE *pbHash,
9031 DWORD dwHashLen, const BYTE *pbSig,
9032 DWORD dwSigLen, DN_BCHAIN_PBK *pPbk,
9033 DWORD dwReserved);
9034
9046 const char *cszId, void *pvData,
9047 DWORD *pdwDataLen);
9048
9069int AAP_API DBchainHashData(HSESSIONCTX hSession, BYTE bMode, BYTE *pbData,
9070 DWORD dwDataLen, BYTE *pbHash, DWORD *pdwHashLen,
9071 DWORD dwReserved);
9072
9085int AAP_API DBchainEd2X(HSESSIONCTX hSession, const char *cszPk,
9086 const char *cszTo, DWORD dwAttr, DWORD dwReserved);
9087
9095/* DSKeepNewSecret e DSKeepProbeSecret */
9096// Security level
9097#define DN_SKEEP_LEVEL_UNKNOWN (0)
9098#define DN_SKEEP_SEC_LEVEL_64b (1)
9099#define DN_SKEEP_SEC_LEVEL_96b (2)
9100#define DN_SKEEP_SEC_LEVEL_112b (3)
9101#define DN_SKEEP_SEC_LEVEL_128b (4)
9102#define DN_SKEEP_SEC_LEVEL_160b (5)
9104// Type
9105#define DN_SKEEP_TYPE_NMIND (0)
9106#define DN_SKEEP_TYPE_SCRD (1)
9107#define DN_SKEEP_TYPE_2FA (2)
9108#define DN_SKEEP_TYPE_CRT (4)
9137int AAP_API DSKeepNewSecret(HSESSIONCTX hSession, const char *cszId,
9138 BYTE bSecLevel, WORD wAuthType, DWORD dwReserved);
9139
9154int AAP_API DSKeepSplitSecret(HSESSIONCTX hSession, const char *cszId,
9155 BYTE bSecLevel, WORD wAuthType, BYTE bM, BYTE bN,
9156 SKeepShare *pstShares, DWORD dwReserved);
9157
9167int AAP_API DSKeepProbeSecret(HSESSIONCTX hSession, const char *cszId,
9168 SKeepProbeInfo *pstInfo, DWORD dwReserved);
9169
9181int AAP_API DSKeepMatchSecret(HSESSIONCTX hSession, const char *cszId,
9182 const SKeepShare *cpstShares, DWORD dwSharesCount,
9183 DWORD dwReserved);
9184
9196int AAP_API DSKeepRecoverSecret(HSESSIONCTX hSession, const char *cszId,
9197 const SKeepShare *cpstShares, DWORD dwSharesCount,
9198 SKeepRecoverInfo *pstRecoverInfo, DWORD dwReserved);
9199
9210int AAP_API DSKeepRemoveSecret(HSESSIONCTX hSession, const char *cszId,
9211 BYTE bSecLevel, WORD wAuthType, DWORD dwReserved);
9212
9213#define DN_SKEEP_SHARE_CKS_LEN (4)
9215#define DN_SKEEP_GEN_SHARE_CKS (1)
9228int AAP_API DSKeepCalcShareCks(DWORD dwType, const char *cszShare, char *szCks);
9229
9232#ifdef __cplusplus
9233 }
9234#endif
9235
9236#endif /* #ifndef DINAMO_H_INCLUDED */
#define MAX_IP_LEN
Definição dinamo.h:1699
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:1728
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:808
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:1982
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:1999
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:1700
#define RSA_8192_LEN
Definição dinamo.h:1288
int AAP_API DDestroyHSMP11Info(HP11ATTRCTX *phMeta, DWORD dwParam)
int AAP_API DGetUserAcl(HSESSIONCTX hSession, char *szUser, DWORD *pdwUserAcl)
#define DN_BCHAIN_MAX_PBK_LEN
Definição dinamo.h:2228
int AAP_API DRemoveMapObj(const HSESSIONCTX hSession, const char *szMapObjId)
#define MAX_P11_OBJ_ID
Definição dinamo.h:1705
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:641
#define DN_MAX_SUBJECT
Definição dinamo.h:1978
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:1733
int AAP_API DGetNetInfo(HSESSIONCTX hSession, BYTE **ppbNetInfo, DWORD *pdwNetInfoCount, DWORD dwFlags)
#define DN_M_OF_N_PART_LEN
Definição dinamo.h:3541
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:2094
#define DN_RCC_MAX_REPL_MC_VER
Definição dinamo.h:3445
#define SA_TP_MAX_OTP_LEN
Definição dinamo.h:1897
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:3540
#define DN_SC_M_OF_N_SHADOW_MATERIAL_MAX_LEN
Definição dinamo.h:3659
#define ND_SPB_ISPB_LEN
Definição dinamo.h:1881
int AAP_API DGetHSMP11InfoAttr(HP11ATTRCTX hInMeta, DWORD dwOption, void *pvOptionData, DWORD *pdwOptionDataLen, DWORD dwParam)
#define ND_SPB_MAX_SUBJECT
Definição dinamo.h:1887
#define GET_INFO_MAX_REPL_NODES
Definição dinamo.h:801
#define OATH_MAX_PSK_LEN
Definição dinamo.h:1931
#define NET_INFO_MAX_SROUTE_LEN
Definição dinamo.h:2000
int AAP_API DCert2CertInfo(BYTE *pbCert, DWORD dwCertLen, DWORD dwOutType, void *pvCertInfo, DWORD dwFlags)
#define DN_GLOBAL_OBJ_STATS_COUNT
Definição dinamo.h:3598
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:1980
#define ND_SPB_MAX_ALG_ID
Definição dinamo.h:1889
#define DN_USR_A_TOKEN_KLEN
Definição dinamo.h:2063
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:2942
#define MAX_OBJ_ID_LEN
Definição dinamo.h:1711
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:802
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:1701
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:2004
void * HCERTCTX
Definição dinamo.h:71
#define DN_SC_M_OF_N_SHADOW_MAX_LEN
Definição dinamo.h:3660
#define GET_INFO_MAX_REPL_DOMAIN_NAME
Definição dinamo.h:800
#define MAX_HSM_ID_NAME
Definição dinamo.h:1723
int AAP_API DGetHSMLogEnd(HLOGCTX *phLogCtx)
unsigned long DN_ULONG
Definição dinamo.h:66
#define DN_MAX_ISSUER
Definição dinamo.h:1979
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:807
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:3490
#define EFT_EMV_ARC_LEN
Definição dinamo.h:1735
#define DES_BLOCK
Definição dinamo.h:1056
#define DN_BCHAIN_BIP39_PWD_LEN_MAX
Definição dinamo.h:3491
#define MAX_OATH_HMAC_LEN
Definição dinamo.h:851
#define SA_HOTP_CHAP_LEN
Definição dinamo.h:1899
#define DN_MAX_EMAIL
Definição dinamo.h:1981
#define DN_SKEEP_M_OF_N_S_LEN
Definição dinamo.h:3635
#define DN_EC_MAX_BIG_NUM
Definição dinamo.h:2373
#define DN_M_OF_N_S_LEN
Definição dinamo.h:3537
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:2943
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:3538
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:3118
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:1689
#define D_MAX_DS_BIND_B62_ID
Definição dinamo.h:643
#define GET_INFO_MAX_NTPQ_LEN
Definição dinamo.h:806
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:804
#define MAX_HTTP_API_TOKEN_LEN
Definição dinamo.h:3119
#define MAX_MODULE_NAME_VERSION_LEN
Definição dinamo.h:1698
#define MAX_USR_PWD
Definição dinamo.h:1683
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:1714
#define EFT_EMV_PAD_LEN
Definição dinamo.h:1737
#define EFT_VISA_KEY_CHECKSUM_LEN
Definição dinamo.h:1729
#define D_MAX_DS_BIND_URL
Definição dinamo.h:640
int AAP_API DRemoveKey(HSESSIONCTX hSession, char *szKeyId)
#define ND_SPB_MAX_ISSUER
Definição dinamo.h:1888
#define MAX_HSM_MODEL_NAME
Definição dinamo.h:1722
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:2001
#define GET_INFO_MAX_HW_STR_LEN
Definição dinamo.h:803
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:2002
void * HKEYCTX
Definição dinamo.h:70
#define MAX_HOTP_APP_NAME
Definição dinamo.h:1703
#define MAX_OBJ_NAME_LEN
Definição dinamo.h:1696
#define MAX_PAN_LEN
Definição dinamo.h:1587
int AAP_API DGetStatLogSize(HSESSIONCTX hSession, DWORD *pdwLogLen)
#define DN_BCHAIN_BIP32_SEED_LEN_MAX
Definição dinamo.h:3479
#define ALG_AES_256_LEN
Definição dinamo.h:1049
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:805
#define MAX_HOTP_IMEI
Definição dinamo.h:1702
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:1706
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:1684
#define ISSUE_OATH_BLOB_V2_IV_LEN
Definição dinamo.h:1941
#define NET_INFO_MAX_SNMP_SL_STR
Definição dinamo.h:2003
#define DN_MAX_PRIVATE_KEY_ATTR_LEN
Definição dinamo.h:2552
unsigned long long ND_uint64_t
Definição dinamo.h:37
#define EFT_EMV_CSU_LEN
Definição dinamo.h:1736
#define ND_SPB_SN_MAX_LEN
Definição dinamo.h:1884
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:3444
#define ND_SPB_CA_LEN
Definição dinamo.h:1882
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 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 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:4317
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:4152
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 DSCGetShadow(const char *szPin, DN_SC_M_OF_N_SHADOW *pstShadow, DWORD dwReserved)
int(AAP_API * funcListKeyCallback)(char *szKeyName, void *pParam, BOOL bFinal)
Definição dinamo.h:3894
int AAP_API DTruncateLog(HSESSIONCTX hSession)
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)
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:3991
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:4193
RetCodeMsgType
Definição dinamo.h:4488
int AAP_API DManageATokenCache(HSESSIONCTX hSession, DWORD dwOP, void *pOutData, DWORD dwParam)
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 DReadFileBuffer(HSESSIONCTX hSession, const char *szFileId, BYTE **ppbData, DWORD *pdwDataLen, DWORD dwReserved)
@ DESC_MSG
Definição dinamo.h:4490
@ CODE_MSG
Definição dinamo.h:4489
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:4669
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:3136
int nPort
Definição dinamo.h:3138
DN_A_TOKEN stAToken
Definição dinamo.h:3139
Definição dinamo.h:3125
char szAPIToken[MAX_HTTP_API_TOKEN_LEN+1]
Definição dinamo.h:3127
DWORD dwTimeout
Definição dinamo.h:3128
char szAddr[MAX_HTTP_ADDR_LEN+1]
Definição dinamo.h:3126
Definição dinamo.h:3102
int nPort
Definição dinamo.h:3104
char szUserId[MAX_USR_LEN]
Definição dinamo.h:3105
DWORD dwAuthType
Definição dinamo.h:3107
char szAddr[MAX_ADDR_LEN]
Definição dinamo.h:3103
char szPassword[MAX_USR_PWD]
Definição dinamo.h:3106
int nStrongAuthLen
Definição dinamo.h:3113
BYTE * pbStrongAuth
Definição dinamo.h:3112
Definição dinamo.h:3090
int nPort
Definição dinamo.h:3092
char szUserId[MAX_USR_LEN]
Definição dinamo.h:3093
char szAddr[MAX_ADDR_LEN]
Definição dinamo.h:3091
char szPassword[MAX_USR_PWD]
Definição dinamo.h:3094
Definição dinamo.h:3147
int nPort
Definição dinamo.h:3149
Definição dinamo.h:2346
int nPubKeyHSMAlgId
Definição dinamo.h:2359
DWORD dwVersion
Definição dinamo.h:2347
DBLOB dbPublicKey
Definição dinamo.h:2358
Definição dinamo.h:2848
int nVersion
Definição dinamo.h:2849
DBLOB dbIssuer
Definição dinamo.h:2852
DBLOB dbSubject
Definição dinamo.h:2851
P11_DATE dtNotBefore
Definição dinamo.h:2855
DBLOB dbSerialNumber
Definição dinamo.h:2853
P11_DATE dtNotAfter
Definição dinamo.h:2856
Definição dinamo.h:3452
DWORD dwIp
Definição dinamo.h:3454
DWORD dwRCode
Definição dinamo.h:3456
DWORD dwCount
Definição dinamo.h:3453
Definição dinamo.h:2319
void * pvData
Definição dinamo.h:2320
DWORD dwDataLen
Definição dinamo.h:2321
Definição dinamo.h:3080
DN_A_TOKEN stAToken
Definição dinamo.h:3081
QWORD qwExpiration
Definição dinamo.h:3082
Definição dinamo.h:3070
Definição dinamo.h:3484
DWORD dwSeedLen
Definição dinamo.h:3486
BYTE bVer
Definição dinamo.h:3485
Definição dinamo.h:3497
BYTE bVer
Definição dinamo.h:3498
Definição dinamo.h:3512
BYTE bStorageType
Definição dinamo.h:3513
BYTE bBip32Depth
Definição dinamo.h:3516
DWORD dwType
Definição dinamo.h:3514
Definição dinamo.h:3527
BYTE bLen
Definição dinamo.h:3529
BYTE bType
Definição dinamo.h:3528
Definição dinamo.h:3383
BYTE bOP
Definição dinamo.h:3390
Definição dinamo.h:3394
DWORD dwPADLen
Definição dinamo.h:3405
DWORD dwCSULen
Definição dinamo.h:3403
BYTE bOP
Definição dinamo.h:3399
Definição dinamo.h:2389
DWORD dwDataLen
Definição dinamo.h:2391
Definição dinamo.h:2401
DN_EC_BIG_NUMBER bnCofactor
Definição dinamo.h:2409
DN_EC_BIG_NUMBER bnOrder
Definição dinamo.h:2411
DN_EC_BIG_NUMBER bnP
Definição dinamo.h:2404
DN_EC_POINT_INFO stGeneratorPoint
Definição dinamo.h:2412
DN_EC_BIG_NUMBER bnA
Definição dinamo.h:2406
DN_EC_BIG_NUMBER bnB
Definição dinamo.h:2407
int nFieldType
Definição dinamo.h:2402
Definição dinamo.h:2395
DN_EC_BIG_NUMBER bnY
Definição dinamo.h:2397
DN_EC_BIG_NUMBER bnX
Definição dinamo.h:2396
Definição dinamo.h:2422
DN_EC_GROUP_INFO stGroupInfo
Definição dinamo.h:2423
DN_EC_BIG_NUMBER bnPrivatevalue
Definição dinamo.h:2424
Definição dinamo.h:2416
DN_EC_GROUP_INFO stGroupInfo
Definição dinamo.h:2417
DN_EC_POINT_INFO stPublicPoint
Definição dinamo.h:2418
Definição dinamo.h:2484
BYTE bIsEftd0Active
Definição dinamo.h:2487
BYTE bMsgHeaderLen
Definição dinamo.h:2485
BYTE bPinLen
Definição dinamo.h:2486
Definição dinamo.h:5792
int nEphemeralKekAlg
Definição dinamo.h:5794
char * szKeKKid
Definição dinamo.h:5793
char * szGenerator
Definição dinamo.h:5795
Definição dinamo.h:3616
DN_OBJ_STATS stGlobal
Definição dinamo.h:3617
Definição dinamo.h:3547
BYTE bN
Definição dinamo.h:3550
BYTE bM
Definição dinamo.h:3549
BYTE bPos
Definição dinamo.h:3548
Definição dinamo.h:3558
Definição dinamo.h:3566
DWORD dwPartCount
Definição dinamo.h:3570
Definição dinamo.h:2536
int nAlgId
Definição dinamo.h:2537
QWORD qwCount
Definição dinamo.h:2538
Definição dinamo.h:3577
ND_uint64_t uCount
Definição dinamo.h:3581
ND_uint64_t tFirst
Definição dinamo.h:3578
ND_uint64_t uLast
Definição dinamo.h:3580
ND_uint64_t uFirst
Definição dinamo.h:3579
Definição dinamo.h:3588
DN_OBJ_STAT_INFO stTouch
Definição dinamo.h:3589
DN_OBJ_STAT_INFO stUsage
Definição dinamo.h:3590
Definição dinamo.h:2440
DWORD dwDataLen
Definição dinamo.h:2442
Definição dinamo.h:2555
DWORD dwExponent2Len
Definição dinamo.h:2569
DWORD dwPrime2Len
Definição dinamo.h:2565
DWORD dwModulusLen
Definição dinamo.h:2557
DWORD dwPrime1Len
Definição dinamo.h:2563
DWORD dwCoefficientLen
Definição dinamo.h:2571
DWORD dwPrivExponentLen
Definição dinamo.h:2561
DWORD dwExponent1Len
Definição dinamo.h:2567
DWORD dwPubExponentLen
Definição dinamo.h:2559
Definição dinamo.h:2449
DN_RSA_BIG_NUMBER bnModulus
Definição dinamo.h:2450
DN_RSA_BIG_NUMBER bnPubExponent
Definição dinamo.h:2451
Definição dinamo.h:3671
BYTE bN
Definição dinamo.h:3674
BYTE bM
Definição dinamo.h:3673
BYTE bPos
Definição dinamo.h:3672
Definição dinamo.h:3682
int nVersion
Definição dinamo.h:3683
Definição dinamo.h:2546
DWORD dwObjCountCount
Definição dinamo.h:2549
DN_OBJ_COUNT * pstObjCount
Definição dinamo.h:2548
Definição dinamo.h:3429
BYTE bVersion
Definição dinamo.h:3430
Definição dinamo.h:3359
DWORD dwAttributes
Definição dinamo.h:3360
EFT_AES_KEY_PARTS stParts
Definição dinamo.h:3361
Definição dinamo.h:3348
Definição dinamo.h:3368
Definição dinamo.h:3334
Definição dinamo.h:3229
DWORD dwObjAlgId2
Definição dinamo.h:3232
DWORD dwObjAlgId1
Definição dinamo.h:3230
Definição dinamo.h:3413
DWORD dwTargetKeyAlg
Definição dinamo.h:3417
DWORD dwTargetKeyAttributes
Definição dinamo.h:3418
DBLOB dbPubKey
Definição dinamo.h:3419
DBLOB dbKDFData
Definição dinamo.h:3420
Definição dinamo.h:2494
BYTE * pbPubKey
Definição dinamo.h:2499
DWORD dwFlags
Definição dinamo.h:2497
BOOL bTempKey
Definição dinamo.h:2498
int nAlgId
Definição dinamo.h:2496
DWORD dwPubKeyLen
Definição dinamo.h:2500
Definição dinamo.h:3050
DWORD dwImageLen
Definição dinamo.h:3052
Definição dinamo.h:3043
DWORD dwParam
Definição dinamo.h:3044
DWORD dwHipFlags
Definição dinamo.h:3045
DWORD dwHipColor
Definição dinamo.h:3046
Definição dinamo.h:3029
DWORD dwStructId
Definição dinamo.h:3030
Definição dinamo.h:2860
DWORD dwObjAttr
Definição dinamo.h:2863
DWORD dwObjHotpFlags
Definição dinamo.h:2864
DBLOB * pdbStLogoImage
Definição dinamo.h:2868
DWORD dwStructId
Definição dinamo.h:2861
Definição dinamo.h:3035
DWORD dwStructId
Definição dinamo.h:3036
Definição dinamo.h:2284
int nPort
Definição dinamo.h:2286
time_t tmNow
Definição dinamo.h:2287
int nqtdcache
Definição dinamo.h:2288
Definição dinamo.h:2365
Definição dinamo.h:2779
ISSUE_OATH_INFO_t stInfo
Definição dinamo.h:2780
Definição dinamo.h:2788
ISSUE_OATH_INFO_t stInfo
Definição dinamo.h:2789
Definição dinamo.h:2713
BYTE seed_len
Definição dinamo.h:2714
ND_OATH_uint64_t T0
Definição dinamo.h:2734
WORD time_step
Definição dinamo.h:2729
ND_OATH_uint64_t moving_factor
Definição dinamo.h:2721
BYTE truncation_offset
Definição dinamo.h:2725
Definição dinamo.h:2748
BYTE seed_len
Definição dinamo.h:2749
ND_OATH_uint64_t T0
Definição dinamo.h:2769
WORD time_step
Definição dinamo.h:2764
ND_OATH_uint64_t moving_factor
Definição dinamo.h:2756
BYTE truncation_offset
Definição dinamo.h:2760
Definição dinamo.h:2678
WORD wTimeStep
Definição dinamo.h:2690
BYTE bUseDefaultMovingFactor
Definição dinamo.h:2699
ND_OATH_uint64_t otMovingFactor
Definição dinamo.h:2702
ND_OATH_uint64_t otT0
Definição dinamo.h:2695
BYTE bTruncationOffset
Definição dinamo.h:2686
BYTE bSeedLen
Definição dinamo.h:2679
Definição dinamo.h:2296
HSM_ADDR * pstLBList
Definição dinamo.h:2297
DWORD dwLBListCount
Definição dinamo.h:2298
Definição dinamo.h:3221
char szObj1Id[MAX_OBJ_NAME_LEN+1]
Definição dinamo.h:3223
char szObj2Id[MAX_OBJ_NAME_LEN+1]
Definição dinamo.h:3225
DWORD dwObj1AlgId
Definição dinamo.h:3222
DWORD dwObj2AlgId
Definição dinamo.h:3224
Definição dinamo.h:3238
DWORD dwModuleId
Definição dinamo.h:3239
char szModuleNameVersion[MAX_MODULE_NAME_VERSION_LEN]
Definição dinamo.h:3240
Definição dinamo.h:2798
ISSUE_OATH_BLOB_t stOATHBlob
Definição dinamo.h:2799
Definição dinamo.h:2807
BYTE key_len
Definição dinamo.h:2812
BYTE type
Definição dinamo.h:2808
BYTE truncation_offset
Definição dinamo.h:2814
Definição dinamo.h:2821
OATH_SA_v1 sa_v1
Definição dinamo.h:2822
ND_OATH_uint64_t T0
Definição dinamo.h:2827
WORD time_step
Definição dinamo.h:2823
Definição dinamo.h:2583
DWORD len
Definição dinamo.h:2587
DWORD type
Definição dinamo.h:2585
DWORD attrib
Definição dinamo.h:2586
DWORD version
Definição dinamo.h:2584
Definição dinamo.h:2660
OBJ_HDR_V1 stSlot2Header
Definição dinamo.h:2667
OBJ_HDR_V1 stObjectHeader
Definição dinamo.h:2661
BYTE bBlockedStatus
Definição dinamo.h:2670
ND_uint64_t stCreationTime
Definição dinamo.h:2671
OBJ_HDR_V1 stSlot1Header
Definição dinamo.h:2664
Definição dinamo.h:2649
OBJ_HDR_V1 stObjectHeader
Definição dinamo.h:2651
DWORD dwVERB
Definição dinamo.h:2650
Definição dinamo.h:4916
const char * pszString
Definição dinamo.h:4918
DWORD dwId
Definição dinamo.h:4917
DWORD dwType
Definição dinamo.h:4919
Definição dinamo.h:2594
QWORD qwOrig_creat
Definição dinamo.h:2604
QWORD qwDeactiv
Definição dinamo.h:2599
QWORD qwComprom
Definição dinamo.h:2601
QWORD qwLast_change
Definição dinamo.h:2603
QWORD qwC_occur
Definição dinamo.h:2600
QWORD qwProtect_s
Definição dinamo.h:2598
QWORD qwMask
Definição dinamo.h:2605
QWORD qwInit
Definição dinamo.h:2595
QWORD qwActiv
Definição dinamo.h:2596
QWORD qwProc_s
Definição dinamo.h:2597
BYTE bState
Definição dinamo.h:2606
QWORD qwArchive
Definição dinamo.h:2602
Definição dinamo.h:2841
Definição dinamo.h:2508
ND_uint64_t redirect_time
Definição dinamo.h:2515
ND_uint64_t upload_size
Definição dinamo.h:2522
ND_uint64_t upload_speed
Definição dinamo.h:2519
ND_uint64_t starttransfer_time
Definição dinamo.h:2513
ND_uint64_t content_length_upload
Definição dinamo.h:2517
ND_uint64_t connect_time
Definição dinamo.h:2510
ND_uint64_t request_size
Definição dinamo.h:2526
ND_uint64_t pretransfer_time
Definição dinamo.h:2512
ND_uint64_t num_connects
Definição dinamo.h:2525
ND_uint64_t download_size
Definição dinamo.h:2521
ND_uint64_t http_response_code
Definição dinamo.h:2528
ND_uint64_t redirect_count
Definição dinamo.h:2524
ND_uint64_t name_lookup_time
Definição dinamo.h:2509
ND_uint64_t received_header_size
Definição dinamo.h:2527
ND_uint64_t appconnect_time
Definição dinamo.h:2511
ND_uint64_t download_speed
Definição dinamo.h:2520
ND_uint64_t total_time
Definição dinamo.h:2514
ND_uint64_t content_length_download
Definição dinamo.h:2518
Definição dinamo.h:3244
BYTE Trusted
Definição dinamo.h:3258
BYTE Local
Definição dinamo.h:3260
BYTE WrapWithTrusted
Definição dinamo.h:3259
DWORD JavaMidpSecDomain
Definição dinamo.h:3263
DWORD CertificateCategory
Definição dinamo.h:3262
DWORD KeyGenMechanism
Definição dinamo.h:3264
DWORD Class
Definição dinamo.h:3248
Definição dinamo.h:3318
BYTE bMaxInvalidLogins
Definição dinamo.h:3320
BYTE bLower
Definição dinamo.h:3327
BYTE bHistory
Definição dinamo.h:3322
BYTE bUpper
Definição dinamo.h:3326
BYTE bMinLength
Definição dinamo.h:3324
BYTE bExpiration
Definição dinamo.h:3321
BYTE bMinSpecial
Definição dinamo.h:3325
Definição dinamo.h:3022
DWORD dwPeer
Definição dinamo.h:3024
BYTE bOP
Definição dinamo.h:3023
Definição dinamo.h:2431
DBLOB dbPubExponent
Definição dinamo.h:2433
DBLOB dbModulus
Definição dinamo.h:2432
Definição dinamo.h:3627
WORD wAuthType
Definição dinamo.h:3628
BYTE bSecLevel
Definição dinamo.h:3629
Definição dinamo.h:3641
BYTE bSecLevel
Definição dinamo.h:3642
Definição dinamo.h:3650
Definição dinamo.h:2307
int nPort
Definição dinamo.h:2308
Definição dinamo.h:2327
DWORD dwVersion
Definição dinamo.h:2328
DBLOB dbPublicKey
Definição dinamo.h:2342
Definição dinamo.h:2835
Definição dinamo.h:2244
BYTE bFrom
Definição dinamo.h:2263
BYTE bCKS
Definição dinamo.h:2252
BYTE bFlags
Definição dinamo.h:2245
BYTE bType
Definição dinamo.h:2262
BYTE bTo
Definição dinamo.h:2269
Definição dinamo.h:3006
SYS_NTP_INFO stNTPInfo
Definição dinamo.h:3014
int nFilledCount
Definição dinamo.h:3007
SYS_HW_STR_INFO stHardwareInfo
Definição dinamo.h:3013
SYS_REPL_INFO stReplicationInfo
Definição dinamo.h:3011
DWORD dwFIPSReturnCode
Definição dinamo.h:3016
SYS_STATUS_INFO stStatusInfo
Definição dinamo.h:3008
DWORD dwFIPSMode
Definição dinamo.h:3009
SYS_DISK_INFO stDiskInfo
Definição dinamo.h:3010
QWORD qwCurrentDateTime
Definição dinamo.h:3012
SYS_PENDING_INFO stPendingInfo
Definição dinamo.h:3017
SYS_COUNTER_INFO stCounterInfo
Definição dinamo.h:3015
Definição dinamo.h:2933
QWORD qwUsers
Definição dinamo.h:2934
QWORD qwSLBeFileSize
Definição dinamo.h:2936
QWORD qwVMSize
Definição dinamo.h:2938
QWORD qwTasks
Definição dinamo.h:2937
QWORD qwObjects
Definição dinamo.h:2935
Definição dinamo.h:2907
DWORD dwBlockSize
Definição dinamo.h:2908
DWORD dwFreeBlocks
Definição dinamo.h:2910
DWORD dwTotalBlocks
Definição dinamo.h:2909
Definição dinamo.h:2901
DWORD dwBatteryOK
Definição dinamo.h:2903
DWORD dwUptime
Definição dinamo.h:2902
Definição dinamo.h:2958
Definição dinamo.h:2885
DWORD dwSysNetInfoCount
Definição dinamo.h:2887
SYS_NET_INFO * pstSysNetInfo
Definição dinamo.h:2886
Definição dinamo.h:2874
DWORD dwSpeed
Definição dinamo.h:2880
BYTE bUp
Definição dinamo.h:2879
Definição dinamo.h:2975
BYTE bENABLED
Definição dinamo.h:2976
Definição dinamo.h:2965
DWORD dwKeyLen
Definição dinamo.h:2969
WORD wKeyIndex
Definição dinamo.h:2968
Definição dinamo.h:2950
BYTE bPendingBackup
Definição dinamo.h:2951
Definição dinamo.h:2983
DWORD dwDiscoveryPulse
Definição dinamo.h:2997
QWORD qwSpVal
Definição dinamo.h:2992
DWORD dwManagerPulse
Definição dinamo.h:2995
DWORD dwRecoveryPulse
Definição dinamo.h:2996
QWORD qwEventType
Definição dinamo.h:2988
DWORD dwBoundEth
Definição dinamo.h:2985
WORD wSpvv
Definição dinamo.h:2993
QWORD qwGuid
Definição dinamo.h:2986
QWORD qwDateTime
Definição dinamo.h:2987
DWORD dwDiscoveryReset
Definição dinamo.h:2994
DWORD dwState
Definição dinamo.h:2989
Definição dinamo.h:2918
DWORD dwMemTotal
Definição dinamo.h:2922
DWORD dwMemUsed
Definição dinamo.h:2923
DWORD dwCPU
Definição dinamo.h:2920
DWORD dwUnit
Definição dinamo.h:2921
DWORD dwSwapTotal
Definição dinamo.h:2924
DWORD dwSwapUsed
Definição dinamo.h:2925
DWORD dwSessions
Definição dinamo.h:2919
Definição dinamo.h:2475
Definição dinamo.h:3157
DBLOB dbHSMCert
Definição dinamo.h:3161
DBLOB dbPrivateKeyCert
Definição dinamo.h:3160
char * szPrivateKeyPwd
Definição dinamo.h:3159
DBLOB dbPrivateKey
Definição dinamo.h:3158
Definição dinamo.h:3060
DWORD dwAttempts
Definição dinamo.h:3063
int nBlocked
Definição dinamo.h:3062
Definição dinamo.h:2461
DBLOB dbCert
Definição dinamo.h:2468
BYTE bOP
Definição dinamo.h:2463
Definição dinamo.h:3168
DWORD dwAuthMask
Definição dinamo.h:3171
char szPassword[MAX_USR_PWD+1]
Definição dinamo.h:3170
char szUserId[MAX_USR_LEN+1]
Definição dinamo.h:3169
Definição dinamo.h:3199
DWORD dwACL
Definição dinamo.h:3209
DWORD dwState
Definição dinamo.h:3201