|
libzpc 1.5
IBM Z Protected-key Crypto library
|
Error API. More...
Go to the source code of this file.
Macros | |
| #define | ZPC_ERROR_ARG1NULL 1 |
| Function argument 1 is NULL. | |
| #define | ZPC_ERROR_ARG2NULL 2 |
| Function argument 2 is NULL. | |
| #define | ZPC_ERROR_ARG3NULL 3 |
| Function argument 3 is NULL. | |
| #define | ZPC_ERROR_ARG4NULL 4 |
| Function argument 4 is NULL. | |
| #define | ZPC_ERROR_ARG5NULL 5 |
| Function argument 5 is NULL. | |
| #define | ZPC_ERROR_ARG6NULL 6 |
| Function argument 6 is NULL. | |
| #define | ZPC_ERROR_ARG7NULL 7 |
| Function argument 7 is NULL. | |
| #define | ZPC_ERROR_ARG8NULL 8 |
| Function argument 8 is NULL. | |
| #define | ZPC_ERROR_ARG1RANGE 9 |
| Function argument 1 is out of range. | |
| #define | ZPC_ERROR_ARG2RANGE 10 |
| Function argument 2 is out of range. | |
| #define | ZPC_ERROR_ARG3RANGE 11 |
| Function argument 3 is out of range. | |
| #define | ZPC_ERROR_ARG4RANGE 12 |
| Function argument 4 is out of range. | |
| #define | ZPC_ERROR_ARG5RANGE 13 |
| Function argument 5 is out of range. | |
| #define | ZPC_ERROR_ARG6RANGE 14 |
| Function argument 6 is out of range. | |
| #define | ZPC_ERROR_ARG7RANGE 15 |
| Function argument 7 is out of range. | |
| #define | ZPC_ERROR_ARG8RANGE 16 |
| Function argument 8 is out of range. | |
| #define | ZPC_ERROR_MALLOC 17 |
| Malloc failed. | |
| #define | ZPC_ERROR_KEYNOTSET 18 |
| Key not set. | |
| #define | ZPC_ERROR_KEYSIZE 19 |
| Invalid key size. | |
| #define | ZPC_ERROR_IVNOTSET 20 |
| IV not set. | |
| #define | ZPC_ERROR_IVSIZE 21 |
| Invalid IV size. | |
| #define | ZPC_ERROR_TAGSIZE 22 |
| Invalid tag size. | |
| #define | ZPC_ERROR_TAGMISMATCH 23 |
| Tag mismatch. | |
| #define | ZPC_ERROR_HWCAPS 24 |
| Function not supported. | |
| #define | ZPC_ERROR_SMALLOUTBUF 25 |
| Output buffer too small. | |
| #define | ZPC_ERROR_APQNSNOTSET 26 |
| APQNs not set. | |
| #define | ZPC_ERROR_KEYTYPE 27 |
| Invalid key type. | |
| #define | ZPC_ERROR_KEYTYPENOTSET 28 |
| Key type not set. | |
| #define | ZPC_ERROR_IOCTLGENSECK2 29 |
| PKEY_GENSECK2 ioctl failed. | |
| #define | ZPC_ERROR_IOCTLCLR2SECK2 30 |
| PKEY_CLR2SECK2 ioctl failed. | |
| #define | ZPC_ERROR_IOCTLBLOB2PROTK2 31 |
| PKEY_BLOB2PROTK2 ioctl failed. | |
| #define | ZPC_ERROR_WKVPMISMATCH 32 |
| Wrapping key verification pattern mismatch. | |
| #define | ZPC_ERROR_DEVPKEY 33 |
| Opening /dev/pkey failed. | |
| #define | ZPC_ERROR_CLEN 34 |
| Ciphertext too long. | |
| #define | ZPC_ERROR_MLEN 35 |
| Message too long. | |
| #define | ZPC_ERROR_AADLEN 36 |
| Additional authenticated data too long. | |
| #define | ZPC_ERROR_PARSE 38 |
| Parse error. | |
| #define | ZPC_ERROR_APQNNOTFOUND 39 |
| APQN not found in APQN list. | |
| #define | ZPC_ERROR_MKVPLEN 40 |
| MKVP too long. | |
| #define | ZPC_ERROR_INITLOCK 42 |
| Initializing a lock failed. | |
| #define | ZPC_ERROR_OBJINUSE 43 |
| Object is in use. | |
| #define | ZPC_ERROR_IOCTLAPQNS4KT 44 |
| PKEY_APQNS4KT ioctl failed. | |
| #define | ZPC_ERROR_KEYSIZENOTSET 45 |
| Key-size not set. | |
| #define | ZPC_ERROR_IOCTLGENPROTK 46 |
| PKEY_GENPROTK ioctl failed. | |
| #define | ZPC_ERROR_PROTKEYONLY 47 |
| Protected-key only. | |
| #define | ZPC_ERROR_KEYSEQUAL 48 |
| Keys are equal. | |
| #define | ZPC_ERROR_NOTSUP 49 |
| Not supported. | |
| #define | ZPC_ERROR_EC_INVALID_CURVE 50 |
| Invalid EC curve. | |
| #define | ZPC_ERROR_EC_CURVE_NOTSET 51 |
| EC curve not set. | |
| #define | ZPC_ERROR_EC_PRIVKEY_NOTSET 52 |
| EC private key not set. | |
| #define | ZPC_ERROR_EC_PUBKEY_NOTSET 53 |
| EC public key not set. | |
| #define | ZPC_ERROR_EC_NO_KEY_PARTS 54 |
| No EC key parts given. | |
| #define | ZPC_ERROR_EC_SIGNATURE_INVALID 55 |
| signature invalid. | |
| #define | ZPC_ERROR_IOCTLBLOB2PROTK3 56 |
| PKEY_BLOB2PROTK3 ioctl failed. | |
| #define | ZPC_ERROR_IOCTLCLR2SECK3 57 |
| PKEY_CLR2SECK3 ioctl failed. | |
| #define | ZPC_ERROR_APQNS_NOTSET 58 |
| No APQNs set for this key, but required for this operation. | |
| #define | ZPC_ERROR_EC_SIGNATURE_LENGTH 59 |
| length of given signature is invalid for this EC key. | |
| #define | ZPC_ERROR_EC_KEY_PARTS_INCONSISTENT 60 |
| given public/private key parts are inconsistent. They do not belong to the same EC key. | |
| #define | ZPC_ERROR_CCA_HOST_LIB_NOT_AVAILABLE 61 |
| the CCA host library is not available, but required for this function. | |
| #define | ZPC_ERROR_EP11_HOST_LIB_NOT_AVAILABLE 62 |
| the EP11 host library is not available, but required for this function. | |
| #define | ZPC_ERROR_EC_PUBKEY_LENGTH 63 |
| the given EC public key length is invalid. | |
| #define | ZPC_ERROR_EC_PRIVKEY_LENGTH 64 |
| the given EC private key length is invalid. | |
| #define | ZPC_ERROR_EC_NO_CCA_SECUREKEY_TOKEN 65 |
| the given buffer does not contain a valid CCA secure key token. | |
| #define | ZPC_ERROR_EC_NO_EP11_SECUREKEY_TOKEN 66 |
| the given buffer does not contain a valid EP11 secure key token. | |
| #define | ZPC_ERROR_EC_EP11_SPKI_INVALID_LENGTH 67 |
| the imported buffer contains an EP11 SPKI with an invalid length. | |
| #define | ZPC_ERROR_EC_EP11_SPKI_INVALID_CURVE 68 |
| the imported buffer contains an EP11 SPKI with an invalid EC curve. | |
| #define | ZPC_ERROR_EC_EP11_SPKI_INVALID_PUBKEY 69 |
| the imported buffer contains an EP11 SPKI with an invalid public key. | |
| #define | ZPC_ERROR_EC_EP11_SPKI_INVALID_MKVP 70 |
| the imported buffer contains an EP11 MACed SPKI with an invalid MKVP. | |
| #define | ZPC_ERROR_BLOB_NOT_PKEY_EXTRACTABLE 71 |
| the imported buffer contains a key blob that cannot be transformed into a protected key. | |
| #define | ZPC_ERROR_APQNS_INVALID_VERSION 72 |
| At least one APQN version is invalid for this function. | |
| #define | ZPC_ERROR_AES_NO_EP11_SECUREKEY_TOKEN 73 |
| the given buffer does not contain a valid EP11 AES secure key token. | |
| #define | ZPC_ERROR_AES_NO_CCA_DATAKEY_TOKEN 74 |
| the given buffer does not contain a valid CCA datakey token. | |
| #define | ZPC_ERROR_AES_NO_CCA_CIPHERKEY_TOKEN 75 |
| the given buffer does not contain a valid CCA cipherkey token. | |
| #define | ZPC_ERROR_RNDGEN 76 |
| error creating random bytes. | |
| #define | ZPC_ERROR_GCM_IV_CREATED_INTERNALLY 77 |
| invalid usage of a gcm context with an internally created iv. | |
| #define | ZPC_ERROR_UV_PVSECRETS_NOT_AVAILABLE 78 |
| support for UV retrievable secrets is not available, but required for this function. | |
| #define | ZPC_ERROR_PVSECRET_TYPE_NOT_SUPPORTED 79 |
| the given pvsecret type is not supported by libzpc. | |
| #define | ZPC_ERROR_PVSECRET_ID_NOT_FOUND_IN_UV_OR_INVALID_TYPE 80 |
| the given pvsecret ID does either not exist or belongs to a different secret type. | |
| #define | ZPC_ERROR_IOCTLVERIFYKEY2 81 |
| PKEY_VERIFYKEY2 ioctl failed. | |
| #define | ZPC_ERROR_HMAC_HASH_FUNCTION_NOTSET 82 |
| HMAC hash function not set. | |
| #define | ZPC_ERROR_HMAC_HASH_FUNCTION_INVALID 83 |
| HMAC hash function invalid. | |
| #define | ZPC_ERROR_HMAC_KEYGEN_VIA_SYSFS 84 |
| HMAC key generation via sysfs attributes failed. | |
| #define | ZPC_ERROR_CREATE_BLOCKSIZED_KEY 85 |
| Creating a block-sized HMAC key failed. | |
| #define | ZPC_ERROR_XTS_KEYGEN_VIA_SYSFS 86 |
| creating a full-xts key via sysfs attributes failed. | |
Functions | |
| const char * | zpc_error_string (int) |
| Map an error code to the corresponding error string. | |
Error API.
Definition in file error.h.
| #define ZPC_ERROR_ARG1RANGE 9 |
| #define ZPC_ERROR_ARG2RANGE 10 |
| #define ZPC_ERROR_ARG3RANGE 11 |
| #define ZPC_ERROR_ARG4RANGE 12 |
| #define ZPC_ERROR_ARG5RANGE 13 |
| #define ZPC_ERROR_ARG6RANGE 14 |
| #define ZPC_ERROR_ARG7RANGE 15 |
| #define ZPC_ERROR_ARG8RANGE 16 |
| #define ZPC_ERROR_IOCTLGENSECK2 29 |
| #define ZPC_ERROR_IOCTLCLR2SECK2 30 |
| #define ZPC_ERROR_IOCTLBLOB2PROTK2 31 |
| #define ZPC_ERROR_WKVPMISMATCH 32 |
| #define ZPC_ERROR_AADLEN 36 |
| #define ZPC_ERROR_APQNNOTFOUND 39 |
| #define ZPC_ERROR_IOCTLAPQNS4KT 44 |
| #define ZPC_ERROR_IOCTLGENPROTK 46 |
| #define ZPC_ERROR_EC_PRIVKEY_NOTSET 52 |
| #define ZPC_ERROR_EC_PUBKEY_NOTSET 53 |
| #define ZPC_ERROR_EC_SIGNATURE_INVALID 55 |
| #define ZPC_ERROR_IOCTLBLOB2PROTK3 56 |
| #define ZPC_ERROR_IOCTLCLR2SECK3 57 |
| #define ZPC_ERROR_APQNS_NOTSET 58 |
| #define ZPC_ERROR_EC_SIGNATURE_LENGTH 59 |
| #define ZPC_ERROR_EC_KEY_PARTS_INCONSISTENT 60 |
| #define ZPC_ERROR_CCA_HOST_LIB_NOT_AVAILABLE 61 |
| #define ZPC_ERROR_EP11_HOST_LIB_NOT_AVAILABLE 62 |
| #define ZPC_ERROR_EC_PUBKEY_LENGTH 63 |
| #define ZPC_ERROR_EC_PRIVKEY_LENGTH 64 |
| #define ZPC_ERROR_EC_NO_CCA_SECUREKEY_TOKEN 65 |
| #define ZPC_ERROR_EC_NO_EP11_SECUREKEY_TOKEN 66 |
| #define ZPC_ERROR_EC_EP11_SPKI_INVALID_LENGTH 67 |
| #define ZPC_ERROR_EC_EP11_SPKI_INVALID_CURVE 68 |
| #define ZPC_ERROR_EC_EP11_SPKI_INVALID_PUBKEY 69 |
| #define ZPC_ERROR_EC_EP11_SPKI_INVALID_MKVP 70 |
| #define ZPC_ERROR_BLOB_NOT_PKEY_EXTRACTABLE 71 |
| #define ZPC_ERROR_APQNS_INVALID_VERSION 72 |
| #define ZPC_ERROR_AES_NO_EP11_SECUREKEY_TOKEN 73 |
| #define ZPC_ERROR_AES_NO_CCA_DATAKEY_TOKEN 74 |
| #define ZPC_ERROR_AES_NO_CCA_CIPHERKEY_TOKEN 75 |
| #define ZPC_ERROR_GCM_IV_CREATED_INTERNALLY 77 |
| #define ZPC_ERROR_UV_PVSECRETS_NOT_AVAILABLE 78 |
| #define ZPC_ERROR_PVSECRET_TYPE_NOT_SUPPORTED 79 |
| #define ZPC_ERROR_PVSECRET_ID_NOT_FOUND_IN_UV_OR_INVALID_TYPE 80 |
| #define ZPC_ERROR_IOCTLVERIFYKEY2 81 |
| #define ZPC_ERROR_HMAC_HASH_FUNCTION_NOTSET 82 |
| #define ZPC_ERROR_HMAC_HASH_FUNCTION_INVALID 83 |
| #define ZPC_ERROR_HMAC_KEYGEN_VIA_SYSFS 84 |
| #define ZPC_ERROR_CREATE_BLOCKSIZED_KEY 85 |
| #define ZPC_ERROR_XTS_KEYGEN_VIA_SYSFS 86 |
| const char * zpc_error_string | ( | int | err | ) |
Map an error code to the corresponding error string.
| [in] | err | An error code. |