35 #if defined(OPENSSL_SYS_WIN32)
40 #elif defined(OPENSSL_SYS_MACINTOSH_CLASSIC)
51 #define SW_ERR_BASE (-10000L)
52 #define SW_ERR_NO_CARD (SW_ERR_BASE-1)
53 #define SW_ERR_CARD_NOT_READY (SW_ERR_BASE-2)
55 #define SW_ERR_TIME_OUT (SW_ERR_BASE-3)
57 #define SW_ERR_NO_EXECUTE (SW_ERR_BASE-4)
59 #define SW_ERR_INPUT_NULL_PTR (SW_ERR_BASE-5)
61 #define SW_ERR_INPUT_SIZE (SW_ERR_BASE-6)
63 #define SW_ERR_INVALID_HANDLE (SW_ERR_BASE-7)
65 #define SW_ERR_PENDING (SW_ERR_BASE-8)
68 #define SW_ERR_AVAILABLE (SW_ERR_BASE-9)
69 #define SW_ERR_NO_PENDING (SW_ERR_BASE-10)
70 #define SW_ERR_NO_MEMORY (SW_ERR_BASE-11)
71 #define SW_ERR_BAD_ALGORITHM (SW_ERR_BASE-12)
73 #define SW_ERR_MISSING_KEY (SW_ERR_BASE-13)
77 #define SW_ERR_KEY_CMD_MISMATCH \
84 #define SW_ERR_NOT_IMPLEMENTED \
86 #define SW_ERR_BAD_COMMAND (SW_ERR_BASE-16)
87 #define SW_ERR_BAD_ITEM_SIZE (SW_ERR_BASE-17)
90 #define SW_ERR_BAD_ACCNUM (SW_ERR_BASE-18)
91 #define SW_ERR_SELFTEST_FAIL (SW_ERR_BASE-19)
96 #define SW_ERR_MISALIGN (SW_ERR_BASE-20)
100 #define SW_ERR_OUTPUT_NULL_PTR \
103 #define SW_ERR_OUTPUT_SIZE \
106 #define SW_ERR_FIRMWARE_CHECKSUM \
109 #define SW_ERR_UNKNOWN_FIRMWARE \
111 #define SW_ERR_INTERRUPT (SW_ERR_BASE-25)
114 #define SW_ERR_NVWRITE_FAIL (SW_ERR_BASE-26)
116 #define SW_ERR_NVWRITE_RANGE (SW_ERR_BASE-27)
118 #define SW_ERR_RNG_ERROR (SW_ERR_BASE-28)
120 #define SW_ERR_DSS_FAILURE (SW_ERR_BASE-29)
121 #define SW_ERR_MODEXP_FAILURE (SW_ERR_BASE-30)
123 #define SW_ERR_ONBOARD_MEMORY (SW_ERR_BASE-31)
125 #define SW_ERR_FIRMWARE_VERSION \
128 #define SW_ERR_ZERO_WORKING_ACCELERATOR \
136 #define SW_ALG_NVDATA 4
139 #define SW_CMD_MODEXP_CRT 1
141 #define SW_CMD_MODEXP 2
142 #define SW_CMD_DSS_SIGN 3
143 #define SW_CMD_DSS_VERIFY 4
144 #define SW_CMD_RAND 5
145 #define SW_CMD_NVREAD 6
146 #define SW_CMD_NVWRITE 7
159 #if defined(OPENSSL_SYS_WIN32)
162 #define SW_OS_INVALID_HANDLE INVALID_HANDLE_VALUE
163 #define SW_CALLCONV _stdcall
164 #elif defined(OPENSSL_SYS_MACINTOSH_CLASSIC)
167 #define SW_MAC_CALLBACK_LEVEL_NO 0
168 #define SW_MAC_CALLBACK_LEVEL_HARDWARE 1
169 #define SW_MAC_CALLBACK_LEVEL_SECONDARY 2
170 typedef int SW_MAC_CALLBACK_LEVEL;
172 #define SW_OS_INVALID_HANDLE (-1)
176 #define SW_OS_INVALID_HANDLE (-1)