28 #if defined(POLARSSL_ERROR_C)
32 #if defined(POLARSSL_AES_C)
36 #if defined(POLARSSL_BASE64_C)
40 #if defined(POLARSSL_BIGNUM_C)
44 #if defined(POLARSSL_BLOWFISH_C)
48 #if defined(POLARSSL_CAMELLIA_C)
52 #if defined(POLARSSL_CIPHER_C)
56 #if defined(POLARSSL_CTR_DRBG_C)
60 #if defined(POLARSSL_DES_C)
64 #if defined(POLARSSL_DHM_C)
68 #if defined(POLARSSL_ECP_C)
72 #if defined(POLARSSL_ENTROPY_C)
76 #if defined(POLARSSL_GCM_C)
80 #if defined(POLARSSL_MD_C)
84 #if defined(POLARSSL_MD2_C)
88 #if defined(POLARSSL_MD4_C)
92 #if defined(POLARSSL_MD5_C)
96 #if defined(POLARSSL_NET_C)
100 #if defined(POLARSSL_OID_C)
104 #if defined(POLARSSL_PADLOCK_C)
108 #if defined(POLARSSL_PBKDF2_C)
112 #if defined(POLARSSL_PEM_PARSE_C) || defined(POLARSSL_PEM_WRITE_C)
116 #if defined(POLARSSL_PK_C)
120 #if defined(POLARSSL_PKCS12_C)
124 #if defined(POLARSSL_PKCS5_C)
128 #if defined(POLARSSL_RSA_C)
132 #if defined(POLARSSL_SHA1_C)
136 #if defined(POLARSSL_SHA256_C)
140 #if defined(POLARSSL_SHA512_C)
144 #if defined(POLARSSL_SSL_TLS_C)
148 #if defined(POLARSSL_THREADING_C)
152 #if defined(POLARSSL_X509_USE_C) || defined(POLARSSL_X509_CREATE_C)
156 #if defined(POLARSSL_XTEA_C)
163 #if defined _MSC_VER && !defined snprintf
164 #define snprintf _snprintf
175 memset( buf, 0x00, buflen );
184 use_ret = ret & 0xFF80;
188 #if defined(POLARSSL_CIPHER_C)
190 snprintf( buf, buflen,
"CIPHER - The selected feature is not available" );
192 snprintf( buf, buflen,
"CIPHER - Bad input parameters to function" );
194 snprintf( buf, buflen,
"CIPHER - Failed to allocate memory" );
196 snprintf( buf, buflen,
"CIPHER - Input data contains invalid padding and is rejected" );
198 snprintf( buf, buflen,
"CIPHER - Decryption of block requires a full block" );
200 snprintf( buf, buflen,
"CIPHER - Authentication failed (for AEAD modes)" );
203 #if defined(POLARSSL_DHM_C)
205 snprintf( buf, buflen,
"DHM - Bad input parameters to function" );
207 snprintf( buf, buflen,
"DHM - Reading of the DHM parameters failed" );
209 snprintf( buf, buflen,
"DHM - Making of the DHM parameters failed" );
211 snprintf( buf, buflen,
"DHM - Reading of the public values failed" );
213 snprintf( buf, buflen,
"DHM - Making of the public value failed" );
215 snprintf( buf, buflen,
"DHM - Calculation of the DHM secret failed" );
217 snprintf( buf, buflen,
"DHM - The ASN.1 data is not formatted correctly" );
219 snprintf( buf, buflen,
"DHM - Allocation of memory failed" );
221 snprintf( buf, buflen,
"DHM - Read/write of file failed" );
224 #if defined(POLARSSL_ECP_C)
226 snprintf( buf, buflen,
"ECP - Bad input parameters to function" );
228 snprintf( buf, buflen,
"ECP - The buffer is too small to write to" );
230 snprintf( buf, buflen,
"ECP - Requested curve not available" );
232 snprintf( buf, buflen,
"ECP - The signature is not valid" );
234 snprintf( buf, buflen,
"ECP - Memory allocation failed" );
236 snprintf( buf, buflen,
"ECP - Generation of random value, such as (ephemeral) key, failed" );
238 snprintf( buf, buflen,
"ECP - Invalid private or public key" );
241 #if defined(POLARSSL_MD_C)
243 snprintf( buf, buflen,
"MD - The selected feature is not available" );
245 snprintf( buf, buflen,
"MD - Bad input parameters to function" );
247 snprintf( buf, buflen,
"MD - Failed to allocate memory" );
249 snprintf( buf, buflen,
"MD - Opening or reading of file failed" );
252 #if defined(POLARSSL_PEM_PARSE_C) || defined(POLARSSL_PEM_WRITE_C)
254 snprintf( buf, buflen,
"PEM - No PEM header or footer found" );
256 snprintf( buf, buflen,
"PEM - PEM string is not as expected" );
258 snprintf( buf, buflen,
"PEM - Failed to allocate memory" );
260 snprintf( buf, buflen,
"PEM - RSA IV is not in hex-format" );
262 snprintf( buf, buflen,
"PEM - Unsupported key encryption algorithm" );
264 snprintf( buf, buflen,
"PEM - Private key password can't be empty" );
266 snprintf( buf, buflen,
"PEM - Given private key password does not allow for correct decryption" );
268 snprintf( buf, buflen,
"PEM - Unavailable feature, e.g. hashing/encryption combination" );
270 snprintf( buf, buflen,
"PEM - Bad input parameters to function" );
273 #if defined(POLARSSL_PK_C)
275 snprintf( buf, buflen,
"PK - Memory alloation failed" );
277 snprintf( buf, buflen,
"PK - Type mismatch, eg attempt to encrypt with an ECDSA key" );
279 snprintf( buf, buflen,
"PK - Bad input parameters to function" );
281 snprintf( buf, buflen,
"PK - Read/write of file failed" );
283 snprintf( buf, buflen,
"PK - Unsupported key version" );
285 snprintf( buf, buflen,
"PK - Invalid key tag or value" );
287 snprintf( buf, buflen,
"PK - Key algorithm is unsupported (only RSA and EC are supported)" );
289 snprintf( buf, buflen,
"PK - Private key password can't be empty" );
291 snprintf( buf, buflen,
"PK - Given private key password does not allow for correct decryption" );
293 snprintf( buf, buflen,
"PK - The pubkey tag or value is invalid (only RSA and EC are supported)" );
295 snprintf( buf, buflen,
"PK - The algorithm tag or value is invalid" );
297 snprintf( buf, buflen,
"PK - Elliptic curve is unsupported (only NIST curves are supported)" );
299 snprintf( buf, buflen,
"PK - Unavailable feature, e.g. RSA disabled for RSA key" );
302 #if defined(POLARSSL_PKCS12_C)
304 snprintf( buf, buflen,
"PKCS12 - Bad input parameters to function" );
306 snprintf( buf, buflen,
"PKCS12 - Feature not available, e.g. unsupported encryption scheme" );
308 snprintf( buf, buflen,
"PKCS12 - PBE ASN.1 data not as expected" );
310 snprintf( buf, buflen,
"PKCS12 - Given private key password does not allow for correct decryption" );
313 #if defined(POLARSSL_PKCS5_C)
315 snprintf( buf, buflen,
"PKCS5 - Bad input parameters to function" );
317 snprintf( buf, buflen,
"PKCS5 - Unexpected ASN.1 data" );
319 snprintf( buf, buflen,
"PKCS5 - Requested encryption or digest alg not available" );
321 snprintf( buf, buflen,
"PKCS5 - Given private key password does not allow for correct decryption" );
324 #if defined(POLARSSL_RSA_C)
326 snprintf( buf, buflen,
"RSA - Bad input parameters to function" );
328 snprintf( buf, buflen,
"RSA - Input data contains invalid padding and is rejected" );
330 snprintf( buf, buflen,
"RSA - Something failed during generation of a key" );
332 snprintf( buf, buflen,
"RSA - Key failed to pass the libraries validity check" );
334 snprintf( buf, buflen,
"RSA - The public key operation failed" );
336 snprintf( buf, buflen,
"RSA - The private key operation failed" );
338 snprintf( buf, buflen,
"RSA - The PKCS#1 verification failed" );
340 snprintf( buf, buflen,
"RSA - The output buffer for decryption is not large enough" );
342 snprintf( buf, buflen,
"RSA - The random generator failed to generate non-zeros" );
345 #if defined(POLARSSL_SSL_TLS_C)
347 snprintf( buf, buflen,
"SSL - The requested feature is not available" );
349 snprintf( buf, buflen,
"SSL - Bad input parameters to function" );
351 snprintf( buf, buflen,
"SSL - Verification of the message MAC failed" );
353 snprintf( buf, buflen,
"SSL - An invalid SSL record was received" );
355 snprintf( buf, buflen,
"SSL - The connection indicated an EOF" );
357 snprintf( buf, buflen,
"SSL - An unknown cipher was received" );
359 snprintf( buf, buflen,
"SSL - The server has no ciphersuites in common with the client" );
361 snprintf( buf, buflen,
"SSL - No session to recover was found" );
363 snprintf( buf, buflen,
"SSL - No client certification received from the client, but required by the authentication mode" );
365 snprintf( buf, buflen,
"SSL - DESCRIPTION MISSING" );
367 snprintf( buf, buflen,
"SSL - The own certificate is not set, but needed by the server" );
369 snprintf( buf, buflen,
"SSL - The own private key or pre-shared key is not set, but needed" );
371 snprintf( buf, buflen,
"SSL - No CA Chain is set, but required to operate" );
373 snprintf( buf, buflen,
"SSL - An unexpected message was received from our peer" );
376 snprintf( buf, buflen,
"SSL - A fatal alert message was received from our peer" );
380 snprintf( buf, buflen,
"SSL - Verification of our peer failed" );
382 snprintf( buf, buflen,
"SSL - The peer notified us that the connection is going to be closed" );
384 snprintf( buf, buflen,
"SSL - Processing of the ClientHello handshake message failed" );
386 snprintf( buf, buflen,
"SSL - Processing of the ServerHello handshake message failed" );
388 snprintf( buf, buflen,
"SSL - Processing of the Certificate handshake message failed" );
390 snprintf( buf, buflen,
"SSL - Processing of the CertificateRequest handshake message failed" );
392 snprintf( buf, buflen,
"SSL - Processing of the ServerKeyExchange handshake message failed" );
394 snprintf( buf, buflen,
"SSL - Processing of the ServerHelloDone handshake message failed" );
396 snprintf( buf, buflen,
"SSL - Processing of the ClientKeyExchange handshake message failed" );
398 snprintf( buf, buflen,
"SSL - Processing of the ClientKeyExchange handshake message failed in DHM / ECDH Read Public" );
400 snprintf( buf, buflen,
"SSL - Processing of the ClientKeyExchange handshake message failed in DHM / ECDH Calculate Secret" );
402 snprintf( buf, buflen,
"SSL - Processing of the CertificateVerify handshake message failed" );
404 snprintf( buf, buflen,
"SSL - Processing of the ChangeCipherSpec handshake message failed" );
406 snprintf( buf, buflen,
"SSL - Processing of the Finished handshake message failed" );
408 snprintf( buf, buflen,
"SSL - Memory allocation failed" );
410 snprintf( buf, buflen,
"SSL - Hardware acceleration function returned with error" );
412 snprintf( buf, buflen,
"SSL - Hardware acceleration function skipped / left alone data" );
414 snprintf( buf, buflen,
"SSL - Processing of the compression / decompression failed" );
416 snprintf( buf, buflen,
"SSL - Handshake protocol not within min/max boundaries" );
418 snprintf( buf, buflen,
"SSL - Processing of the NewSessionTicket handshake message failed" );
420 snprintf( buf, buflen,
"SSL - Session ticket has expired" );
422 snprintf( buf, buflen,
"SSL - Public key type mismatch (eg, asked for RSA key exchange and presented EC key)" );
424 snprintf( buf, buflen,
"SSL - Unkown identity received (eg, PSK identity)" );
427 #if defined(POLARSSL_X509_USE_C) || defined(POLARSSL_X509_CREATE_C)
429 snprintf( buf, buflen,
"X509 - Unavailable feature, e.g. RSA hashing/encryption combination" );
431 snprintf( buf, buflen,
"X509 - Requested OID is unknown" );
433 snprintf( buf, buflen,
"X509 - The CRT/CRL/CSR format is invalid, e.g. different type expected" );
435 snprintf( buf, buflen,
"X509 - The CRT/CRL/CSR version element is invalid" );
437 snprintf( buf, buflen,
"X509 - The serial tag or value is invalid" );
439 snprintf( buf, buflen,
"X509 - The algorithm tag or value is invalid" );
441 snprintf( buf, buflen,
"X509 - The name tag or value is invalid" );
443 snprintf( buf, buflen,
"X509 - The date tag or value is invalid" );
445 snprintf( buf, buflen,
"X509 - The signature tag or value invalid" );
447 snprintf( buf, buflen,
"X509 - The extension tag or value is invalid" );
449 snprintf( buf, buflen,
"X509 - CRT/CRL/CSR has an unsupported version number" );
451 snprintf( buf, buflen,
"X509 - Signature algorithm (oid) is unsupported" );
453 snprintf( buf, buflen,
"X509 - Signature algorithms do not match. (see \\c ::x509_crt sig_oid)" );
455 snprintf( buf, buflen,
"X509 - Certificate verification failed, e.g. CRL, CA or signature check failed" );
457 snprintf( buf, buflen,
"X509 - Format not recognized as DER or PEM" );
459 snprintf( buf, buflen,
"X509 - Input invalid" );
461 snprintf( buf, buflen,
"X509 - Allocation of memory failed" );
463 snprintf( buf, buflen,
"X509 - Read/write of file failed" );
466 if( strlen( buf ) == 0 )
467 snprintf( buf, buflen,
"UNKNOWN ERROR CODE (%04X)", use_ret );
470 use_ret = ret & ~0xFF80;
482 if( buflen - len < 5 )
485 snprintf( buf + len, buflen - len,
" : " );
493 #if defined(POLARSSL_AES_C)
495 snprintf( buf, buflen,
"AES - Invalid key length" );
497 snprintf( buf, buflen,
"AES - Invalid data input length" );
500 #if defined(POLARSSL_ASN1_PARSE_C)
502 snprintf( buf, buflen,
"ASN1 - Out of data when parsing an ASN1 data structure" );
504 snprintf( buf, buflen,
"ASN1 - ASN1 tag was of an unexpected value" );
506 snprintf( buf, buflen,
"ASN1 - Error when trying to determine the length or invalid length" );
508 snprintf( buf, buflen,
"ASN1 - Actual length differs from expected length" );
510 snprintf( buf, buflen,
"ASN1 - Data is invalid. (not used)" );
512 snprintf( buf, buflen,
"ASN1 - Memory allocation failed" );
514 snprintf( buf, buflen,
"ASN1 - Buffer too small when writing ASN.1 data structure" );
517 #if defined(POLARSSL_BASE64_C)
519 snprintf( buf, buflen,
"BASE64 - Output buffer too small" );
521 snprintf( buf, buflen,
"BASE64 - Invalid character in input" );
524 #if defined(POLARSSL_BIGNUM_C)
526 snprintf( buf, buflen,
"BIGNUM - An error occurred while reading from or writing to a file" );
528 snprintf( buf, buflen,
"BIGNUM - Bad input parameters to function" );
530 snprintf( buf, buflen,
"BIGNUM - There is an invalid character in the digit string" );
532 snprintf( buf, buflen,
"BIGNUM - The buffer is too small to write to" );
534 snprintf( buf, buflen,
"BIGNUM - The input arguments are negative or result in illegal output" );
536 snprintf( buf, buflen,
"BIGNUM - The input argument for division is zero, which is not allowed" );
538 snprintf( buf, buflen,
"BIGNUM - The input arguments are not acceptable" );
540 snprintf( buf, buflen,
"BIGNUM - Memory allocation failed" );
543 #if defined(POLARSSL_BLOWFISH_C)
545 snprintf( buf, buflen,
"BLOWFISH - Invalid key length" );
547 snprintf( buf, buflen,
"BLOWFISH - Invalid data input length" );
550 #if defined(POLARSSL_CAMELLIA_C)
552 snprintf( buf, buflen,
"CAMELLIA - Invalid key length" );
554 snprintf( buf, buflen,
"CAMELLIA - Invalid data input length" );
557 #if defined(POLARSSL_CTR_DRBG_C)
559 snprintf( buf, buflen,
"CTR_DRBG - The entropy source failed" );
561 snprintf( buf, buflen,
"CTR_DRBG - Too many random requested in single call" );
563 snprintf( buf, buflen,
"CTR_DRBG - Input too large (Entropy + additional)" );
565 snprintf( buf, buflen,
"CTR_DRBG - Read/write error in file" );
568 #if defined(POLARSSL_DES_C)
570 snprintf( buf, buflen,
"DES - The data input has an invalid length" );
573 #if defined(POLARSSL_ENTROPY_C)
575 snprintf( buf, buflen,
"ENTROPY - Critical entropy source failure" );
577 snprintf( buf, buflen,
"ENTROPY - No more sources can be added" );
579 snprintf( buf, buflen,
"ENTROPY - No sources have been added to poll" );
582 #if defined(POLARSSL_GCM_C)
584 snprintf( buf, buflen,
"GCM - Authenticated decryption failed" );
586 snprintf( buf, buflen,
"GCM - Bad input parameters to function" );
589 #if defined(POLARSSL_MD2_C)
591 snprintf( buf, buflen,
"MD2 - Read/write error in file" );
594 #if defined(POLARSSL_MD4_C)
596 snprintf( buf, buflen,
"MD4 - Read/write error in file" );
599 #if defined(POLARSSL_MD5_C)
601 snprintf( buf, buflen,
"MD5 - Read/write error in file" );
604 #if defined(POLARSSL_NET_C)
606 snprintf( buf, buflen,
"NET - Failed to get an IP address for the given hostname" );
608 snprintf( buf, buflen,
"NET - Failed to open a socket" );
610 snprintf( buf, buflen,
"NET - The connection to the given server / port failed" );
612 snprintf( buf, buflen,
"NET - Binding of the socket failed" );
614 snprintf( buf, buflen,
"NET - Could not listen on the socket" );
616 snprintf( buf, buflen,
"NET - Could not accept the incoming connection" );
618 snprintf( buf, buflen,
"NET - Reading information from the socket failed" );
620 snprintf( buf, buflen,
"NET - Sending information through the socket failed" );
622 snprintf( buf, buflen,
"NET - Connection was reset by peer" );
624 snprintf( buf, buflen,
"NET - Connection requires a read call" );
626 snprintf( buf, buflen,
"NET - Connection requires a write call" );
629 #if defined(POLARSSL_OID_C)
631 snprintf( buf, buflen,
"OID - OID is not found" );
634 #if defined(POLARSSL_PADLOCK_C)
636 snprintf( buf, buflen,
"PADLOCK - Input data should be aligned" );
639 #if defined(POLARSSL_PBKDF2_C)
641 snprintf( buf, buflen,
"PBKDF2 - Bad input parameters to function" );
644 #if defined(POLARSSL_SHA1_C)
646 snprintf( buf, buflen,
"SHA1 - Read/write error in file" );
649 #if defined(POLARSSL_SHA256_C)
651 snprintf( buf, buflen,
"SHA256 - Read/write error in file" );
654 #if defined(POLARSSL_SHA512_C)
656 snprintf( buf, buflen,
"SHA512 - Read/write error in file" );
659 #if defined(POLARSSL_THREADING_C)
661 snprintf( buf, buflen,
"THREADING - The selected feature is not available" );
663 snprintf( buf, buflen,
"THREADING - Bad input parameters to function" );
665 snprintf( buf, buflen,
"THREADING - Locking / unlocking / free failed with error code" );
668 #if defined(POLARSSL_XTEA_C)
670 snprintf( buf, buflen,
"XTEA - The data input has an invalid length" );
673 if( strlen( buf ) != 0 )
676 snprintf( buf, buflen,
"UNKNOWN ERROR CODE (%04X)", use_ret );
679 #if defined(POLARSSL_ERROR_STRERROR_BC)
680 void error_strerror(
int ret,
char *buf,
size_t buflen )
688 #if defined(POLARSSL_ERROR_STRERROR_DUMMY)
703 #if defined(POLARSSL_ERROR_STRERROR_BC)
704 void error_strerror(
int ret,
char *buf,
size_t buflen )
#define POLARSSL_ERR_PKCS5_INVALID_FORMAT
Unexpected ASN.1 data.
#define POLARSSL_ERR_PKCS12_FEATURE_UNAVAILABLE
Feature not available, e.g.
#define POLARSSL_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED
The entropy source failed.
#define POLARSSL_ERR_PK_INVALID_ALG
The algorithm tag or value is invalid.
#define POLARSSL_ERR_MPI_INVALID_CHARACTER
There is an invalid character in the digit string.
#define POLARSSL_ERR_RSA_OUTPUT_TOO_LARGE
The output buffer for decryption is not large enough.
#define POLARSSL_ERR_CIPHER_BAD_INPUT_DATA
Bad input parameters to function.
#define POLARSSL_ERR_DHM_MAKE_PUBLIC_FAILED
Making of the public value failed.
#define POLARSSL_ERR_SSL_BAD_HS_CHANGE_CIPHER_SPEC
Processing of the ChangeCipherSpec handshake message failed.
#define POLARSSL_ERR_PK_KEY_INVALID_FORMAT
Invalid key tag or value.
#define POLARSSL_ERR_PEM_FEATURE_UNAVAILABLE
Unavailable feature, e.g.
#define POLARSSL_ERR_XTEA_INVALID_INPUT_LENGTH
The data input has an invalid length.
#define POLARSSL_ERR_DHM_MAKE_PARAMS_FAILED
Making of the DHM parameters failed.
Password-Based Key Derivation Function 2 (from PKCS#5) DEPRECATED: use pkcs5.h instead.
void polarssl_strerror(int errnum, char *buffer, size_t buflen)
Error code layout.
#define POLARSSL_ERR_ECP_BAD_INPUT_DATA
Bad input parameters to function.
#define POLARSSL_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE
Processing of the ServerKeyExchange handshake message failed.
#define POLARSSL_ERR_CIPHER_FEATURE_UNAVAILABLE
The selected feature is not available.
#define POLARSSL_ERR_PK_FILE_IO_ERROR
Read/write of file failed.
#define POLARSSL_ERR_DHM_INVALID_FORMAT
The ASN.1 data is not formatted correctly.
#define POLARSSL_ERR_MD_ALLOC_FAILED
Failed to allocate memory.
#define POLARSSL_ERR_NET_BIND_FAILED
Binding of the socket failed.
#define POLARSSL_ERR_NET_RECV_FAILED
Reading information from the socket failed.
#define POLARSSL_ERR_SSL_PK_TYPE_MISMATCH
Public key type mismatch (eg, asked for RSA key exchange and presented EC key)
#define POLARSSL_ERR_NET_WANT_WRITE
Connection requires a write call.
#define POLARSSL_ERR_SSL_BAD_HS_SERVER_HELLO_DONE
Processing of the ServerHelloDone handshake message failed.
#define POLARSSL_ERR_X509_INVALID_DATE
The date tag or value is invalid.
Network communication functions.
#define POLARSSL_ERR_MPI_NEGATIVE_VALUE
The input arguments are negative or result in illegal output.
#define POLARSSL_ERR_SSL_NO_SESSION_FOUND
No session to recover was found.
#define POLARSSL_ERR_CIPHER_ALLOC_FAILED
Failed to allocate memory.
#define POLARSSL_ERR_PEM_UNKNOWN_ENC_ALG
Unsupported key encryption algorithm.
#define POLARSSL_ERR_SSL_CONN_EOF
The connection indicated an EOF.
#define POLARSSL_ERR_ASN1_LENGTH_MISMATCH
Actual length differs from expected length.
#define POLARSSL_ERR_MD_FEATURE_UNAVAILABLE
The selected feature is not available.
#define POLARSSL_ERR_SSL_BAD_HS_SERVER_HELLO
Processing of the ServerHello handshake message failed.
#define POLARSSL_ERR_DHM_CALC_SECRET_FAILED
Calculation of the DHM secret failed.
Elliptic curves over GF(p)
#define POLARSSL_ERR_X509_CERT_UNKNOWN_FORMAT
Format not recognized as DER or PEM.
#define POLARSSL_ERR_SSL_INVALID_RECORD
An invalid SSL record was received.
#define POLARSSL_ERR_DHM_MALLOC_FAILED
Allocation of memory failed.
#define POLARSSL_ERR_GCM_BAD_INPUT
Bad input parameters to function.
#define POLARSSL_ERR_X509_INVALID_FORMAT
The CRT/CRL/CSR format is invalid, e.g.
#define POLARSSL_ERR_ENTROPY_MAX_SOURCES
No more sources can be added.
#define POLARSSL_ERR_ASN1_BUF_TOO_SMALL
Buffer too small when writing ASN.1 data structure.
#define POLARSSL_ERR_PEM_MALLOC_FAILED
Failed to allocate memory.
#define POLARSSL_ERR_PKCS5_FEATURE_UNAVAILABLE
Requested encryption or digest alg not available.
#define POLARSSL_ERR_ECP_MALLOC_FAILED
Memory allocation failed.
#define POLARSSL_ERR_PKCS12_PASSWORD_MISMATCH
Given private key password does not allow for correct decryption.
#define POLARSSL_ERR_SSL_BAD_HS_NEW_SESSION_TICKET
Processing of the NewSessionTicket handshake message failed.
Configuration options (set of defines)
#define POLARSSL_ERR_X509_UNKNOWN_SIG_ALG
Signature algorithm (oid) is unsupported.
#define POLARSSL_ERR_SSL_PEER_CLOSE_NOTIFY
The peer notified us that the connection is going to be closed.
#define POLARSSL_ERR_MD5_FILE_IO_ERROR
Read/write error in file.
#define POLARSSL_ERR_ASN1_INVALID_DATA
Data is invalid.
#define POLARSSL_ERR_MD_FILE_IO_ERROR
Opening or reading of file failed.
#define POLARSSL_ERR_RSA_RNG_FAILED
The random generator failed to generate non-zeros.
#define POLARSSL_ERR_CIPHER_INVALID_PADDING
Input data contains invalid padding and is rejected.
#define POLARSSL_ERR_MPI_BAD_INPUT_DATA
Bad input parameters to function.
#define POLARSSL_ERR_X509_INVALID_SIGNATURE
The signature tag or value invalid.
Entropy accumulator implementation.
#define POLARSSL_ERR_PBKDF2_BAD_INPUT_DATA
Bad input parameters to function.
#define POLARSSL_ERR_SSL_HW_ACCEL_FAILED
Hardware acceleration function returned with error.
#define POLARSSL_ERR_ASN1_INVALID_LENGTH
Error when trying to determine the length or invalid length.
#define POLARSSL_ERR_ECP_FEATURE_UNAVAILABLE
Requested curve not available.
#define POLARSSL_ERR_SSL_INVALID_MAC
Verification of the message MAC failed.
#define POLARSSL_ERR_X509_UNKNOWN_VERSION
CRT/CRL/CSR has an unsupported version number.
#define POLARSSL_ERR_SSL_NO_CLIENT_CERTIFICATE
No client certification received from the client, but required by the authentication mode...
#define POLARSSL_ERR_NET_CONN_RESET
Connection was reset by peer.
#define POLARSSL_ERR_PKCS12_PBE_INVALID_FORMAT
PBE ASN.1 data not as expected.
Object Identifier (OID) database.
Public Key abstraction layer.
#define POLARSSL_ERR_PADLOCK_DATA_MISALIGNED
Input data should be aligned.
Multi-precision integer library.
#define POLARSSL_ERR_PK_BAD_INPUT_DATA
Bad input parameters to function.
#define POLARSSL_ERR_ECP_BUFFER_TOO_SMALL
The buffer is too small to write to.
#define POLARSSL_ERR_SSL_HW_ACCEL_FALLTHROUGH
Hardware acceleration function skipped / left alone data.
#define POLARSSL_ERR_PK_UNKNOWN_NAMED_CURVE
Elliptic curve is unsupported (only NIST curves are supported).
#define POLARSSL_ERR_PK_FEATURE_UNAVAILABLE
Unavailable feature, e.g.
#define POLARSSL_ERR_PKCS5_PASSWORD_MISMATCH
Given private key password does not allow for correct decryption.
Error to string translation.
#define POLARSSL_ERR_SSL_CERTIFICATE_REQUIRED
The own certificate is not set, but needed by the server.
#define POLARSSL_ERR_PEM_PASSWORD_REQUIRED
Private key password can't be empty.
#define POLARSSL_ERR_CTR_DRBG_REQUEST_TOO_BIG
Too many random requested in single call.
#define POLARSSL_ERR_SSL_CERTIFICATE_TOO_LARGE
Our own certificate(s) is/are too large to send in an SSL message.
#define POLARSSL_ERR_ECP_VERIFY_FAILED
The signature is not valid.
#define POLARSSL_ERR_MD_BAD_INPUT_DATA
Bad input parameters to function.
#define POLARSSL_ERR_DHM_READ_PUBLIC_FAILED
Reading of the public values failed.
Threading abstraction layer.
#define POLARSSL_ERR_RSA_INVALID_PADDING
Input data contains invalid padding and is rejected.
#define POLARSSL_ERR_X509_CERT_VERIFY_FAILED
Certificate verification failed, e.g.
#define POLARSSL_ERR_OID_NOT_FOUND
OID is not found.
Privacy Enhanced Mail (PEM) decoding.
#define POLARSSL_ERR_SSL_FATAL_ALERT_MESSAGE
A fatal alert message was received from our peer.
#define POLARSSL_ERR_CAMELLIA_INVALID_INPUT_LENGTH
Invalid data input length.
#define POLARSSL_ERR_BASE64_BUFFER_TOO_SMALL
Output buffer too small.
#define POLARSSL_ERR_MPI_DIVISION_BY_ZERO
The input argument for division is zero, which is not allowed.
#define POLARSSL_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE_CS
Processing of the ClientKeyExchange handshake message failed in DHM / ECDH Calculate Secret...
#define POLARSSL_ERR_PK_PASSWORD_REQUIRED
Private key password can't be empty.
#define POLARSSL_ERR_PK_PASSWORD_MISMATCH
Given private key password does not allow for correct decryption.
#define POLARSSL_ERR_SSL_BAD_HS_PROTOCOL_VERSION
Handshake protocol not within min/max boundaries.
#define POLARSSL_ERR_DHM_READ_PARAMS_FAILED
Reading of the DHM parameters failed.
#define POLARSSL_ERR_X509_UNKNOWN_OID
Requested OID is unknown.
#define POLARSSL_ERR_SSL_UNEXPECTED_MESSAGE
An unexpected message was received from our peer.
#define POLARSSL_ERR_MPI_BUFFER_TOO_SMALL
The buffer is too small to write to.
#define POLARSSL_ERR_SSL_COMPRESSION_FAILED
Processing of the compression / decompression failed.
#define POLARSSL_ERR_SSL_PEER_VERIFY_FAILED
Verification of our peer failed.
XTEA block cipher (32-bit)
#define POLARSSL_ERR_CTR_DRBG_FILE_IO_ERROR
Read/write error in file.
#define POLARSSL_ERR_NET_CONNECT_FAILED
The connection to the given server / port failed.
#define POLARSSL_ERR_AES_INVALID_KEY_LENGTH
Invalid key length.
#define POLARSSL_ERR_SHA256_FILE_IO_ERROR
Read/write error in file.
#define POLARSSL_ERR_PEM_PASSWORD_MISMATCH
Given private key password does not allow for correct decryption.
#define POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED
Decryption of block requires a full block.
#define POLARSSL_ERR_PK_MALLOC_FAILED
Memory alloation failed.
#define POLARSSL_ERR_SSL_CA_CHAIN_REQUIRED
No CA Chain is set, but required to operate.
#define POLARSSL_ERR_THREADING_BAD_INPUT_DATA
Bad input parameters to function.
#define POLARSSL_ERR_SSL_SESSION_TICKET_EXPIRED
Session ticket has expired.
Diffie-Hellman-Merkle key exchange.
#define POLARSSL_ERR_PEM_INVALID_ENC_IV
RSA IV is not in hex-format.
#define POLARSSL_ERR_MD2_FILE_IO_ERROR
Read/write error in file.
#define POLARSSL_ERR_X509_INVALID_ALG
The algorithm tag or value is invalid.
#define POLARSSL_ERR_NET_SEND_FAILED
Sending information through the socket failed.
#define POLARSSL_ERR_NET_WANT_READ
Connection requires a read call.
#define POLARSSL_ERR_ASN1_OUT_OF_DATA
Out of data when parsing an ASN1 data structure.
#define POLARSSL_ERR_RSA_VERIFY_FAILED
The PKCS#1 verification failed.
X.509 generic defines and structures.
#define POLARSSL_ERR_SSL_BAD_HS_CERTIFICATE_REQUEST
Processing of the CertificateRequest handshake message failed.
#define POLARSSL_ERR_ASN1_MALLOC_FAILED
Memory allocation failed.
#define POLARSSL_ERR_SSL_BAD_HS_CLIENT_HELLO
Processing of the ClientHello handshake message failed.
#define POLARSSL_ERR_PEM_INVALID_DATA
PEM string is not as expected.
#define POLARSSL_ERR_X509_FILE_IO_ERROR
Read/write of file failed.
#define POLARSSL_ERR_CTR_DRBG_INPUT_TOO_BIG
Input too large (Entropy + additional).
#define POLARSSL_ERR_GCM_AUTH_FAILED
Authenticated decryption failed.
#define POLARSSL_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE
Processing of the ClientKeyExchange handshake message failed.
#define POLARSSL_ERR_SSL_PRIVATE_KEY_REQUIRED
The own private key or pre-shared key is not set, but needed.
Generic message digest wrapper.
RFC 1521 base64 encoding/decoding.
#define POLARSSL_ERR_NET_ACCEPT_FAILED
Could not accept the incoming connection.
The RSA public-key cryptosystem.
#define POLARSSL_ERR_SSL_UNKNOWN_CIPHER
An unknown cipher was received.
#define POLARSSL_ERR_MPI_MALLOC_FAILED
Memory allocation failed.
#define POLARSSL_ERR_BLOWFISH_INVALID_KEY_LENGTH
Invalid key length.
#define POLARSSL_ERR_RSA_BAD_INPUT_DATA
Bad input parameters to function.
#define POLARSSL_ERR_RSA_PRIVATE_FAILED
The private key operation failed.
#define POLARSSL_ERR_X509_INVALID_NAME
The name tag or value is invalid.
#define POLARSSL_ERR_PK_TYPE_MISMATCH
Type mismatch, eg attempt to encrypt with an ECDSA key.
#define POLARSSL_ERR_ECP_RANDOM_FAILED
Generation of random value, such as (ephemeral) key, failed.
#define POLARSSL_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE_RP
Processing of the ClientKeyExchange handshake message failed in DHM / ECDH Read Public.
#define POLARSSL_ERR_SHA512_FILE_IO_ERROR
Read/write error in file.
#define POLARSSL_ERR_BLOWFISH_INVALID_INPUT_LENGTH
Invalid data input length.
SHA-1 cryptographic hash function.
#define POLARSSL_ERR_RSA_KEY_CHECK_FAILED
Key failed to pass the libraries validity check.
#define POLARSSL_ERR_SSL_BAD_HS_FINISHED
Processing of the Finished handshake message failed.
#define POLARSSL_ERR_DHM_FILE_IO_ERROR
Read/write of file failed.
#define POLARSSL_ERR_ENTROPY_NO_SOURCES_DEFINED
No sources have been added to poll.
#define POLARSSL_ERR_X509_FEATURE_UNAVAILABLE
Unavailable feature, e.g.
Galois/Counter mode for 128-bit block ciphers.
#define POLARSSL_ERR_X509_INVALID_VERSION
The CRT/CRL/CSR version element is invalid.
SHA-384 and SHA-512 cryptographic hash function.
#define POLARSSL_ERR_THREADING_MUTEX_ERROR
Locking / unlocking / free failed with error code.
#define POLARSSL_ERR_SSL_UNKNOWN_IDENTITY
Unkown identity received (eg, PSK identity)
#define POLARSSL_ERR_SSL_MALLOC_FAILED
Memory allocation failed.
#define POLARSSL_ERR_X509_INVALID_EXTENSIONS
The extension tag or value is invalid.
#define POLARSSL_ERR_MPI_FILE_IO_ERROR
An error occurred while reading from or writing to a file.
#define POLARSSL_ERR_DHM_BAD_INPUT_DATA
Bad input parameters to function.
#define POLARSSL_ERR_PKCS5_BAD_INPUT_DATA
Bad input parameters to function.
#define POLARSSL_ERR_X509_BAD_INPUT_DATA
Input invalid.
#define POLARSSL_ERR_RSA_KEY_GEN_FAILED
Something failed during generation of a key.
VIA PadLock ACE for HW encryption/decryption supported by some processors.
#define POLARSSL_ERR_NET_SOCKET_FAILED
Failed to open a socket.
#define POLARSSL_ERR_PEM_NO_HEADER_FOOTER_PRESENT
No PEM header or footer found.
#define POLARSSL_ERR_NET_LISTEN_FAILED
Could not listen on the socket.
#define POLARSSL_ERR_RSA_PUBLIC_FAILED
The public key operation failed.
MD4 message digest algorithm (hash function)
#define POLARSSL_ERR_CAMELLIA_INVALID_KEY_LENGTH
Invalid key length.
#define POLARSSL_ERR_MD4_FILE_IO_ERROR
Read/write error in file.
#define POLARSSL_ERR_ENTROPY_SOURCE_FAILED
Critical entropy source failure.
#define POLARSSL_ERR_PK_KEY_INVALID_VERSION
Unsupported key version.
MD5 message digest algorithm (hash function)
#define POLARSSL_ERR_X509_MALLOC_FAILED
Allocation of memory failed.
#define POLARSSL_ERR_DES_INVALID_INPUT_LENGTH
The data input has an invalid length.
SHA-224 and SHA-256 cryptographic hash function.
#define POLARSSL_ERR_PEM_BAD_INPUT_DATA
Bad input parameters to function.
#define POLARSSL_ERR_X509_INVALID_SERIAL
The serial tag or value is invalid.
#define POLARSSL_ERR_AES_INVALID_INPUT_LENGTH
Invalid data input length.
#define POLARSSL_ERR_SSL_FEATURE_UNAVAILABLE
The requested feature is not available.
#define POLARSSL_ERR_SSL_BAD_HS_CERTIFICATE
Processing of the Certificate handshake message failed.
#define POLARSSL_ERR_THREADING_FEATURE_UNAVAILABLE
The selected feature is not available.
#define POLARSSL_ERR_ECP_INVALID_KEY
Invalid private or public key.
#define POLARSSL_ERR_PK_INVALID_PUBKEY
The pubkey tag or value is invalid (only RSA and EC are supported).
#define POLARSSL_ERR_PKCS12_BAD_INPUT_DATA
Bad input parameters to function.
MD2 message digest algorithm (hash function)
#define POLARSSL_ERR_SSL_BAD_INPUT_DATA
Bad input parameters to function.
#define POLARSSL_ERR_ASN1_UNEXPECTED_TAG
ASN1 tag was of an unexpected value.
#define POLARSSL_ERR_BASE64_INVALID_CHARACTER
Invalid character in input.
#define POLARSSL_ERR_CIPHER_AUTH_FAILED
Authentication failed (for AEAD modes).
#define POLARSSL_ERR_PK_UNKNOWN_PK_ALG
Key algorithm is unsupported (only RSA and EC are supported).
#define POLARSSL_ERR_MPI_NOT_ACCEPTABLE
The input arguments are not acceptable.
PKCS#12 Personal Information Exchange Syntax.
#define POLARSSL_ERR_X509_SIG_MISMATCH
Signature algorithms do not match.
#define POLARSSL_ERR_SSL_BAD_HS_CERTIFICATE_VERIFY
Processing of the CertificateVerify handshake message failed.
CTR_DRBG based on AES-256 (NIST SP 800-90)
#define POLARSSL_ERR_SSL_NO_CIPHER_CHOSEN
The server has no ciphersuites in common with the client.
#define POLARSSL_ERR_SHA1_FILE_IO_ERROR
Read/write error in file.
#define POLARSSL_ERR_NET_UNKNOWN_HOST
Failed to get an IP address for the given hostname.