mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-30 19:25:59 +01:00
- A error_strerror function() has been added to translate between error codes and their description.
- The error codes have been remapped and combining error codes is now done with a PLUS instead of an OR as error codes used are negative. - Descriptions to all error codes have been added. - Generation script for error.c has been created to automatically generate error.c from the available error definitions in the headers.
This commit is contained in:
parent
91b4159834
commit
9d781407bc
33 changed files with 1031 additions and 285 deletions
24
tests/suites/test_suite_error.data
Normal file
24
tests/suites/test_suite_error.data
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
Single low error
|
||||
depends_on:POLARSSL_ERROR_C:POLARSSL_AES_C
|
||||
error_strerror:-0x0020:"AES - Invalid key length"
|
||||
|
||||
Single high error
|
||||
depends_on:POLARSSL_ERROR_C:POLARSSL_RSA_C
|
||||
error_strerror:-0x4080:"RSA - Bad input parameters to function"
|
||||
|
||||
Low and high error
|
||||
depends_on:POLARSSL_ERROR_C:POLARSSL_AES_C:POLARSSL_RSA_C
|
||||
error_strerror:-0x40A0:"RSA - Bad input parameters to function \: AES - Invalid key length"
|
||||
|
||||
Non existing high error
|
||||
depends_on:POLARSSL_ERROR_C
|
||||
error_strerror:-0x8880:"UNKNOWN ERROR CODE (8880)"
|
||||
|
||||
Non existing low error
|
||||
depends_on:POLARSSL_ERROR_C
|
||||
error_strerror:-0x0001:"UNKNOWN ERROR CODE (0001)"
|
||||
|
||||
Non existing low and high error
|
||||
depends_on:POLARSSL_ERROR_C
|
||||
error_strerror:-0x8881:"UNKNOWN ERROR CODE (8880) \: UNKNOWN ERROR CODE (0001)"
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue