3.3.3 Error Codes
libgpg-error defines many error values. The
following list includes the most important error codes.
- This value indicates the end of a list, buffer or file.
- This value indicates success. The value of this error code is
0. Also, it is guaranteed that an error value made from the
0 will be
0 itself (as a whole). This means
that the error source information is lost for this error code,
however, as this error code indicates that no error occurred, this is
generally not a problem.
- This value means that something went wrong, but either there is not
enough information about the problem to return a more useful error
value, or there is no separate error value for this type of problem.
- This value means that an out-of-memory condition occurred.
- System errors are mapped to GPG_ERR_EFOO where FOO is the symbol for
the system error.
- This value means that some user provided data was out of range.
- This value means that some recipients for a message were invalid.
- This value means that some signers were invalid.
- This value means that data was expected where no data was found.
- This value means that a conflict of some sort occurred.
- This value indicates that the specific function (or operation) is not
implemented. This error should never happen. It can only occur if
you use certain values or configuration options which do not work,
but for which we think that they should work at some later time.
- This value indicates that a decryption operation was unsuccessful.
- This value indicates that a key is not used appropriately.
- This value indicates that no secret key for the user ID is available.
- This value means a verification failed because the cryptographic
algorithm is not supported by the crypto backend.
- This value means a verification failed because the signature is bad.
- This value means a verification failed because the public key is not
- This value means that the library is not yet in state which allows to
use this function. This error code is in particular returned if
Libgcrypt is operated in FIPS mode and the internal state of the
library does not yet or not anymore allow the use of a service.
This error code is only available with newer libgpg-error versions, thus
you might see “invalid error code” when passing this to
gpg_strerror. The numeric value of this error code is 176.
- These error codes are not used by any GnuPG component and can be
freely used by other software. Applications using Libgcrypt
might use them to mark specific errors returned by callback handlers
if no suitable error codes (including the system errors) for these
errors exist already.