-
Notifications
You must be signed in to change notification settings - Fork 4
/
errors.go
65 lines (55 loc) · 1.64 KB
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package sdf
/*
#include<./sansec/swsds.h>
*/
import "C"
var StrErrors = map[uint]string{
0x01000001: "SDR_UNKNOWERR",
0x01000002: "SDR_NOTSUPPORT",
0x01000003: "SDR_COMMFAIL",
0x01000004: "SDR_HARDFAIL",
0x01000005: "SDR_OPENDEVICE",
0x01000006: "SDR_OPENSESSION",
0x01000007: "SDR_PARDENY",
0x01000008: "SDR_KEYNOTEXIST",
0x01000009: "SDR_ALGNOTSUPPORT",
0x0100000A: "SDR_ALGMODNOTSUPPORT",
0x0100000B: "SDR_PKOPERR",
0x0100000C: "SDR_SKOPERR",
0x0100000D: "SDR_SIGNERR",
0x0100000E: "SDR_VERIFYERR",
0x0100000F: "SDR_SYMOPERR",
0x01000010: "SDR_STEPERR",
0x01000011: "SDR_FILESIZEERR",
0x01000012: "SDR_FILENOEXIST",
0x01000013: "SDR_FILEOFSERR",
0x01000014: "SDR_KEYTYPEERR",
0x01000015: "SDR_KEYERR",
0x01010001: "SWR_INVALID_USER",
0x01010002: "SWR_INVALID_AUTHENCODE",
0x01010003: "SWR_PROTOCOL_VER_ERR",
0x01010004: "SWR_INVALID_COMMAND",
0x01010005: "SWR_INVALID_PACKAGE",
0x01010006: "SWR_FILE_ALREADY_EXIST",
0x01010100: "SWR_SOCKET_ERR_BASE",
//0x01010101: "SWR_SOCKET_TIMEOUT",
0x01010101: "SWR_CONNECT_ERR",
0x01010102: "SWR_SET_SOCKOPT_ERR",
0x01010104: "SWR_SOCKET_SEND_ERR",
0x01010105: "SWR_SOCKET_RECV_ERR",
0x01010206: "SWR_SOCKET_RECV_0",
0x01010201: "SWR_NO_AVAILABLE_HSM",
0x01010202: "SWR_NO_AVAILABLE_CSM",
0x01010301: "SWR_CONFIG_ERR",
0x01020101: "SDR_BUFFER_TOO_SMALL",
0x01020102: "SDR_DATA_PAD",
0x01020103: "SDR_DATA_SIZE",
0x01020104: "SDR_CRYPTO_NOT_INIT",
0x01021001: "SWR_MANAGEMENT_DENY",
0x01021002: "SWR_OPERATION_DENY",
0x01021003: "SWR_DEVICE_STATUS_ERR",
0x01021011: "SWR_LOGIN_ERR",
0x01021012: "SWR_USERID_ERR",
0x01021013: "SWR_PARAMENT_ERR",
0x01020020: "SWR_KEYTYPEERR",
}