GSKit return codes

0 - GSK_OK
The task completed successfully. Issued by every function call that completes successfully.
1 - GSK_INVALID_HANDLE
The environment or SSL handle is not valid. The specified handle was not the result of a successful open function call.
2 - GSK_API_NOT_AVAILABLE
The dynamic link library unloaded (Windows only).
3 - GSK_INTERNAL_ERROR
An internal error occurred. Report this error to service.
4 - GSK_INSUFFICIENT_STORAGE
Main memory is insufficient to perform the operation.
5 - GSK_INVALID_STATE
The handle is in an invalid state for operation, such as performing an init operation on a handle twice.
6 - GSK_KEY_LABEL_NOT_FOUND
Specified key label not found in keyfile.
7 - GSK_CERTIFICATE_NOT_AVAILABLE
Certificate not received from partner.
8 - GSK_ERROR_CERT_VALIDATION
Certificate validation error.
9 - GSK_ERROR_CRYPTO
Error processing cryptography.
10 - GSK_ERROR_ASN
Error validating ASN fields in certificate.
11 - GSK_ERROR_LDAP
Error connecting to LDAP server.
12 - GSK_ERROR_UNKNOWN_ERROR
Internal unknown error. Report problem to service.
101 - GSK_OPEN_CIPHER_ERROR
Internal unknown error. Report problem to service.
102 - GSK_KEYFILE_IO_ERROR
I/O error reading keyfile.
103 - GSK_KEYFILE_INVALID_FORMAT
Keyfile has an invalid internal format. Re-create keyfile.
104 - GSK_KEYFILE_DUPLICATE_KEY
Keyfile has two entries with the same key. Use iKeyman to remove the duplicate key.
105 - GSK_KEYFILE_DUPLICATE_LABEL
Keyfile has two entries with the same label. Use iKeyman to remove the duplicate label.
106 - GSK_BAD_FORMAT_OR_INVALID_PASSWORD
The keyfile password is used as an integrity check. Either the keyfile has become corrupted or the password ID is incorrect.
107 - GSK_KEYFILE_CERT_EXPIRED
The default key in the keyfile has an expired certificate. Use iKeyman to remove certificates that are expired.
108 - GSK_ERROR_LOAD_GSKLIB
There was an error loading one of the GSK dynamic link libraries or test ICC selftest failed. Be sure GSK was installed correctly.
109 - GSK_PENDING_CLOSE_ERROR
Indicates that a connection is trying to be made in a gsk environment after the GSK_ENVIRONMENT_CLOSE_OPTIONS has been set to GSK_DELAYED_ENVIRONMENT_CLOSE and gsk_environment_close() function has been called.
201 - GSK_NO_KEYFILE_PASSWORD
Neither the password nor the stash-file name was specified, so the key file could not be initialized.
202 - GSK_KEYRING_OPEN_ERROR
Unable to open the key file or the Microsoft Certificate Store. Either the path was specified incorrectly or the file permissions did not allow the file to be opened, or the file format is incorrect.
203 - GSK_RSA_TEMP_KEY_PAIR
Unable to generate a temporary key pair. Report this error to service.
204 - GSK_ERROR_LDAP_NO_SUCH_OBJECT
A User Name object was specified that is not found.
205 - GSK_ERROR_LDAP_INVALID_CREDENTIALS
A Password used for an LDAP query is not correct.
206 - GSK_ERROR_BAD_INDEX
An index into the Fail Over list of LDAP servers was not correct.
207 - GSK_ERROR_FIPS_NOT_SUPPORTED
Attempt to put GSKit into FIPS mode has failed.
301 - GSK_CLOSE_FAILED
Indicates that the GSK environment close request was not properly handled. Cause is most likely due to a gsk_secure_socket*() command being attempted after a gsk_close_environment() call.
401 - GSK_ERROR_BAD_DATE
The system date was set to an invalid value.
402 - GSK_ERROR_NO_CIPHERS
Neither SSLV2 nor SSLV3 is enabled.
403 - GSK_ERROR_NO_CERTIFICATE
The required certificate was not received from partner.
404 - GSK_ERROR_BAD_CERTIFICATE
The received certificate was formatted incorrectly.
405 - GSK_ERROR_UNSUPPORTED_CERTIFICATE_TYPE
The received certificate type was not supported.
406 - GSK_ERROR_IO
An IO error occurred on a data read or write.
407 - GSK_ERROR_BAD_KEYFILE_LABEL
The specified label in the key file could not be found.
408 - GSK_ERROR_BAD_KEYFILE_PASSWORD
The specified key file password is incorrect. The key file could not be used. The key file may also be corrupt.
409 - GSK_ERROR_BAD_KEY_LEN_FOR_EXPORT
In a restricted cryptography environment, the key size is too long to be supported.
410 - GSK_ERROR_BAD_MESSAGE
An incorrectly formatted SSL message was received from the partner.
411 - GSK_ERROR_BAD_MAC
The message authentication code (MAC) was not successfully verified.
412 - GSK_ERROR_UNSUPPORTED
Unsupported SSL protocol or unsupported certificate type.
413 - GSK_ERROR_BAD_CERT_SIG
The received certificate contained an incorrect signature.
414 - GSK_ERROR_BAD_CERT
Incorrectly formatted certificate received from partner.
415 - GSK_ERROR_BAD_PEER
Invalid SSL protocol received from partner.
416 - GSK_ERROR_PERMISSION_DENIED
Internal error. Report problem to service.
417 - GSK_ERROR_SELF_SIGNED
The self-signed certificate is not valid.
418 - GSK_ERROR_NO_READ_FUNCTION
The read failed. Report this error to service.
419 - GSK_ERROR_NO_WRITE_FUNCTION
The write failed. Report this error to service.
420 - GSK_ERROR_SOCKET_CLOSED
The partner closed the socket before the protocol completed.
421 - GSK_ERROR_BAD_V2_CIPHER
The specified V2 cipher is not valid.
422 - GSK_ERROR_BAD_V3_CIPHER
The specified V3 cipher is not valid.
423 - GSK_ERROR_BAD_SEC_TYPE
Internal error. Report problem to service.
424 - GSK_ERROR_BAD_SEC_TYPE_COMBINATION
Internal error. Report problem to service.
425 - GSK_ERROR_HANDLE_CREATION_FAILED
The handle could not be created. Report this internal error to service.
426 - GSK_ERROR_INITIALIZATION_FAILED
Initialization failed. Report this internal error to service.
427 - GSK_ERROR_LDAP_NOT_AVAILABLE
When validating a certificate, unable to access the specified LDAP directory.
428 - GSK_ERROR_NO_PRIVATE_KEY
The specified key did not contain a private key.
429 - GSK_ERROR_PKCS11_LIBRARY_NOTLOADED
A failed attempt was made to load the specified PKCS11 shared library.
430 - GSK_ERROR_PKCS11_TOKEN_LABELMISMATCH
The PKCS #11 driver failed to find the token specified by the caller.
431 - GSK_ERROR_PKCS11_TOKEN_NOTPRESENT
A PKCS #11 token is not present in the slot.
432 - GSK_ERROR_PKCS11_TOKEN_BADPASSWORD
The password/pin to access the PKCS #11 token is invalid.
433 - GSK_ERROR_INVALID_V2_HEADER
The SSL header received was not a properly SSLV2 formated header.
434 - GSK_CSP_OPEN_ERROR
Unable to access the hardware-based cryptographic service provider (CSP). Either the given CSP name is not registered in the system or the specified CSP name is registered but the certificate store failed to open.
435 - GSK_CONFLICTING_ATTRIBUTE_SETTING
Attribute setting conflict between PKCS11, CMS key database, and Microsoft Crypto API.