libzpc
1.5
IBM Z Protected-key Crypto library
Loading...
Searching...
No Matches
home
dengler
git
libzpc-review
include
zpc
error.h
Go to the documentation of this file.
1
/*
2
* Copyright IBM Corp. 2021
3
*
4
* libzpc is free software; you can redistribute it and/or modify
5
* it under the terms of the MIT license. See LICENSE for details.
6
*/
7
8
#ifndef ZPC_ERROR_H
9
# define ZPC_ERROR_H
10
# ifdef __cplusplus
11
/* *INDENT-OFF* */
12
extern
"C"
{
13
/* *INDENT-ON* */
14
# endif
15
20
25
# define ZPC_ERROR_ARG1NULL 1
26
31
# define ZPC_ERROR_ARG2NULL 2
32
37
# define ZPC_ERROR_ARG3NULL 3
38
43
# define ZPC_ERROR_ARG4NULL 4
44
49
# define ZPC_ERROR_ARG5NULL 5
50
55
# define ZPC_ERROR_ARG6NULL 6
56
61
# define ZPC_ERROR_ARG7NULL 7
62
67
# define ZPC_ERROR_ARG8NULL 8
68
73
# define ZPC_ERROR_ARG1RANGE 9
74
79
# define ZPC_ERROR_ARG2RANGE 10
80
85
# define ZPC_ERROR_ARG3RANGE 11
86
91
# define ZPC_ERROR_ARG4RANGE 12
92
97
# define ZPC_ERROR_ARG5RANGE 13
98
103
# define ZPC_ERROR_ARG6RANGE 14
104
109
# define ZPC_ERROR_ARG7RANGE 15
110
115
# define ZPC_ERROR_ARG8RANGE 16
116
121
# define ZPC_ERROR_MALLOC 17
122
127
# define ZPC_ERROR_KEYNOTSET 18
128
133
# define ZPC_ERROR_KEYSIZE 19
134
139
# define ZPC_ERROR_IVNOTSET 20
140
145
# define ZPC_ERROR_IVSIZE 21
146
151
# define ZPC_ERROR_TAGSIZE 22
152
157
# define ZPC_ERROR_TAGMISMATCH 23
158
163
# define ZPC_ERROR_HWCAPS 24
164
169
# define ZPC_ERROR_SMALLOUTBUF 25
170
175
# define ZPC_ERROR_APQNSNOTSET 26
176
181
# define ZPC_ERROR_KEYTYPE 27
182
187
# define ZPC_ERROR_KEYTYPENOTSET 28
188
193
# define ZPC_ERROR_IOCTLGENSECK2 29
194
199
# define ZPC_ERROR_IOCTLCLR2SECK2 30
200
205
# define ZPC_ERROR_IOCTLBLOB2PROTK2 31
206
211
# define ZPC_ERROR_WKVPMISMATCH 32
212
217
# define ZPC_ERROR_DEVPKEY 33
218
223
# define ZPC_ERROR_CLEN 34
224
229
# define ZPC_ERROR_MLEN 35
230
235
# define ZPC_ERROR_AADLEN 36
236
241
# define ZPC_ERROR_PARSE 38
242
247
# define ZPC_ERROR_APQNNOTFOUND 39
248
253
# define ZPC_ERROR_MKVPLEN 40
254
259
# define ZPC_ERROR_INITLOCK 42
260
265
# define ZPC_ERROR_OBJINUSE 43
266
271
# define ZPC_ERROR_IOCTLAPQNS4KT 44
272
277
# define ZPC_ERROR_KEYSIZENOTSET 45
278
283
# define ZPC_ERROR_IOCTLGENPROTK 46
284
289
# define ZPC_ERROR_PROTKEYONLY 47
290
295
# define ZPC_ERROR_KEYSEQUAL 48
296
301
# define ZPC_ERROR_NOTSUP 49
302
307
# define ZPC_ERROR_EC_INVALID_CURVE 50
308
313
# define ZPC_ERROR_EC_CURVE_NOTSET 51
314
319
# define ZPC_ERROR_EC_PRIVKEY_NOTSET 52
320
325
# define ZPC_ERROR_EC_PUBKEY_NOTSET 53
326
331
# define ZPC_ERROR_EC_NO_KEY_PARTS 54
332
337
# define ZPC_ERROR_EC_SIGNATURE_INVALID 55
338
343
# define ZPC_ERROR_IOCTLBLOB2PROTK3 56
344
349
# define ZPC_ERROR_IOCTLCLR2SECK3 57
350
355
# define ZPC_ERROR_APQNS_NOTSET 58
356
361
# define ZPC_ERROR_EC_SIGNATURE_LENGTH 59
362
368
# define ZPC_ERROR_EC_KEY_PARTS_INCONSISTENT 60
369
374
# define ZPC_ERROR_CCA_HOST_LIB_NOT_AVAILABLE 61
375
380
# define ZPC_ERROR_EP11_HOST_LIB_NOT_AVAILABLE 62
381
386
# define ZPC_ERROR_EC_PUBKEY_LENGTH 63
387
392
# define ZPC_ERROR_EC_PRIVKEY_LENGTH 64
393
398
# define ZPC_ERROR_EC_NO_CCA_SECUREKEY_TOKEN 65
399
404
# define ZPC_ERROR_EC_NO_EP11_SECUREKEY_TOKEN 66
405
410
# define ZPC_ERROR_EC_EP11_SPKI_INVALID_LENGTH 67
411
416
# define ZPC_ERROR_EC_EP11_SPKI_INVALID_CURVE 68
417
422
# define ZPC_ERROR_EC_EP11_SPKI_INVALID_PUBKEY 69
423
428
# define ZPC_ERROR_EC_EP11_SPKI_INVALID_MKVP 70
429
434
# define ZPC_ERROR_BLOB_NOT_PKEY_EXTRACTABLE 71
435
440
# define ZPC_ERROR_APQNS_INVALID_VERSION 72
441
446
# define ZPC_ERROR_AES_NO_EP11_SECUREKEY_TOKEN 73
447
452
# define ZPC_ERROR_AES_NO_CCA_DATAKEY_TOKEN 74
453
458
# define ZPC_ERROR_AES_NO_CCA_CIPHERKEY_TOKEN 75
459
464
# define ZPC_ERROR_RNDGEN 76
465
470
# define ZPC_ERROR_GCM_IV_CREATED_INTERNALLY 77
471
476
# define ZPC_ERROR_UV_PVSECRETS_NOT_AVAILABLE 78
477
482
# define ZPC_ERROR_PVSECRET_TYPE_NOT_SUPPORTED 79
483
488
# define ZPC_ERROR_PVSECRET_ID_NOT_FOUND_IN_UV_OR_INVALID_TYPE 80
489
494
# define ZPC_ERROR_IOCTLVERIFYKEY2 81
495
500
# define ZPC_ERROR_HMAC_HASH_FUNCTION_NOTSET 82
501
506
# define ZPC_ERROR_HMAC_HASH_FUNCTION_INVALID 83
507
512
# define ZPC_ERROR_HMAC_KEYGEN_VIA_SYSFS 84
513
518
# define ZPC_ERROR_CREATE_BLOCKSIZED_KEY 85
519
524
# define ZPC_ERROR_XTS_KEYGEN_VIA_SYSFS 86
525
532
__attribute__((visibility(
"default"
)))
533
const
char
*
zpc_error_string
(
int
);
534
535
# ifdef __cplusplus
536
/* *INDENT-OFF* */
537
}
538
/* *INDENT-ON* */
539
# endif
540
#endif
zpc_error_string
const char * zpc_error_string(int)
Map an error code to the corresponding error string.
Generated by
1.15.0