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 && !defined(EFIX64) && \
165 #define snprintf _snprintf
176 memset( buf, 0x00, buflen );
185 use_ret = ret & 0xFF80;
189 #if defined(POLARSSL_CIPHER_C)
191 snprintf( buf, buflen,
"CIPHER - The selected feature is not available" );
193 snprintf( buf, buflen,
"CIPHER - Bad input parameters to function" );
195 snprintf( buf, buflen,
"CIPHER - Failed to allocate memory" );
197 snprintf( buf, buflen,
"CIPHER - Input data contains invalid padding and is rejected" );
199 snprintf( buf, buflen,
"CIPHER - Decryption of block requires a full block" );
201 snprintf( buf, buflen,
"CIPHER - Authentication failed (for AEAD modes)" );
204 #if defined(POLARSSL_DHM_C)
206 snprintf( buf, buflen,
"DHM - Bad input parameters to function" );
208 snprintf( buf, buflen,
"DHM - Reading of the DHM parameters failed" );
210 snprintf( buf, buflen,
"DHM - Making of the DHM parameters failed" );
212 snprintf( buf, buflen,
"DHM - Reading of the public values failed" );
214 snprintf( buf, buflen,
"DHM - Making of the public value failed" );
216 snprintf( buf, buflen,
"DHM - Calculation of the DHM secret failed" );
218 snprintf( buf, buflen,
"DHM - The ASN.1 data is not formatted correctly" );
220 snprintf( buf, buflen,
"DHM - Allocation of memory failed" );
222 snprintf( buf, buflen,
"DHM - Read/write of file failed" );
225 #if defined(POLARSSL_ECP_C)
227 snprintf( buf, buflen,
"ECP - Bad input parameters to function" );
229 snprintf( buf, buflen,
"ECP - The buffer is too small to write to" );
231 snprintf( buf, buflen,
"ECP - Requested curve not available" );
233 snprintf( buf, buflen,
"ECP - The signature is not valid" );
235 snprintf( buf, buflen,
"ECP - Memory allocation failed" );
237 snprintf( buf, buflen,
"ECP - Generation of random value, such as (ephemeral) key, failed" );
239 snprintf( buf, buflen,
"ECP - Invalid private or public key" );
242 #if defined(POLARSSL_MD_C)
244 snprintf( buf, buflen,
"MD - The selected feature is not available" );
246 snprintf( buf, buflen,
"MD - Bad input parameters to function" );
248 snprintf( buf, buflen,
"MD - Failed to allocate memory" );
250 snprintf( buf, buflen,
"MD - Opening or reading of file failed" );
253 #if defined(POLARSSL_PEM_PARSE_C) || defined(POLARSSL_PEM_WRITE_C)
255 snprintf( buf, buflen,
"PEM - No PEM header or footer found" );
257 snprintf( buf, buflen,
"PEM - PEM string is not as expected" );
259 snprintf( buf, buflen,
"PEM - Failed to allocate memory" );
261 snprintf( buf, buflen,
"PEM - RSA IV is not in hex-format" );
263 snprintf( buf, buflen,
"PEM - Unsupported key encryption algorithm" );
265 snprintf( buf, buflen,
"PEM - Private key password can't be empty" );
267 snprintf( buf, buflen,
"PEM - Given private key password does not allow for correct decryption" );
269 snprintf( buf, buflen,
"PEM - Unavailable feature, e.g. hashing/encryption combination" );
271 snprintf( buf, buflen,
"PEM - Bad input parameters to function" );
274 #if defined(POLARSSL_PK_C)
276 snprintf( buf, buflen,
"PK - Memory alloation failed" );
278 snprintf( buf, buflen,
"PK - Type mismatch, eg attempt to encrypt with an ECDSA key" );
280 snprintf( buf, buflen,
"PK - Bad input parameters to function" );
282 snprintf( buf, buflen,
"PK - Read/write of file failed" );
284 snprintf( buf, buflen,
"PK - Unsupported key version" );
286 snprintf( buf, buflen,
"PK - Invalid key tag or value" );
288 snprintf( buf, buflen,
"PK - Key algorithm is unsupported (only RSA and EC are supported)" );
290 snprintf( buf, buflen,
"PK - Private key password can't be empty" );
292 snprintf( buf, buflen,
"PK - Given private key password does not allow for correct decryption" );
294 snprintf( buf, buflen,
"PK - The pubkey tag or value is invalid (only RSA and EC are supported)" );
296 snprintf( buf, buflen,
"PK - The algorithm tag or value is invalid" );
298 snprintf( buf, buflen,
"PK - Elliptic curve is unsupported (only NIST curves are supported)" );
300 snprintf( buf, buflen,
"PK - Unavailable feature, e.g. RSA disabled for RSA key" );
303 #if defined(POLARSSL_PKCS12_C)
305 snprintf( buf, buflen,
"PKCS12 - Bad input parameters to function" );
307 snprintf( buf, buflen,
"PKCS12 - Feature not available, e.g. unsupported encryption scheme" );
309 snprintf( buf, buflen,
"PKCS12 - PBE ASN.1 data not as expected" );
311 snprintf( buf, buflen,
"PKCS12 - Given private key password does not allow for correct decryption" );
314 #if defined(POLARSSL_PKCS5_C)
316 snprintf( buf, buflen,
"PKCS5 - Bad input parameters to function" );
318 snprintf( buf, buflen,
"PKCS5 - Unexpected ASN.1 data" );
320 snprintf( buf, buflen,
"PKCS5 - Requested encryption or digest alg not available" );
322 snprintf( buf, buflen,
"PKCS5 - Given private key password does not allow for correct decryption" );
325 #if defined(POLARSSL_RSA_C)
327 snprintf( buf, buflen,
"RSA - Bad input parameters to function" );
329 snprintf( buf, buflen,
"RSA - Input data contains invalid padding and is rejected" );
331 snprintf( buf, buflen,
"RSA - Something failed during generation of a key" );
333 snprintf( buf, buflen,
"RSA - Key failed to pass the libraries validity check" );
335 snprintf( buf, buflen,
"RSA - The public key operation failed" );
337 snprintf( buf, buflen,
"RSA - The private key operation failed" );
339 snprintf( buf, buflen,
"RSA - The PKCS#1 verification failed" );
341 snprintf( buf, buflen,
"RSA - The output buffer for decryption is not large enough" );
343 snprintf( buf, buflen,
"RSA - The random generator failed to generate non-zeros" );
346 #if defined(POLARSSL_SSL_TLS_C)
348 snprintf( buf, buflen,
"SSL - The requested feature is not available" );
350 snprintf( buf, buflen,
"SSL - Bad input parameters to function" );
352 snprintf( buf, buflen,
"SSL - Verification of the message MAC failed" );
354 snprintf( buf, buflen,
"SSL - An invalid SSL record was received" );
356 snprintf( buf, buflen,
"SSL - The connection indicated an EOF" );
358 snprintf( buf, buflen,
"SSL - An unknown cipher was received" );
360 snprintf( buf, buflen,
"SSL - The server has no ciphersuites in common with the client" );
362 snprintf( buf, buflen,
"SSL - No RNG was provided to the SSL module" );
364 snprintf( buf, buflen,
"SSL - No client certification received from the client, but required by the authentication mode" );
366 snprintf( buf, buflen,
"SSL - DESCRIPTION MISSING" );
368 snprintf( buf, buflen,
"SSL - The own certificate is not set, but needed by the server" );
370 snprintf( buf, buflen,
"SSL - The own private key or pre-shared key is not set, but needed" );
372 snprintf( buf, buflen,
"SSL - No CA Chain is set, but required to operate" );
374 snprintf( buf, buflen,
"SSL - An unexpected message was received from our peer" );
377 snprintf( buf, buflen,
"SSL - A fatal alert message was received from our peer" );
381 snprintf( buf, buflen,
"SSL - Verification of our peer failed" );
383 snprintf( buf, buflen,
"SSL - The peer notified us that the connection is going to be closed" );
385 snprintf( buf, buflen,
"SSL - Processing of the ClientHello handshake message failed" );
387 snprintf( buf, buflen,
"SSL - Processing of the ServerHello handshake message failed" );
389 snprintf( buf, buflen,
"SSL - Processing of the Certificate handshake message failed" );
391 snprintf( buf, buflen,
"SSL - Processing of the CertificateRequest handshake message failed" );
393 snprintf( buf, buflen,
"SSL - Processing of the ServerKeyExchange handshake message failed" );
395 snprintf( buf, buflen,
"SSL - Processing of the ServerHelloDone handshake message failed" );
397 snprintf( buf, buflen,
"SSL - Processing of the ClientKeyExchange handshake message failed" );
399 snprintf( buf, buflen,
"SSL - Processing of the ClientKeyExchange handshake message failed in DHM / ECDH Read Public" );
401 snprintf( buf, buflen,
"SSL - Processing of the ClientKeyExchange handshake message failed in DHM / ECDH Calculate Secret" );
403 snprintf( buf, buflen,
"SSL - Processing of the CertificateVerify handshake message failed" );
405 snprintf( buf, buflen,
"SSL - Processing of the ChangeCipherSpec handshake message failed" );
407 snprintf( buf, buflen,
"SSL - Processing of the Finished handshake message failed" );
409 snprintf( buf, buflen,
"SSL - Memory allocation failed" );
411 snprintf( buf, buflen,
"SSL - Hardware acceleration function returned with error" );
413 snprintf( buf, buflen,
"SSL - Hardware acceleration function skipped / left alone data" );
415 snprintf( buf, buflen,
"SSL - Processing of the compression / decompression failed" );
417 snprintf( buf, buflen,
"SSL - Handshake protocol not within min/max boundaries" );
419 snprintf( buf, buflen,
"SSL - Processing of the NewSessionTicket handshake message failed" );
421 snprintf( buf, buflen,
"SSL - Session ticket has expired" );
423 snprintf( buf, buflen,
"SSL - Public key type mismatch (eg, asked for RSA key exchange and presented EC key)" );
425 snprintf( buf, buflen,
"SSL - Unkown identity received (eg, PSK identity)" );
427 snprintf( buf, buflen,
"SSL - Internal error (eg, unexpected failure in lower-level module)" );
430 #if defined(POLARSSL_X509_USE_C) || defined(POLARSSL_X509_CREATE_C)
432 snprintf( buf, buflen,
"X509 - Unavailable feature, e.g. RSA hashing/encryption combination" );
434 snprintf( buf, buflen,
"X509 - Requested OID is unknown" );
436 snprintf( buf, buflen,
"X509 - The CRT/CRL/CSR format is invalid, e.g. different type expected" );
438 snprintf( buf, buflen,
"X509 - The CRT/CRL/CSR version element is invalid" );
440 snprintf( buf, buflen,
"X509 - The serial tag or value is invalid" );
442 snprintf( buf, buflen,
"X509 - The algorithm tag or value is invalid" );
444 snprintf( buf, buflen,
"X509 - The name tag or value is invalid" );
446 snprintf( buf, buflen,
"X509 - The date tag or value is invalid" );
448 snprintf( buf, buflen,
"X509 - The signature tag or value invalid" );
450 snprintf( buf, buflen,
"X509 - The extension tag or value is invalid" );
452 snprintf( buf, buflen,
"X509 - CRT/CRL/CSR has an unsupported version number" );
454 snprintf( buf, buflen,
"X509 - Signature algorithm (oid) is unsupported" );
456 snprintf( buf, buflen,
"X509 - Signature algorithms do not match. (see \\c ::x509_crt sig_oid)" );
458 snprintf( buf, buflen,
"X509 - Certificate verification failed, e.g. CRL, CA or signature check failed" );
460 snprintf( buf, buflen,
"X509 - Format not recognized as DER or PEM" );
462 snprintf( buf, buflen,
"X509 - Input invalid" );
464 snprintf( buf, buflen,
"X509 - Allocation of memory failed" );
466 snprintf( buf, buflen,
"X509 - Read/write of file failed" );
469 if( strlen( buf ) == 0 )
470 snprintf( buf, buflen,
"UNKNOWN ERROR CODE (%04X)", use_ret );
473 use_ret = ret & ~0xFF80;
485 if( buflen - len < 5 )
488 snprintf( buf + len, buflen - len,
" : " );
496 #if defined(POLARSSL_AES_C)
498 snprintf( buf, buflen,
"AES - Invalid key length" );
500 snprintf( buf, buflen,
"AES - Invalid data input length" );
503 #if defined(POLARSSL_ASN1_PARSE_C)
505 snprintf( buf, buflen,
"ASN1 - Out of data when parsing an ASN1 data structure" );
507 snprintf( buf, buflen,
"ASN1 - ASN1 tag was of an unexpected value" );
509 snprintf( buf, buflen,
"ASN1 - Error when trying to determine the length or invalid length" );
511 snprintf( buf, buflen,
"ASN1 - Actual length differs from expected length" );
513 snprintf( buf, buflen,
"ASN1 - Data is invalid. (not used)" );
515 snprintf( buf, buflen,
"ASN1 - Memory allocation failed" );
517 snprintf( buf, buflen,
"ASN1 - Buffer too small when writing ASN.1 data structure" );
520 #if defined(POLARSSL_BASE64_C)
522 snprintf( buf, buflen,
"BASE64 - Output buffer too small" );
524 snprintf( buf, buflen,
"BASE64 - Invalid character in input" );
527 #if defined(POLARSSL_BIGNUM_C)
529 snprintf( buf, buflen,
"BIGNUM - An error occurred while reading from or writing to a file" );
531 snprintf( buf, buflen,
"BIGNUM - Bad input parameters to function" );
533 snprintf( buf, buflen,
"BIGNUM - There is an invalid character in the digit string" );
535 snprintf( buf, buflen,
"BIGNUM - The buffer is too small to write to" );
537 snprintf( buf, buflen,
"BIGNUM - The input arguments are negative or result in illegal output" );
539 snprintf( buf, buflen,
"BIGNUM - The input argument for division is zero, which is not allowed" );
541 snprintf( buf, buflen,
"BIGNUM - The input arguments are not acceptable" );
543 snprintf( buf, buflen,
"BIGNUM - Memory allocation failed" );
546 #if defined(POLARSSL_BLOWFISH_C)
548 snprintf( buf, buflen,
"BLOWFISH - Invalid key length" );
550 snprintf( buf, buflen,
"BLOWFISH - Invalid data input length" );
553 #if defined(POLARSSL_CAMELLIA_C)
555 snprintf( buf, buflen,
"CAMELLIA - Invalid key length" );
557 snprintf( buf, buflen,
"CAMELLIA - Invalid data input length" );
560 #if defined(POLARSSL_CTR_DRBG_C)
562 snprintf( buf, buflen,
"CTR_DRBG - The entropy source failed" );
564 snprintf( buf, buflen,
"CTR_DRBG - Too many random requested in single call" );
566 snprintf( buf, buflen,
"CTR_DRBG - Input too large (Entropy + additional)" );
568 snprintf( buf, buflen,
"CTR_DRBG - Read/write error in file" );
571 #if defined(POLARSSL_DES_C)
573 snprintf( buf, buflen,
"DES - The data input has an invalid length" );
576 #if defined(POLARSSL_ENTROPY_C)
578 snprintf( buf, buflen,
"ENTROPY - Critical entropy source failure" );
580 snprintf( buf, buflen,
"ENTROPY - No more sources can be added" );
582 snprintf( buf, buflen,
"ENTROPY - No sources have been added to poll" );
585 #if defined(POLARSSL_GCM_C)
587 snprintf( buf, buflen,
"GCM - Authenticated decryption failed" );
589 snprintf( buf, buflen,
"GCM - Bad input parameters to function" );
592 #if defined(POLARSSL_MD2_C)
594 snprintf( buf, buflen,
"MD2 - Read/write error in file" );
597 #if defined(POLARSSL_MD4_C)
599 snprintf( buf, buflen,
"MD4 - Read/write error in file" );
602 #if defined(POLARSSL_MD5_C)
604 snprintf( buf, buflen,
"MD5 - Read/write error in file" );
607 #if defined(POLARSSL_NET_C)
609 snprintf( buf, buflen,
"NET - Failed to get an IP address for the given hostname" );
611 snprintf( buf, buflen,
"NET - Failed to open a socket" );
613 snprintf( buf, buflen,
"NET - The connection to the given server / port failed" );
615 snprintf( buf, buflen,
"NET - Binding of the socket failed" );
617 snprintf( buf, buflen,
"NET - Could not listen on the socket" );
619 snprintf( buf, buflen,
"NET - Could not accept the incoming connection" );
621 snprintf( buf, buflen,
"NET - Reading information from the socket failed" );
623 snprintf( buf, buflen,
"NET - Sending information through the socket failed" );
625 snprintf( buf, buflen,
"NET - Connection was reset by peer" );
627 snprintf( buf, buflen,
"NET - Connection requires a read call" );
629 snprintf( buf, buflen,
"NET - Connection requires a write call" );
632 #if defined(POLARSSL_OID_C)
634 snprintf( buf, buflen,
"OID - OID is not found" );
637 #if defined(POLARSSL_PADLOCK_C)
639 snprintf( buf, buflen,
"PADLOCK - Input data should be aligned" );
642 #if defined(POLARSSL_PBKDF2_C)
644 snprintf( buf, buflen,
"PBKDF2 - Bad input parameters to function" );
647 #if defined(POLARSSL_SHA1_C)
649 snprintf( buf, buflen,
"SHA1 - Read/write error in file" );
652 #if defined(POLARSSL_SHA256_C)
654 snprintf( buf, buflen,
"SHA256 - Read/write error in file" );
657 #if defined(POLARSSL_SHA512_C)
659 snprintf( buf, buflen,
"SHA512 - Read/write error in file" );
662 #if defined(POLARSSL_THREADING_C)
664 snprintf( buf, buflen,
"THREADING - The selected feature is not available" );
666 snprintf( buf, buflen,
"THREADING - Bad input parameters to function" );
668 snprintf( buf, buflen,
"THREADING - Locking / unlocking / free failed with error code" );
671 #if defined(POLARSSL_XTEA_C)
673 snprintf( buf, buflen,
"XTEA - The data input has an invalid length" );
676 if( strlen( buf ) != 0 )
679 snprintf( buf, buflen,
"UNKNOWN ERROR CODE (%04X)", use_ret );
682 #if defined(POLARSSL_ERROR_STRERROR_BC)
683 void error_strerror(
int ret,
char *buf,
size_t buflen )
691 #if defined(POLARSSL_ERROR_STRERROR_DUMMY)
706 #if defined(POLARSSL_ERROR_STRERROR_BC)
707 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_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_SSL_NO_RNG
No RNG was provided to the SSL module.
#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_SSL_INTERNAL_ERROR
Internal error (eg, unexpected failure in lower-level module)
#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.