#### GSSAPI Error Codes

Generic GSSAPI Errors:

0. G_BAD_SERVICE_NAME: No in SERVICE-NAME name string
1. G_BAD_STRING_UID: STRING-UID-NAME contains nondigits
2. G_NOUSER: UID does not resolve to username
3. G_VALIDATE_FAILED: Validation error
4. G_BUFFER_ALLOC: Couldn't allocate gss_buffer_t data
5. G_BAD_MSG_CTX: Message context invalid
6. G_WRONG_SIZE: Buffer is the wrong size
7. G_BAD_USAGE: Credential usage type is unknown
8. G_UNKNOWN_QOP: Unknown quality of protection specified
9. G_BAD_HOSTNAME: Hostname in SERVICE-NAME string could not be canonicalized
10. G_WRONG_MECH: Mechanism is incorrect
11. G_BAD_TOK_HEADER: Token header is malformed or corrupt
12. G_BAD_DIRECTION: Packet was replayed in wrong direction
13. G_TOK_TRUNC: Token is missing data
14. G_REFLECT: Token was reflected
15. G_WRONG_TOKID: Received token ID does not match expected token ID

Kerberos 5 GSSAPI Errors:

0. KG_CCACHE_NOMATCH: Principal in credential cache does not match desired name
1. KG_KEYTAB_NOMATCH: No principal in keytab matches desired name
2. KG_TGT_MISSING: Credential cache has no TGT
3. KG_NO_SUBKEY: Authenticator has no subkey
4. KG_CONTEXT_ESTABLISHED: Context is already fully established
5. KG_BAD_SIGN_TYPE: Unknown signature type in token
6. KG_BAD_LENGTH: Invalid field length in token
7. KG_CTX_INCOMPLETE: Attempt to use incomplete security context
8. KG_CONTEXT: Bad magic number for krb5_gss_ctx_id_t
9. KG_CRED: Bad magic number for krb5_gss_cred_id_t
10. KG_ENC_DESC: Bad magic number for krb5_gss_enc_desc
11. KG_BAD_SEQ: Sequence number in token is corrupt
12. KG_EMPTY_CCACHE: Credential cache is empty
13. KG_NO_CTYPES: Acceptor and Initiator share no checksum types