10#include <botan/internal/fmt.h>
18 return "function executed successfully";
20 return "function aborted by application";
22 return "insufficient memory to perform function";
24 return "invalid slot id";
26 return "unrecoverable error occurred";
28 return "function failed without detailed information";
30 return "invalid arguments supplied";
32 return "no new slot events";
34 return "library needs to create threads";
36 return "requested locking not available";
38 return "attribute cannot be modified";
40 return "attribute is sensitive and cannot be revealed";
42 return "invalid attribute type";
44 return "invalid attribute value";
46 return "action not allowed by policy";
48 return "invalid plaintext input data";
50 return "plaintext data length out of range";
52 return "problem with token or slot";
54 return "insufficient token memory";
56 return "token removed during function execution";
58 return "invalid ciphertext input";
60 return "ciphertext length out of range";
62 return "AEAD decrypt failed";
64 return "function canceled mid-execution";
66 return "no function executing in parallel";
68 return "function not supported";
70 return "invalid key handle";
72 return "key size out of range";
74 return "key type inconsistent with mechanism";
76 return "extraneous key supplied";
80 return "key needed to restore session state";
82 return "key cannot be digested";
84 return "key use not permitted";
86 return "key cannot be wrapped";
88 return "key cannot be extracted";
90 return "invalid mechanism specified";
92 return "invalid mechanism parameters";
94 return "invalid object handle";
96 return "conflicting active operation";
98 return "operation not initialized";
100 return "incorrect PIN";
102 return "invalid PIN characters";
104 return "PIN length out of range";
106 return "PIN expired";
108 return "PIN locked due to failed attempts";
110 return "session closed during function execution";
112 return "too many sessions open";
114 return "invalid session handle";
116 return "parallel sessions not supported";
118 return "read-only session";
120 return "session already open";
122 return "read-only session already exists";
124 return "read/write SO session exists";
126 return "invalid signature";
128 return "invalid signature length";
130 return "incomplete template";
132 return "conflicting template attributes";
134 return "token not present in slot";
136 return "token not recognized";
138 return "token is write-protected";
140 return "invalid unwrapping key handle";
142 return "unwrapping key size out of range";
144 return "unwrapping key type inconsistent";
146 return "user already logged in";
148 return "user not logged in";
150 return "user PIN not initialized";
152 return "invalid user type";
154 return "another user already logged in";
156 return "too many distinct users logged in";
158 return "invalid wrapped key";
160 return "wrapped key length out of range";
162 return "invalid wrapping key handle";
164 return "wrapping key size out of range";
166 return "wrapping key type inconsistent";
168 return "RNG does not accept seeding";
170 return "no random number generator";
172 return "invalid domain parameters";
174 return "curve not supported by token";
176 return "output buffer too small";
178 return "invalid saved state";
180 return "information is sensitive";
182 return "state cannot be saved";
184 return "library not initialized";
186 return "library already initialized";
188 return "bad mutex object";
190 return "mutex not locked";
192 return "new PIN mode";
196 return "exceeded max iterations";
198 return "FIPS self-test failed";
200 return "failed to load dependent library";
202 return "PIN too weak";
204 return "invalid public key";
206 return "signature request rejected by user";
208 return "token resource exceeded";
210 return "operation cancel failed";
212 return "key exhausted";
214 return "operation running asynchronously";
216 return "async operations not supported";
218 return "RNG needs seeding";
220 return "operation violates token validation policies";
222 return "token needs initialization";
224 return "parameter set not supported";
226 return "vendor defined error";
228 return "unknown error";
234 m_return_val(return_val) {}
PKCS11_Error(std::string_view what)
PKCS11_ReturnError(ReturnValue return_val)
@ SessionReadWriteSoExists
@ SessionParallelNotSupported
@ UnwrappingKeyHandleInvalid
@ UserAnotherAlreadyLoggedIn
@ ParameterSetNotSupported
@ UnwrappingKeyTypeInconsistent
@ KeyFunctionNotPermitted
@ SessionAsyncNotSupported
@ CryptokiAlreadyInitialized
@ WrappingKeyTypeInconsistent
@ OperationNotInitialized
@ WrappingKeyHandleInvalid
std::string fmt(std::string_view format, const T &... args)
std::string to_string(ErrorType type)
Convert an ErrorType to string.