mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-03-24 05:01:11 +01:00
Improve Changelog and correct alg selection
Improve the description of the API changes in the changelog and fix some incorrect alg selection variables in ssl_server2.c. Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
This commit is contained in:
@@ -1,2 +1,5 @@
|
||||
API changes
|
||||
* Convert the mbedtl_ssl_ticket_setup function to use the TF_PSA_Crypto API.
|
||||
* Align the mbedtls_ssl_ticket_setup() function with the PSA Crypto API.
|
||||
Instead of taking a mbedtls_cipher_type_t as an argument, this function now takes 3
|
||||
new arguments: a PSA algorithm, key type and key size, to specify the AEAD for ticket
|
||||
protection.
|
||||
|
||||
@@ -1476,7 +1476,7 @@ static int dummy_ticket_parse(void *p_ticket, mbedtls_ssl_session *session,
|
||||
|
||||
static int parse_cipher(char *buf)
|
||||
{
|
||||
int rc = 0;
|
||||
int ret = 0;
|
||||
if (strcmp(buf, "AES-128-CCM")) {
|
||||
opt.ticket_alg = PSA_ALG_CCM;
|
||||
opt.ticket_key_type = PSA_KEY_TYPE_AES;
|
||||
@@ -1490,13 +1490,13 @@ static int parse_cipher(char *buf)
|
||||
opt.ticket_key_type = PSA_KEY_TYPE_AES;
|
||||
opt.ticket_key_bits = 192;
|
||||
} else if (strcmp(buf, "AES-192-GCM")) {
|
||||
opt.ticket_alg = PSA_ALG_CCM;
|
||||
opt.ticket_alg = PSA_ALG_GCM;
|
||||
opt.ticket_key_type = PSA_KEY_TYPE_AES;
|
||||
opt.ticket_key_bits = 192;
|
||||
} else if (strcmp(buf, "AES-256-CCM")) {
|
||||
opt.ticket_alg = PSA_ALG_CCM;
|
||||
opt.ticket_key_type = PSA_KEY_TYPE_AES;
|
||||
opt.ticket_key_bits = 128;
|
||||
opt.ticket_key_bits = 256;
|
||||
} else if (strcmp(buf, "ARIA-128-CCM")) {
|
||||
opt.ticket_alg = PSA_ALG_CCM;
|
||||
opt.ticket_key_type = PSA_KEY_TYPE_ARIA;
|
||||
@@ -1510,7 +1510,7 @@ static int parse_cipher(char *buf)
|
||||
opt.ticket_key_type = PSA_KEY_TYPE_ARIA;
|
||||
opt.ticket_key_bits = 192;
|
||||
} else if (strcmp(buf, "ARIA-192-GCM")) {
|
||||
opt.ticket_alg = PSA_ALG_CCM;
|
||||
opt.ticket_alg = PSA_ALG_GCM;
|
||||
opt.ticket_key_type = PSA_KEY_TYPE_ARIA;
|
||||
opt.ticket_key_bits = 192;
|
||||
} else if (strcmp(buf, "ARIA-256-CCM")) {
|
||||
@@ -1538,9 +1538,9 @@ static int parse_cipher(char *buf)
|
||||
opt.ticket_key_type = PSA_KEY_TYPE_CHACHA20;
|
||||
opt.ticket_key_bits = 256;
|
||||
} else {
|
||||
rc = -1;
|
||||
ret = -1;
|
||||
}
|
||||
return rc;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
||||
Reference in New Issue
Block a user