diff options
| author | Scott Larson <[email protected]> | 2020-10-09 12:34:01 -0700 |
|---|---|---|
| committer | Scott Larson <[email protected]> | 2020-10-09 12:34:01 -0700 |
| commit | c61953bcd21bb3d5e233168eb16441eba7ba9afd (patch) | |
| tree | b16b9703449153d4133939362741b83c112784d8 /nx_secure/src | |
| parent | fbd7df3e7e1e40086d153166f035c1db5d8751be (diff) | |
6.1 Release
Diffstat (limited to 'nx_secure/src')
289 files changed, 1418 insertions, 704 deletions
diff --git a/nx_secure/src/nx_secure_crypto_method_self_test_3des.c b/nx_secure/src/nx_secure_crypto_method_self_test_3des.c index 7508fdc9..c240be67 100644 --- a/nx_secure/src/nx_secure_crypto_method_self_test_3des.c +++ b/nx_secure/src/nx_secure_crypto_method_self_test_3des.c @@ -71,7 +71,7 @@ static UCHAR output[INPUT_OUTPUT_LENGTH]; /* FUNCTION RELEASE */ /* */ /* nx_secure_crypto_method_self_test_3des PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -102,6 +102,8 @@ static UCHAR output[INPUT_OUTPUT_LENGTH]; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_crypto_method_self_test_3des(NX_CRYPTO_METHOD *crypto_method_3des, diff --git a/nx_secure/src/nx_secure_crypto_method_self_test_aes.c b/nx_secure/src/nx_secure_crypto_method_self_test_aes.c index c988ee7d..cb23c955 100644 --- a/nx_secure/src/nx_secure_crypto_method_self_test_aes.c +++ b/nx_secure/src/nx_secure_crypto_method_self_test_aes.c @@ -190,7 +190,7 @@ static UCHAR output[INPUT_OUTPUT_LENGTH * 2]; /* FUNCTION RELEASE */ /* */ /* nx_secure_crypto_method_self_test_aes PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -221,6 +221,8 @@ static UCHAR output[INPUT_OUTPUT_LENGTH * 2]; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_crypto_method_self_test_aes(NX_CRYPTO_METHOD *crypto_method_aes, diff --git a/nx_secure/src/nx_secure_crypto_method_self_test_des.c b/nx_secure/src/nx_secure_crypto_method_self_test_des.c index ede24a70..7c33d66e 100644 --- a/nx_secure/src/nx_secure_crypto_method_self_test_des.c +++ b/nx_secure/src/nx_secure_crypto_method_self_test_des.c @@ -68,7 +68,7 @@ static UCHAR output[INPUT_OUTPUT_LENGTH]; /* FUNCTION RELEASE */ /* */ /* nx_secure_crypto_method_self_test_des PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -99,6 +99,8 @@ static UCHAR output[INPUT_OUTPUT_LENGTH]; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_crypto_method_self_test_des(NX_CRYPTO_METHOD *crypto_method_des, diff --git a/nx_secure/src/nx_secure_crypto_method_self_test_hmac_md5.c b/nx_secure/src/nx_secure_crypto_method_self_test_hmac_md5.c index ad6d50e9..66d442a6 100644 --- a/nx_secure/src/nx_secure_crypto_method_self_test_hmac_md5.c +++ b/nx_secure/src/nx_secure_crypto_method_self_test_hmac_md5.c @@ -57,7 +57,7 @@ static ULONG output[4]; /* FUNCTION RELEASE */ /* */ /* nx_secure_crypto_method_self_test_hmac_md5 PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -89,6 +89,8 @@ static ULONG output[4]; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_crypto_method_self_test_hmac_md5(NX_CRYPTO_METHOD *crypto_method_hmac_md5, diff --git a/nx_secure/src/nx_secure_crypto_method_self_test_hmac_sha.c b/nx_secure/src/nx_secure_crypto_method_self_test_hmac_sha.c index ad7f8995..75b50e6f 100644 --- a/nx_secure/src/nx_secure_crypto_method_self_test_hmac_sha.c +++ b/nx_secure/src/nx_secure_crypto_method_self_test_hmac_sha.c @@ -139,7 +139,7 @@ static ULONG output[16]; /* FUNCTION RELEASE */ /* */ /* nx_secure_crypto_method_self_test_hmac_sha PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -171,6 +171,8 @@ static ULONG output[16]; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_crypto_method_self_test_hmac_sha(NX_CRYPTO_METHOD *crypto_method_hmac_sha, diff --git a/nx_secure/src/nx_secure_crypto_method_self_test_md5.c b/nx_secure/src/nx_secure_crypto_method_self_test_md5.c index 142ffd21..a2a568da 100644 --- a/nx_secure/src/nx_secure_crypto_method_self_test_md5.c +++ b/nx_secure/src/nx_secure_crypto_method_self_test_md5.c @@ -57,7 +57,7 @@ static ULONG output[4]; /* FUNCTION RELEASE */ /* */ /* nx_secure_crypto_method_self_test_md5 PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -88,6 +88,8 @@ static ULONG output[4]; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_crypto_method_self_test_md5(NX_CRYPTO_METHOD *crypto_method_md5, diff --git a/nx_secure/src/nx_secure_crypto_method_self_test_prf.c b/nx_secure/src/nx_secure_crypto_method_self_test_prf.c index f8ca2a6f..8eead463 100644 --- a/nx_secure/src/nx_secure_crypto_method_self_test_prf.c +++ b/nx_secure/src/nx_secure_crypto_method_self_test_prf.c @@ -64,7 +64,7 @@ static UCHAR output[256]; /* FUNCTION RELEASE */ /* */ /* nx_secure_crypto_method_self_test_prf PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -95,6 +95,8 @@ static UCHAR output[256]; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_crypto_method_self_test_prf(NX_CRYPTO_METHOD *crypto_method_prf, diff --git a/nx_secure/src/nx_secure_crypto_method_self_test_rsa.c b/nx_secure/src/nx_secure_crypto_method_self_test_rsa.c index fbc50127..ad55b9e1 100644 --- a/nx_secure/src/nx_secure_crypto_method_self_test_rsa.c +++ b/nx_secure/src/nx_secure_crypto_method_self_test_rsa.c @@ -412,7 +412,7 @@ static UCHAR output[512]; /* FUNCTION RELEASE */ /* */ /* nx_secure_crypto_method_self_test_rsa PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -443,6 +443,8 @@ static UCHAR output[512]; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_crypto_method_self_test_rsa(NX_CRYPTO_METHOD *crypto_method, diff --git a/nx_secure/src/nx_secure_crypto_method_self_test_sha.c b/nx_secure/src/nx_secure_crypto_method_self_test_sha.c index 18197ab7..fd33efa8 100644 --- a/nx_secure/src/nx_secure_crypto_method_self_test_sha.c +++ b/nx_secure/src/nx_secure_crypto_method_self_test_sha.c @@ -139,7 +139,7 @@ static ULONG output[16]; /* FUNCTION RELEASE */ /* */ /* nx_secure_crypto_method_self_test_sha PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -170,6 +170,8 @@ static ULONG output[16]; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_crypto_method_self_test_sha(NX_CRYPTO_METHOD *crypto_method_sha, diff --git a/nx_secure/src/nx_secure_crypto_rng_self_test.c b/nx_secure/src/nx_secure_crypto_rng_self_test.c index 2374b1b9..b7808e8b 100644 --- a/nx_secure/src/nx_secure_crypto_rng_self_test.c +++ b/nx_secure/src/nx_secure_crypto_rng_self_test.c @@ -38,7 +38,7 @@ UINT _nx_secure_crypto_rng_self_test(); /* FUNCTION RELEASE */ /* */ /* _nx_secure_crypto_rng_self_test PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -69,6 +69,8 @@ UINT _nx_secure_crypto_rng_self_test(); /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_crypto_rng_self_test() diff --git a/nx_secure/src/nx_secure_crypto_table_self_test.c b/nx_secure/src/nx_secure_crypto_table_self_test.c index 385d2db4..4ec3c3d7 100644 --- a/nx_secure/src/nx_secure_crypto_table_self_test.c +++ b/nx_secure/src/nx_secure_crypto_table_self_test.c @@ -67,7 +67,7 @@ UINT _nx_secure_crypto_method_self_test(const NX_CRYPTO_METHOD *crypto_method, /* FUNCTION RELEASE */ /* */ /* _nx_secure_crypto_table_self_test PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -103,6 +103,8 @@ UINT _nx_secure_crypto_method_self_test(const NX_CRYPTO_METHOD *crypto_method, /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_crypto_table_self_test(const NX_SECURE_TLS_CRYPTO *crypto_table, diff --git a/nx_secure/src/nx_secure_dtls_allocate_handshake_packet.c b/nx_secure/src/nx_secure_dtls_allocate_handshake_packet.c index e512b8e2..727d8682 100644 --- a/nx_secure/src/nx_secure_dtls_allocate_handshake_packet.c +++ b/nx_secure/src/nx_secure_dtls_allocate_handshake_packet.c @@ -31,7 +31,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_allocate_handshake_packet PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -70,6 +70,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_allocate_handshake_packet(NX_SECURE_DTLS_SESSION *dtls_session, diff --git a/nx_secure/src/nx_secure_dtls_client_handshake.c b/nx_secure/src/nx_secure_dtls_client_handshake.c index c6250173..a6ad765e 100644 --- a/nx_secure/src/nx_secure_dtls_client_handshake.c +++ b/nx_secure/src/nx_secure_dtls_client_handshake.c @@ -32,7 +32,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_client_handshake PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -103,9 +103,13 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), and */ -/* supported chained packet, */ -/* resulting in version 6.0.2 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* verified memmove use cases, */ +/* released packet securely, */ +/* fixed certificate buffer */ +/* allocation, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_client_handshake(NX_SECURE_DTLS_SESSION *dtls_session, UCHAR *packet_buffer, @@ -166,7 +170,8 @@ NX_SECURE_TLS_SESSION *tls_session; } /* Check available area of buffer. */ - if ((fragment_offset + fragment_length) > tls_session -> nx_secure_tls_packet_buffer_size) + if ((fragment_offset + fragment_length) > tls_session -> nx_secure_tls_packet_buffer_size || + (header_bytes + message_length) > tls_session -> nx_secure_tls_packet_buffer_size) { return(NX_SECURE_TLS_PACKET_BUFFER_TOO_SMALL); } @@ -184,7 +189,7 @@ NX_SECURE_TLS_SESSION *tls_session; dtls_session -> nx_secure_dtls_fragment_length -= fragment_length; /* Copy the fragment data (minus the header) into the reassembly buffer. */ - NX_SECURE_MEMCPY(&fragment_buffer[fragment_offset], &packet_buffer[header_bytes], fragment_length); + NX_SECURE_MEMCPY(&fragment_buffer[fragment_offset], &packet_buffer[header_bytes], fragment_length); /* Use case of memcpy is verified. */ /* If we still have fragments to add, just return success. */ if (dtls_session -> nx_secure_dtls_fragment_length > 0) @@ -211,7 +216,7 @@ NX_SECURE_TLS_SESSION *tls_session; /* Put the header into the packet buffer, adjusting the fields to create a seam-less * DTLS record. */ - NX_SECURE_MEMMOVE(&fragment_buffer[header_bytes], fragment_buffer, message_length); + NX_SECURE_MEMMOVE(&fragment_buffer[header_bytes], fragment_buffer, message_length); /* Use case of memmove is verified. */ /* Reconstruct the header in the fragment buffer so we can hash the reconstructed record as if it were never fragmented. */ @@ -283,7 +288,7 @@ NX_SECURE_TLS_SESSION *tls_session; break; case NX_SECURE_TLS_CERTIFICATE_MSG: /* Server has sent its certificate message. */ - status = _nx_secure_tls_process_remote_certificate(tls_session, data_start, message_length); + status = _nx_secure_tls_process_remote_certificate(tls_session, data_start, message_length, message_length); break; case NX_SECURE_TLS_SERVER_HELLO_DONE: /* Server has responded to our ClientHello. */ diff --git a/nx_secure/src/nx_secure_dtls_client_protocol_version_override.c b/nx_secure/src/nx_secure_dtls_client_protocol_version_override.c index f0ca550a..ff4f752b 100644 --- a/nx_secure/src/nx_secure_dtls_client_protocol_version_override.c +++ b/nx_secure/src/nx_secure_dtls_client_protocol_version_override.c @@ -32,7 +32,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_client_protocol_version_override PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -67,6 +67,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_client_protocol_version_override(NX_SECURE_DTLS_SESSION *dtls_session, diff --git a/nx_secure/src/nx_secure_dtls_client_session_start.c b/nx_secure/src/nx_secure_dtls_client_session_start.c index 1e910577..f7d6b90d 100644 --- a/nx_secure/src/nx_secure_dtls_client_session_start.c +++ b/nx_secure/src/nx_secure_dtls_client_session_start.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_client_session_start PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -65,6 +65,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_client_session_start(NX_SECURE_DTLS_SESSION *dtls_session, NX_UDP_SOCKET *udp_socket, NXD_ADDRESS *ip_address, UINT port, UINT wait_option) diff --git a/nx_secure/src/nx_secure_dtls_ecc_initialize.c b/nx_secure/src/nx_secure_dtls_ecc_initialize.c index dee538b0..a1375a9e 100644 --- a/nx_secure/src/nx_secure_dtls_ecc_initialize.c +++ b/nx_secure/src/nx_secure_dtls_ecc_initialize.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_ecc_initialize PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -62,6 +62,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_ecc_initialize(NX_SECURE_DTLS_SESSION *dtls_session, diff --git a/nx_secure/src/nx_secure_dtls_hash_record.c b/nx_secure/src/nx_secure_dtls_hash_record.c index bdbb4f01..d8d03e63 100644 --- a/nx_secure/src/nx_secure_dtls_hash_record.c +++ b/nx_secure/src/nx_secure_dtls_hash_record.c @@ -33,7 +33,7 @@ static UCHAR adjusted_header[5]; /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_hash_record PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -74,6 +74,9 @@ static UCHAR adjusted_header[5]; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_hash_record(NX_SECURE_DTLS_SESSION *dtls_session, @@ -116,7 +119,7 @@ NX_SECURE_TLS_SESSION *tls_session; hash_size = tls_session -> nx_secure_tls_session_ciphersuite -> nx_secure_tls_hash_size; /* In DTLS, use the sequence number + epoch from the header. */ - NX_SECURE_MEMCPY(adjusted_sequence_num, &header[3], 8); + NX_SECURE_MEMCPY(adjusted_sequence_num, &header[3], 8); /* Use case of memcpy is verified. */ /* We need to extract the type, version, and length from the DTLS header. */ adjusted_header[0] = header[0]; /* Type. */ diff --git a/nx_secure/src/nx_secure_dtls_initialize.c b/nx_secure/src/nx_secure_dtls_initialize.c index 7a77e715..e1e5499a 100644 --- a/nx_secure/src/nx_secure_dtls_initialize.c +++ b/nx_secure/src/nx_secure_dtls_initialize.c @@ -32,7 +32,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_initialize PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -63,6 +63,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ VOID _nx_secure_dtls_initialize(VOID) diff --git a/nx_secure/src/nx_secure_dtls_packet_allocate.c b/nx_secure/src/nx_secure_dtls_packet_allocate.c index b1fce5a0..5f111dfc 100644 --- a/nx_secure/src/nx_secure_dtls_packet_allocate.c +++ b/nx_secure/src/nx_secure_dtls_packet_allocate.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_packet_allocate PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -70,6 +70,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_packet_allocate(NX_SECURE_DTLS_SESSION *dtls_session, NX_PACKET_POOL *pool_ptr, diff --git a/nx_secure/src/nx_secure_dtls_process_clienthello.c b/nx_secure/src/nx_secure_dtls_process_clienthello.c index 8fc8fe91..dae013b1 100644 --- a/nx_secure/src/nx_secure_dtls_process_clienthello.c +++ b/nx_secure/src/nx_secure_dtls_process_clienthello.c @@ -40,7 +40,7 @@ static UINT _nx_secure_dtls_check_ciphersuite(const NX_SECURE_TLS_CIPHERSUITE_IN /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_process_clienthello PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -81,16 +81,15 @@ static UINT _nx_secure_dtls_check_ciphersuite(const NX_SECURE_TLS_CIPHERSUITE_IN /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), added */ +/* 09-30-2020 Timothy Stapko Modified comment(s), added */ /* priority ciphersuite logic, */ +/* verified memcpy use cases, */ /* fixed configuration problem */ /* that would result in */ -/* compiler error, */ -/* resulting in version 6.0.1 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* compiler error, fixed */ +/* renegotiation bug, */ /* improved negotiation logic, */ -/* fixed renegotiation bug, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_process_clienthello(NX_SECURE_DTLS_SESSION *dtls_session, UCHAR *packet_buffer, @@ -173,7 +172,7 @@ NX_SECURE_TLS_ECDHE_HANDSHAKE_DATA *ecdhe_data; if (status == NX_SECURE_TLS_UNSUPPORTED_TLS_VERSION || tls_session -> nx_secure_tls_local_session_active) { /* If the version isn't supported, it's not an issue - TLS is backward-compatible, - * so negotiate the highest supported version. If the version isn't recognized, + * so pick the highest version we do support. If the version isn't recognized, * flag an error. */ _nx_secure_tls_highest_supported_version_negotiate(tls_session, &protocol_version, NX_SECURE_DTLS); @@ -195,7 +194,7 @@ NX_SECURE_TLS_ECDHE_HANDSHAKE_DATA *ecdhe_data; tls_session -> nx_secure_tls_protocol_version = protocol_version; /* Save off the random value for key generation later. */ - NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_random, packet_buffer, NX_SECURE_TLS_RANDOM_SIZE); + NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_random, packet_buffer, NX_SECURE_TLS_RANDOM_SIZE); /* Use case of memcpy is verified. */ packet_buffer += NX_SECURE_TLS_RANDOM_SIZE; /* Extract the session ID if there is one. */ @@ -206,7 +205,7 @@ NX_SECURE_TLS_ECDHE_HANDSHAKE_DATA *ecdhe_data; tls_session -> nx_secure_tls_session_id_length = session_id_length; if (session_id_length > 0) { - NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_session_id, &packet_buffer[0], session_id_length); + NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_session_id, &packet_buffer[0], session_id_length); /* Use case of memcpy is verified. */ packet_buffer += session_id_length; } @@ -223,7 +222,7 @@ NX_SECURE_TLS_ECDHE_HANDSHAKE_DATA *ecdhe_data; if (dtls_session -> nx_secure_dtls_cookie_length > 0) { - NX_SECURE_MEMCPY(dtls_session -> nx_secure_dtls_cookie, packet_buffer, dtls_session -> nx_secure_dtls_cookie_length); + NX_SECURE_MEMCPY(dtls_session -> nx_secure_dtls_cookie, packet_buffer, dtls_session -> nx_secure_dtls_cookie_length); /* Use case of memcpy is verified. */ packet_buffer += dtls_session -> nx_secure_dtls_cookie_length; } @@ -606,7 +605,7 @@ NX_SECURE_TLS_ECDHE_HANDSHAKE_DATA *ecdhe_data; /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_check_ciphersuite PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -641,6 +640,8 @@ NX_SECURE_TLS_ECDHE_HANDSHAKE_DATA *ecdhe_data; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #ifdef NX_SECURE_ENABLE_ECC_CIPHERSUITE diff --git a/nx_secure/src/nx_secure_dtls_process_handshake_header.c b/nx_secure/src/nx_secure_dtls_process_handshake_header.c index a220d6bb..ec08cc95 100644 --- a/nx_secure/src/nx_secure_dtls_process_handshake_header.c +++ b/nx_secure/src/nx_secure_dtls_process_handshake_header.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_process_handshake_header PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -69,6 +69,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_process_handshake_header(UCHAR *packet_buffer, USHORT *message_type, diff --git a/nx_secure/src/nx_secure_dtls_process_header.c b/nx_secure/src/nx_secure_dtls_process_header.c index ba6d804b..7a153bf4 100644 --- a/nx_secure/src/nx_secure_dtls_process_header.c +++ b/nx_secure/src/nx_secure_dtls_process_header.c @@ -31,7 +31,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_process_header PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -69,6 +69,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_process_header(NX_SECURE_DTLS_SESSION *dtls_session, NX_PACKET *packet_ptr, @@ -157,8 +160,8 @@ NX_SECURE_TLS_SESSION *tls_session; /* Get epoch and sequence number from header. */ - NX_SECURE_MEMCPY((UCHAR *)&remote_sequence_number[0], &header_data[3], 4); - NX_SECURE_MEMCPY((UCHAR *)&remote_sequence_number[1], &header_data[7], 4); + NX_SECURE_MEMCPY((UCHAR *)&remote_sequence_number[0], &header_data[3], 4); /* Use case of memcpy is verified. */ + NX_SECURE_MEMCPY((UCHAR *)&remote_sequence_number[1], &header_data[7], 4); /* Use case of memcpy is verified. */ /* Swap endianness for comparisons. */ NX_CHANGE_ULONG_ENDIAN(remote_sequence_number[0]); diff --git a/nx_secure/src/nx_secure_dtls_process_helloverifyrequest.c b/nx_secure/src/nx_secure_dtls_process_helloverifyrequest.c index 22aea4a7..1a25cba2 100644 --- a/nx_secure/src/nx_secure_dtls_process_helloverifyrequest.c +++ b/nx_secure/src/nx_secure_dtls_process_helloverifyrequest.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_process_helloverifyrequest PORTABLE C */ -/* 6.0.1 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -62,9 +62,10 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), improved */ +/* 09-30-2020 Timothy Stapko Modified comment(s), improved */ /* buffer length verification, */ -/* resulting in version 6.0.1 */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_process_helloverifyrequest(NX_SECURE_DTLS_SESSION *dtls_session, @@ -100,7 +101,7 @@ UINT length; } /* Save off the cookie. */ - NX_SECURE_MEMCPY(dtls_session -> nx_secure_dtls_cookie, &packet_buffer[length], dtls_session -> nx_secure_dtls_cookie_length); + NX_SECURE_MEMCPY(dtls_session -> nx_secure_dtls_cookie, &packet_buffer[length], dtls_session -> nx_secure_dtls_cookie_length); /* Use case of memcpy is verified. */ /* Set our state to indicate we sucessfully parsed the HelloVerifyRequest. */ dtls_session -> nx_secure_dtls_tls_session.nx_secure_tls_client_state = NX_SECURE_TLS_CLIENT_STATE_HELLO_VERIFY; diff --git a/nx_secure/src/nx_secure_dtls_process_record.c b/nx_secure/src/nx_secure_dtls_process_record.c index 4cd6e1e5..906eb1e1 100644 --- a/nx_secure/src/nx_secure_dtls_process_record.c +++ b/nx_secure/src/nx_secure_dtls_process_record.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_process_record PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -76,10 +76,10 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* adjusted logic for TLS */ /* modifications, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_process_record(NX_SECURE_DTLS_SESSION *dtls_session, NX_PACKET *packet_ptr, diff --git a/nx_secure/src/nx_secure_dtls_psk_add.c b/nx_secure/src/nx_secure_dtls_psk_add.c index e5ca92b8..8cbeff18 100644 --- a/nx_secure/src/nx_secure_dtls_psk_add.c +++ b/nx_secure/src/nx_secure_dtls_psk_add.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_psk_add PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -67,6 +67,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if defined(NX_SECURE_ENABLE_PSK_CIPHERSUITES) || defined(NX_SECURE_ENABLE_ECJPAKE_CIPHERSUITE) diff --git a/nx_secure/src/nx_secure_dtls_receive_callback.c b/nx_secure/src/nx_secure_dtls_receive_callback.c index 67aede9c..9523e498 100644 --- a/nx_secure/src/nx_secure_dtls_receive_callback.c +++ b/nx_secure/src/nx_secure_dtls_receive_callback.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_receive_callback PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -80,9 +80,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* released packet securely, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ VOID _nx_secure_dtls_receive_callback(NX_UDP_SOCKET *socket_ptr) diff --git a/nx_secure/src/nx_secure_dtls_retransmit.c b/nx_secure/src/nx_secure_dtls_retransmit.c index cd219c30..62a43a3e 100644 --- a/nx_secure/src/nx_secure_dtls_retransmit.c +++ b/nx_secure/src/nx_secure_dtls_retransmit.c @@ -33,7 +33,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_retransmit PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -70,6 +70,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ VOID _nx_secure_dtls_retransmit(NX_SECURE_DTLS_SESSION *dtls_session) diff --git a/nx_secure/src/nx_secure_dtls_retransmit_queue_flush.c b/nx_secure/src/nx_secure_dtls_retransmit_queue_flush.c index 14091a8d..f5a70af5 100644 --- a/nx_secure/src/nx_secure_dtls_retransmit_queue_flush.c +++ b/nx_secure/src/nx_secure_dtls_retransmit_queue_flush.c @@ -32,7 +32,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_retransmit_queue_flush PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,9 +68,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* released packet securely, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ VOID _nx_secure_dtls_retransmit_queue_flush(NX_SECURE_DTLS_SESSION *dtls_session) diff --git a/nx_secure/src/nx_secure_dtls_send_clienthello.c b/nx_secure/src/nx_secure_dtls_send_clienthello.c index f6530bc8..b89d0fb5 100644 --- a/nx_secure/src/nx_secure_dtls_send_clienthello.c +++ b/nx_secure/src/nx_secure_dtls_send_clienthello.c @@ -39,7 +39,7 @@ static UINT _nx_secure_dtls_send_clienthello_sec_spf_extensions(NX_SECURE_TLS_SE /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_send_clienthello PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -78,6 +78,9 @@ static UINT _nx_secure_dtls_send_clienthello_sec_spf_extensions(NX_SECURE_TLS_SE /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_send_clienthello(NX_SECURE_DTLS_SESSION *dtls_session, NX_PACKET *send_packet) @@ -172,7 +175,7 @@ USHORT protocol_version; /* Set cookie. */ NX_SECURE_MEMCPY(packet_buffer, dtls_session -> nx_secure_dtls_cookie, - dtls_session -> nx_secure_dtls_cookie_length); + dtls_session -> nx_secure_dtls_cookie_length); /* Use case of memcpy is verified. */ length += dtls_session -> nx_secure_dtls_cookie_length; /* Finally, we have a complete length and can put it into the buffer. Before that, @@ -197,7 +200,7 @@ USHORT protocol_version; gmt_time = tls_session -> nx_secure_tls_session_time_function(); } NX_CHANGE_ULONG_ENDIAN(gmt_time); - NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_random, (UCHAR *)&gmt_time, sizeof(gmt_time)); + NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_random, (UCHAR *)&gmt_time, sizeof(gmt_time)); /* Use case of memcpy is verified. */ /* Next 28 bytes is random data. */ for (i = 0; i < 28; i += (UINT)sizeof(random_value)) @@ -212,7 +215,7 @@ USHORT protocol_version; /* Copy the random data into the packet. */ NX_SECURE_MEMCPY(&packet_buffer[length], tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_random, - sizeof(tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_random)); + sizeof(tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_random)); /* Use case of memcpy is verified. */ length += sizeof(tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_random); /* Session ID length is one byte. */ @@ -222,7 +225,7 @@ USHORT protocol_version; /* Session ID follows. */ if (tls_session -> nx_secure_tls_session_id_length > 0) { - NX_SECURE_MEMCPY(&packet_buffer[length], tls_session -> nx_secure_tls_session_id, tls_session -> nx_secure_tls_session_id_length); + NX_SECURE_MEMCPY(&packet_buffer[length], tls_session -> nx_secure_tls_session_id, tls_session -> nx_secure_tls_session_id_length); /* Use case of memcpy is verified. */ length += tls_session -> nx_secure_tls_session_id_length; } @@ -470,7 +473,7 @@ USHORT protocol_version; /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_send_clienthello_sec_spf_extensions PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -506,6 +509,8 @@ USHORT protocol_version; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #ifdef NX_SECURE_ENABLE_ECC_CIPHERSUITE diff --git a/nx_secure/src/nx_secure_dtls_send_handshake_record.c b/nx_secure/src/nx_secure_dtls_send_handshake_record.c index 2b9062ed..f0255a29 100644 --- a/nx_secure/src/nx_secure_dtls_send_handshake_record.c +++ b/nx_secure/src/nx_secure_dtls_send_handshake_record.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_send_handshake_record PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -71,9 +71,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* released packet securely, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_send_handshake_record(NX_SECURE_DTLS_SESSION *dtls_session, diff --git a/nx_secure/src/nx_secure_dtls_send_helloverifyrequest.c b/nx_secure/src/nx_secure_dtls_send_helloverifyrequest.c index 174ee836..6cdbab21 100644 --- a/nx_secure/src/nx_secure_dtls_send_helloverifyrequest.c +++ b/nx_secure/src/nx_secure_dtls_send_helloverifyrequest.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_send_helloverifyrequest PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -62,6 +62,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_send_helloverifyrequest(NX_SECURE_DTLS_SESSION *dtls_session, @@ -111,7 +114,7 @@ USHORT protocol_version; random_value = (UINT)NX_RAND(); NX_CHANGE_ULONG_ENDIAN(random_value); NX_SECURE_MEMCPY(&dtls_session -> nx_secure_dtls_cookie[i], - (UCHAR *)&random_value, sizeof(random_value)); + (UCHAR *)&random_value, sizeof(random_value)); /* Use case of memcpy is verified. */ } if (dtls_session -> nx_secure_dtls_cookie_length > sizeof(dtls_session -> nx_secure_dtls_cookie)) @@ -122,7 +125,7 @@ USHORT protocol_version; } /* Copy the cookie into the packet. */ - NX_SECURE_MEMCPY(&packet_buffer[length], dtls_session -> nx_secure_dtls_cookie, dtls_session -> nx_secure_dtls_cookie_length); + NX_SECURE_MEMCPY(&packet_buffer[length], dtls_session -> nx_secure_dtls_cookie, dtls_session -> nx_secure_dtls_cookie_length); /* Use case of memcpy is verified. */ length += dtls_session -> nx_secure_dtls_cookie_length; /* Save off and return the number of bytes we wrote and need to send. */ diff --git a/nx_secure/src/nx_secure_dtls_send_record.c b/nx_secure/src/nx_secure_dtls_send_record.c index 8bf44b05..24fd00ae 100644 --- a/nx_secure/src/nx_secure_dtls_send_record.c +++ b/nx_secure/src/nx_secure_dtls_send_record.c @@ -33,7 +33,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_send_record PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -82,9 +82,10 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ /* released packet securely, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_send_record(NX_SECURE_DTLS_SESSION *dtls_session, NX_PACKET *send_packet, @@ -212,7 +213,7 @@ UCHAR epoch_seq_num[8]; } /* Append the hash to the plaintext data before encryption. */ - NX_SECURE_MEMCPY(&data[length], record_hash, hash_length); + NX_SECURE_MEMCPY(&data[length], record_hash, hash_length); /* Use case of memcpy is verified. */ #ifdef NX_SECURE_KEY_CLEAR NX_SECURE_MEMSET(record_hash, 0, hash_length); diff --git a/nx_secure/src/nx_secure_dtls_send_serverhello.c b/nx_secure/src/nx_secure_dtls_send_serverhello.c index fde9c0b9..81f64473 100644 --- a/nx_secure/src/nx_secure_dtls_send_serverhello.c +++ b/nx_secure/src/nx_secure_dtls_send_serverhello.c @@ -31,7 +31,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_send_serverhello PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -66,6 +66,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_send_serverhello(NX_SECURE_DTLS_SESSION *dtls_session, NX_PACKET *send_packet) @@ -128,7 +131,7 @@ USHORT protocol_version; } NX_CHANGE_ULONG_ENDIAN(gmt_time); - NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_random, (UCHAR *)&gmt_time, sizeof(gmt_time)); + NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_random, (UCHAR *)&gmt_time, sizeof(gmt_time)); /* Use case of memcpy is verified. */ /* Next 28 bytes is random data. */ for (i = 0; i < 28; i += (UINT)sizeof(random_value)) @@ -142,7 +145,7 @@ USHORT protocol_version; /* Copy the random data into the packet. */ NX_SECURE_MEMCPY(&packet_buffer[length], tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_random, - sizeof(tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_random)); + sizeof(tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_random)); /* Use case of memcpy is verified. */ length += sizeof(tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_random); /* Session ID length is one byte. */ @@ -152,7 +155,7 @@ USHORT protocol_version; /* Session ID follows. */ if (tls_session -> nx_secure_tls_session_id_length > 0) { - NX_SECURE_MEMCPY(&packet_buffer[length], tls_session -> nx_secure_tls_session_id, tls_session -> nx_secure_tls_session_id_length); + NX_SECURE_MEMCPY(&packet_buffer[length], tls_session -> nx_secure_tls_session_id, tls_session -> nx_secure_tls_session_id_length); /* Use case of memcpy is verified. */ length += tls_session -> nx_secure_tls_session_id_length; } diff --git a/nx_secure/src/nx_secure_dtls_server_create.c b/nx_secure/src/nx_secure_dtls_server_create.c index 2549dc39..d19a3b36 100644 --- a/nx_secure/src/nx_secure_dtls_server_create.c +++ b/nx_secure/src/nx_secure_dtls_server_create.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_server_create PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -87,6 +87,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_server_create(NX_SECURE_DTLS_SERVER *server_ptr, NX_IP *ip_ptr, UINT port, ULONG timeout, diff --git a/nx_secure/src/nx_secure_dtls_server_delete.c b/nx_secure/src/nx_secure_dtls_server_delete.c index 66e12df9..7658cf7a 100644 --- a/nx_secure/src/nx_secure_dtls_server_delete.c +++ b/nx_secure/src/nx_secure_dtls_server_delete.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_server_delete PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -64,6 +64,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_server_delete(NX_SECURE_DTLS_SERVER *server_ptr) diff --git a/nx_secure/src/nx_secure_dtls_server_ecc_initialize.c b/nx_secure/src/nx_secure_dtls_server_ecc_initialize.c index 450e7dd3..c3295e2b 100644 --- a/nx_secure/src/nx_secure_dtls_server_ecc_initialize.c +++ b/nx_secure/src/nx_secure_dtls_server_ecc_initialize.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_server_ecc_initialize PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -63,6 +63,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_server_ecc_initialize(NX_SECURE_DTLS_SERVER *server_ptr, diff --git a/nx_secure/src/nx_secure_dtls_server_handshake.c b/nx_secure/src/nx_secure_dtls_server_handshake.c index 772f614f..b437bf33 100644 --- a/nx_secure/src/nx_secure_dtls_server_handshake.c +++ b/nx_secure/src/nx_secure_dtls_server_handshake.c @@ -33,7 +33,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_server_handshake PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -103,9 +103,13 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* verified memmove use cases, */ /* fixed renegotiation bug, */ -/* resulting in version 6.0.2 */ +/* fixed certificate buffer */ +/* allocation, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_server_handshake(NX_SECURE_DTLS_SESSION *dtls_session, UCHAR *packet_buffer, @@ -175,7 +179,8 @@ UCHAR *fragment_buffer; } /* Check available area of buffer. */ - if ((fragment_offset + fragment_length) > tls_session -> nx_secure_tls_packet_buffer_size) + if ((fragment_offset + fragment_length) > tls_session -> nx_secure_tls_packet_buffer_size || + (header_bytes + message_length) > tls_session -> nx_secure_tls_packet_buffer_size) { return(NX_SECURE_TLS_PACKET_BUFFER_TOO_SMALL); } @@ -183,7 +188,7 @@ UCHAR *fragment_buffer; dtls_session -> nx_secure_dtls_fragment_length -= fragment_length; /* Copy the fragment data (minus the header) into the reassembly buffer. */ - NX_SECURE_MEMCPY(&fragment_buffer[fragment_offset], &packet_buffer[header_bytes], fragment_length); + NX_SECURE_MEMCPY(&fragment_buffer[fragment_offset], &packet_buffer[header_bytes], fragment_length); /* Use case of memcpy is verified. */ /* If we still have fragments to add, just return success. */ if (dtls_session -> nx_secure_dtls_fragment_length > 0) @@ -210,7 +215,7 @@ UCHAR *fragment_buffer; /* Put the header into the packet buffer, adjusting the fields to create a seam-less * DTLS record. */ - NX_SECURE_MEMMOVE(&fragment_buffer[header_bytes], fragment_buffer, message_length); + NX_SECURE_MEMMOVE(&fragment_buffer[header_bytes], fragment_buffer, message_length); /* Use case of memmove is verified. */ /* Reconstruct the header in the fragment buffer so we can hash the reconstructed record as if it were never fragmented. */ @@ -273,7 +278,7 @@ UCHAR *fragment_buffer; #ifdef NX_SECURE_ENABLE_CLIENT_CERTIFICATE_VERIFY case NX_SECURE_TLS_CERTIFICATE_MSG: /* Client sent certificate message (in response to a request from us. Process it now. */ - status = _nx_secure_tls_process_remote_certificate(tls_session, packet_buffer, message_length); + status = _nx_secure_tls_process_remote_certificate(tls_session, packet_buffer, message_length, message_length); tls_session -> nx_secure_tls_server_state = NX_SECURE_TLS_SERVER_STATE_CLIENT_CERTIFICATE; break; case NX_SECURE_TLS_CERTIFICATE_VERIFY: diff --git a/nx_secure/src/nx_secure_dtls_server_local_certificate_add.c b/nx_secure/src/nx_secure_dtls_server_local_certificate_add.c index 3427ed8d..2a309c59 100644 --- a/nx_secure/src/nx_secure_dtls_server_local_certificate_add.c +++ b/nx_secure/src/nx_secure_dtls_server_local_certificate_add.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_server_local_certificate_add PORTABLE C */ -/* 6.0.1 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -66,9 +66,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), and */ +/* 09-30-2020 Timothy Stapko Modified comment(s), and */ /* fixed compiler warnings, */ -/* resulting in version 6.0.1 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_server_local_certificate_add(NX_SECURE_DTLS_SERVER *server_ptr, diff --git a/nx_secure/src/nx_secure_dtls_server_local_certificate_remove.c b/nx_secure/src/nx_secure_dtls_server_local_certificate_remove.c index 8eaeae18..521e70ee 100644 --- a/nx_secure/src/nx_secure_dtls_server_local_certificate_remove.c +++ b/nx_secure/src/nx_secure_dtls_server_local_certificate_remove.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_server_local_certificate_remove PORTABLE C */ -/* 6.0.1 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,9 +68,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), and */ +/* 09-30-2020 Timothy Stapko Modified comment(s), and */ /* fixed compiler warnings, */ -/* resulting in version 6.0.1 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_server_local_certificate_remove(NX_SECURE_DTLS_SERVER *server_ptr, diff --git a/nx_secure/src/nx_secure_dtls_server_notify_set.c b/nx_secure/src/nx_secure_dtls_server_notify_set.c index 86bdbd67..bdc6e1fa 100644 --- a/nx_secure/src/nx_secure_dtls_server_notify_set.c +++ b/nx_secure/src/nx_secure_dtls_server_notify_set.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_server_notify_set PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -64,6 +64,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_server_notify_set(NX_SECURE_DTLS_SERVER *server_ptr, diff --git a/nx_secure/src/nx_secure_dtls_server_protocol_version_override.c b/nx_secure/src/nx_secure_dtls_server_protocol_version_override.c index 825cb77f..11cb6c4f 100644 --- a/nx_secure/src/nx_secure_dtls_server_protocol_version_override.c +++ b/nx_secure/src/nx_secure_dtls_server_protocol_version_override.c @@ -32,7 +32,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_server_protocol_version_override PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -66,6 +66,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_server_protocol_version_override(NX_SECURE_DTLS_SERVER *dtls_server, diff --git a/nx_secure/src/nx_secure_dtls_server_psk_add.c b/nx_secure/src/nx_secure_dtls_server_psk_add.c index 4c5ddf7e..03aac8bd 100644 --- a/nx_secure/src/nx_secure_dtls_server_psk_add.c +++ b/nx_secure/src/nx_secure_dtls_server_psk_add.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_server_psk_add PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -66,6 +66,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if defined(NX_SECURE_ENABLE_PSK_CIPHERSUITES) || defined(NX_SECURE_ENABLE_ECJPAKE_CIPHERSUITE) diff --git a/nx_secure/src/nx_secure_dtls_server_session_send.c b/nx_secure/src/nx_secure_dtls_server_session_send.c index 11a5030d..9a3fde17 100644 --- a/nx_secure/src/nx_secure_dtls_server_session_send.c +++ b/nx_secure/src/nx_secure_dtls_server_session_send.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_server_session_send PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -62,6 +62,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_server_session_send(NX_SECURE_DTLS_SESSION *dtls_session, NX_PACKET *packet_ptr) diff --git a/nx_secure/src/nx_secure_dtls_server_session_start.c b/nx_secure/src/nx_secure_dtls_server_session_start.c index 4996675b..b2a600c4 100644 --- a/nx_secure/src/nx_secure_dtls_server_session_start.c +++ b/nx_secure/src/nx_secure_dtls_server_session_start.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_server_session_start PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -66,6 +66,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_server_session_start(NX_SECURE_DTLS_SESSION *dtls_session, UINT wait_option) diff --git a/nx_secure/src/nx_secure_dtls_server_start.c b/nx_secure/src/nx_secure_dtls_server_start.c index 6591aa6a..f715b769 100644 --- a/nx_secure/src/nx_secure_dtls_server_start.c +++ b/nx_secure/src/nx_secure_dtls_server_start.c @@ -31,7 +31,7 @@ VOID _nx_secure_dtls_receive_callback(NX_UDP_SOCKET *socket_ptr); /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_server_start PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -65,6 +65,8 @@ VOID _nx_secure_dtls_receive_callback(NX_UDP_SOCKET *socket_ptr); /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_server_start(NX_SECURE_DTLS_SERVER *server_ptr) diff --git a/nx_secure/src/nx_secure_dtls_server_stop.c b/nx_secure/src/nx_secure_dtls_server_stop.c index 1aa19938..9eba6277 100644 --- a/nx_secure/src/nx_secure_dtls_server_stop.c +++ b/nx_secure/src/nx_secure_dtls_server_stop.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_server_stop PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -62,6 +62,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_server_stop(NX_SECURE_DTLS_SERVER *server_ptr) diff --git a/nx_secure/src/nx_secure_dtls_server_trusted_certificate_add.c b/nx_secure/src/nx_secure_dtls_server_trusted_certificate_add.c index 752a3851..a757ecc2 100644 --- a/nx_secure/src/nx_secure_dtls_server_trusted_certificate_add.c +++ b/nx_secure/src/nx_secure_dtls_server_trusted_certificate_add.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_server_trusted_certificate_add PORTABLE C */ -/* 6.0.1 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -65,9 +65,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), and */ +/* 09-30-2020 Timothy Stapko Modified comment(s), and */ /* fixed compiler warnings, */ -/* resulting in version 6.0.1 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_server_trusted_certificate_add(NX_SECURE_DTLS_SERVER *server_ptr, diff --git a/nx_secure/src/nx_secure_dtls_server_trusted_certificate_remove.c b/nx_secure/src/nx_secure_dtls_server_trusted_certificate_remove.c index 2eed3c4d..098d5473 100644 --- a/nx_secure/src/nx_secure_dtls_server_trusted_certificate_remove.c +++ b/nx_secure/src/nx_secure_dtls_server_trusted_certificate_remove.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_server_trusted_certificate_remove PORTABLE C */ -/* 6.0.1 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,9 +68,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), and */ +/* 09-30-2020 Timothy Stapko Modified comment(s), and */ /* fixed compiler warnings, */ -/* resulting in version 6.0.1 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_server_trusted_certificate_remove(NX_SECURE_DTLS_SERVER *server_ptr, diff --git a/nx_secure/src/nx_secure_dtls_server_x509_client_verify_configure.c b/nx_secure/src/nx_secure_dtls_server_x509_client_verify_configure.c index a0678c60..2b9acbbb 100644 --- a/nx_secure/src/nx_secure_dtls_server_x509_client_verify_configure.c +++ b/nx_secure/src/nx_secure_dtls_server_x509_client_verify_configure.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_server_x509_client_verify_configure PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -76,6 +76,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_server_x509_client_verify_configure(NX_SECURE_DTLS_SERVER *server_ptr, UINT certs_per_session, diff --git a/nx_secure/src/nx_secure_dtls_server_x509_client_verify_disable.c b/nx_secure/src/nx_secure_dtls_server_x509_client_verify_disable.c index 35ada7df..8822c08c 100644 --- a/nx_secure/src/nx_secure_dtls_server_x509_client_verify_disable.c +++ b/nx_secure/src/nx_secure_dtls_server_x509_client_verify_disable.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_server_x509_client_verify_disable PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -61,6 +61,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_server_x509_client_verify_disable(NX_SECURE_DTLS_SERVER *server_ptr) diff --git a/nx_secure/src/nx_secure_dtls_session_cache.c b/nx_secure/src/nx_secure_dtls_session_cache.c index 7c323c4d..1f35e4b0 100644 --- a/nx_secure/src/nx_secure_dtls_session_cache.c +++ b/nx_secure/src/nx_secure_dtls_session_cache.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* nx_secure_dtls_session_cache_delete PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -64,6 +64,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ VOID nx_secure_dtls_session_cache_delete(NX_SECURE_DTLS_SERVER *dtls_server, NXD_ADDRESS *ip_address, UINT remote_port, UINT local_port) @@ -129,7 +131,7 @@ UINT i; /* FUNCTION RELEASE */ /* */ /* nx_secure_dtls_session_cache_get_new PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -165,6 +167,9 @@ UINT i; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT nx_secure_dtls_session_cache_get_new(NX_SECURE_DTLS_SERVER *dtls_server, NX_SECURE_DTLS_SESSION **dtls_session, NXD_ADDRESS *ip_address, UINT remote_port, UINT local_port) @@ -187,7 +192,7 @@ UINT i; if (session_array[i].nx_secure_dtls_session_in_use == NX_FALSE) { /* Set the IP and port to the passed-in values. */ - NX_SECURE_MEMCPY(&session_array[i].nx_secure_dtls_remote_ip_address, ip_address, sizeof(NXD_ADDRESS)); + NX_SECURE_MEMCPY(&session_array[i].nx_secure_dtls_remote_ip_address, ip_address, sizeof(NXD_ADDRESS)); /* Use case of memcpy is verified. */ session_array[i].nx_secure_dtls_local_port = local_port; session_array[i].nx_secure_dtls_remote_port = remote_port; session_array[i].nx_secure_dtls_session_in_use = NX_TRUE; @@ -220,7 +225,7 @@ UINT i; /* FUNCTION RELEASE */ /* */ /* nx_secure_dtls_session_cache_find PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -256,6 +261,8 @@ UINT i; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT nx_secure_dtls_session_cache_find(NX_SECURE_DTLS_SERVER *dtls_server, NX_SECURE_DTLS_SESSION **dtls_session, NXD_ADDRESS *ip_address, UINT remote_port, UINT local_port) diff --git a/nx_secure/src/nx_secure_dtls_session_client_info_get.c b/nx_secure/src/nx_secure_dtls_session_client_info_get.c index 18ba3f67..ea8b539a 100644 --- a/nx_secure/src/nx_secure_dtls_session_client_info_get.c +++ b/nx_secure/src/nx_secure_dtls_session_client_info_get.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_session_client_info_get PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -64,6 +64,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_session_client_info_get(NX_SECURE_DTLS_SESSION *dtls_session, diff --git a/nx_secure/src/nx_secure_dtls_session_create.c b/nx_secure/src/nx_secure_dtls_session_create.c index 25f31e81..3ebc02be 100644 --- a/nx_secure/src/nx_secure_dtls_session_create.c +++ b/nx_secure/src/nx_secure_dtls_session_create.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_session_create PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -80,6 +80,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_session_create(NX_SECURE_DTLS_SESSION *session_ptr, diff --git a/nx_secure/src/nx_secure_dtls_session_delete.c b/nx_secure/src/nx_secure_dtls_session_delete.c index 205200fa..038979eb 100644 --- a/nx_secure/src/nx_secure_dtls_session_delete.c +++ b/nx_secure/src/nx_secure_dtls_session_delete.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_session_delete PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -63,6 +63,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_session_delete(NX_SECURE_DTLS_SESSION *dtls_session) diff --git a/nx_secure/src/nx_secure_dtls_session_end.c b/nx_secure/src/nx_secure_dtls_session_end.c index 400d72e1..a310e60b 100644 --- a/nx_secure/src/nx_secure_dtls_session_end.c +++ b/nx_secure/src/nx_secure_dtls_session_end.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_session_end PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -70,9 +70,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* released packet securely, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_session_end(NX_SECURE_DTLS_SESSION *dtls_session, UINT wait_option) diff --git a/nx_secure/src/nx_secure_dtls_session_local_certificate_add.c b/nx_secure/src/nx_secure_dtls_session_local_certificate_add.c index 1b3f44fe..ad86ff25 100644 --- a/nx_secure/src/nx_secure_dtls_session_local_certificate_add.c +++ b/nx_secure/src/nx_secure_dtls_session_local_certificate_add.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_session_local_certificate_add PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -67,6 +67,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_session_local_certificate_add(NX_SECURE_DTLS_SESSION *dtls_session, diff --git a/nx_secure/src/nx_secure_dtls_session_local_certificate_remove.c b/nx_secure/src/nx_secure_dtls_session_local_certificate_remove.c index 11e4f180..ce0303b5 100644 --- a/nx_secure/src/nx_secure_dtls_session_local_certificate_remove.c +++ b/nx_secure/src/nx_secure_dtls_session_local_certificate_remove.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_session_local_certificate_remove PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -66,6 +66,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_session_local_certificate_remove(NX_SECURE_DTLS_SESSION *dtls_session, diff --git a/nx_secure/src/nx_secure_dtls_session_receive.c b/nx_secure/src/nx_secure_dtls_session_receive.c index 5614c61d..ce286236 100644 --- a/nx_secure/src/nx_secure_dtls_session_receive.c +++ b/nx_secure/src/nx_secure_dtls_session_receive.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_session_receive PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -77,9 +77,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* released packet securely, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_session_receive(NX_SECURE_DTLS_SESSION *dtls_session, diff --git a/nx_secure/src/nx_secure_dtls_session_reset.c b/nx_secure/src/nx_secure_dtls_session_reset.c index 9b2e3076..66698635 100644 --- a/nx_secure/src/nx_secure_dtls_session_reset.c +++ b/nx_secure/src/nx_secure_dtls_session_reset.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_session_reset PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,9 +68,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* released packet securely, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_session_reset(NX_SECURE_DTLS_SESSION *dtls_session) diff --git a/nx_secure/src/nx_secure_dtls_session_send.c b/nx_secure/src/nx_secure_dtls_session_send.c index 2eab9e28..07a5837b 100644 --- a/nx_secure/src/nx_secure_dtls_session_send.c +++ b/nx_secure/src/nx_secure_dtls_session_send.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_session_send PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -66,6 +66,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_session_send(NX_SECURE_DTLS_SESSION *dtls_session, NX_PACKET *packet_ptr, @@ -82,7 +85,7 @@ UINT status; { /* If the IP Address and port are uninitialized, set them now (possibly an error?). */ - NX_SECURE_MEMCPY(&dtls_session -> nx_secure_dtls_remote_ip_address, ip_address, sizeof(NXD_ADDRESS)); + NX_SECURE_MEMCPY(&dtls_session -> nx_secure_dtls_remote_ip_address, ip_address, sizeof(NXD_ADDRESS)); /* Use case of memcpy is verified. */ dtls_session -> nx_secure_dtls_local_port = port; } else if ((dtls_session -> nx_secure_dtls_remote_ip_address.nxd_ip_version != ip_address -> nxd_ip_version) || diff --git a/nx_secure/src/nx_secure_dtls_session_start.c b/nx_secure/src/nx_secure_dtls_session_start.c index 75c41122..4788c283 100644 --- a/nx_secure/src/nx_secure_dtls_session_start.c +++ b/nx_secure/src/nx_secure_dtls_session_start.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_session_start PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -74,10 +74,10 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* released packet securely, */ /* fixed renegotiation bug, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_session_start(NX_SECURE_DTLS_SESSION *dtls_session, NX_UDP_SOCKET *udp_socket, diff --git a/nx_secure/src/nx_secure_dtls_session_trusted_certificate_add.c b/nx_secure/src/nx_secure_dtls_session_trusted_certificate_add.c index 4bd80621..9d7a13f0 100644 --- a/nx_secure/src/nx_secure_dtls_session_trusted_certificate_add.c +++ b/nx_secure/src/nx_secure_dtls_session_trusted_certificate_add.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_session_trusted_certificate_add PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -66,6 +66,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_session_trusted_certificate_add(NX_SECURE_DTLS_SESSION *dtls_session, diff --git a/nx_secure/src/nx_secure_dtls_session_trusted_certificate_remove.c b/nx_secure/src/nx_secure_dtls_session_trusted_certificate_remove.c index 7aa10680..d573d304 100644 --- a/nx_secure/src/nx_secure_dtls_session_trusted_certificate_remove.c +++ b/nx_secure/src/nx_secure_dtls_session_trusted_certificate_remove.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_session_trusted_certificate_remove PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -65,6 +65,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_session_trusted_certificate_remove(NX_SECURE_DTLS_SESSION *dtls_session, diff --git a/nx_secure/src/nx_secure_dtls_verify_mac.c b/nx_secure/src/nx_secure_dtls_verify_mac.c index 0af05a39..ee867b31 100644 --- a/nx_secure/src/nx_secure_dtls_verify_mac.c +++ b/nx_secure/src/nx_secure_dtls_verify_mac.c @@ -32,7 +32,7 @@ static UCHAR _generated_hash[NX_SECURE_TLS_MAX_HASH_SIZE]; /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_verify_mac PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -70,6 +70,9 @@ static UCHAR _generated_hash[NX_SECURE_TLS_MAX_HASH_SIZE]; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_dtls_verify_mac(NX_SECURE_DTLS_SESSION *dtls_session, UCHAR *header_data, @@ -123,7 +126,7 @@ NX_SECURE_TLS_SESSION *tls_session; { return(NX_SECURE_TLS_HASH_MAC_VERIFY_FAILURE); } - NX_SECURE_MEMCPY(header, header_data, header_length); + NX_SECURE_MEMCPY(header, header_data, header_length); /* Use case of memcpy is verified. */ /* Adjust the length in the header to match data without hash. */ diff --git a/nx_secure/src/nx_secure_module_hash_compute.c b/nx_secure/src/nx_secure_module_hash_compute.c index eb20bf07..1d11cdd0 100644 --- a/nx_secure/src/nx_secure_module_hash_compute.c +++ b/nx_secure/src/nx_secure_module_hash_compute.c @@ -34,7 +34,7 @@ /* FUNCTION RELEASE */ /* */ /* nx_secure_module_hash_compute PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -77,6 +77,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT nx_secure_module_hash_compute(NX_CRYPTO_METHOD *hmac_ptr, diff --git a/nx_secure/src/nx_secure_tls_1_3_client_handshake.c b/nx_secure/src/nx_secure_tls_1_3_client_handshake.c index 79cf5fb4..fcb16303 100644 --- a/nx_secure/src/nx_secure_tls_1_3_client_handshake.c +++ b/nx_secure/src/nx_secure_tls_1_3_client_handshake.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_1_3_client_handshake PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -103,9 +103,11 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* released packet securely, */ -/* resulting in version 6.0.2 */ +/* fixed certificate buffer */ +/* allocation, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ @@ -141,6 +143,7 @@ UINT status; USHORT message_type = NX_SECURE_TLS_INVALID_MESSAGE; USHORT header_bytes; UINT message_length; +UINT packet_buffer_length = data_length; UCHAR *packet_start; NX_PACKET *send_packet = NX_NULL; NX_PACKET_POOL *packet_pool; @@ -289,7 +292,7 @@ const UCHAR *server_random; break; case NX_SECURE_TLS_CERTIFICATE_MSG: /* Server has sent its certificate message. */ - status = _nx_secure_tls_process_remote_certificate(tls_session, packet_buffer, message_length); + status = _nx_secure_tls_process_remote_certificate(tls_session, packet_buffer, message_length, packet_buffer_length); if (status == NX_SUCCESS) { diff --git a/nx_secure/src/nx_secure_tls_1_3_crypto_init.c b/nx_secure/src/nx_secure_tls_1_3_crypto_init.c index 240991cf..49abb961 100644 --- a/nx_secure/src/nx_secure_tls_1_3_crypto_init.c +++ b/nx_secure/src/nx_secure_tls_1_3_crypto_init.c @@ -33,7 +33,7 @@ extern NX_SECURE_TLS_ECC _nx_secure_tls_ecc_info; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_1_3_crypto_init PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -69,6 +69,8 @@ extern NX_SECURE_TLS_ECC _nx_secure_tls_ecc_info; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if (NX_SECURE_TLS_TLS_1_3_ENABLED) diff --git a/nx_secure/src/nx_secure_tls_1_3_finished_hash_generate.c b/nx_secure/src/nx_secure_tls_1_3_finished_hash_generate.c index c34bb047..6815814a 100644 --- a/nx_secure/src/nx_secure_tls_1_3_finished_hash_generate.c +++ b/nx_secure/src/nx_secure_tls_1_3_finished_hash_generate.c @@ -31,7 +31,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_1_3_finished_hash_generate PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -70,6 +70,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if (NX_SECURE_TLS_TLS_1_3_ENABLED) diff --git a/nx_secure/src/nx_secure_tls_1_3_generate_keys.c b/nx_secure/src/nx_secure_tls_1_3_generate_keys.c index 5b200b47..06b5f269 100644 --- a/nx_secure/src/nx_secure_tls_1_3_generate_keys.c +++ b/nx_secure/src/nx_secure_tls_1_3_generate_keys.c @@ -58,7 +58,7 @@ static UINT _nx_secure_tls_hkdf_extract(NX_SECURE_TLS_SESSION *tls_session, UCHA /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_1_3_generate_psk_secrets PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -91,6 +91,8 @@ static UINT _nx_secure_tls_hkdf_extract(NX_SECURE_TLS_SESSION *tls_session, UCHA /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if (NX_SECURE_TLS_TLS_1_3_ENABLED) @@ -167,7 +169,7 @@ UINT is_resumption_psk = NX_FALSE; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_1_3_generate_handshake_keys PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -196,6 +198,8 @@ UINT is_resumption_psk = NX_FALSE; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if (NX_SECURE_TLS_TLS_1_3_ENABLED) @@ -406,7 +410,7 @@ UINT hash_size; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_1_3_generate_session_keys PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -435,6 +439,8 @@ UINT hash_size; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if (NX_SECURE_TLS_TLS_1_3_ENABLED) @@ -590,7 +596,7 @@ UINT key_offset; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_generate_session_psk PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -623,6 +629,8 @@ UINT key_offset; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if (NX_SECURE_TLS_TLS_1_3_ENABLED) @@ -671,7 +679,7 @@ const NX_CRYPTO_METHOD *hash_method; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_1_3_generate_handshake_secrets PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -699,6 +707,8 @@ const NX_CRYPTO_METHOD *hash_method; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if (NX_SECURE_TLS_TLS_1_3_ENABLED) @@ -980,7 +990,7 @@ UINT is_resumption_psk = NX_FALSE; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_1_3_generate_session_secrets PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -1008,6 +1018,8 @@ UINT is_resumption_psk = NX_FALSE; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if (NX_SECURE_TLS_TLS_1_3_ENABLED) @@ -1137,7 +1149,7 @@ UCHAR (*transcript_hashes)[NX_SECURE_TLS_MAX_HASH_SIZE] = tls_session->nx_secure /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_derive_secret PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -1165,6 +1177,8 @@ UCHAR (*transcript_hashes)[NX_SECURE_TLS_MAX_HASH_SIZE] = tls_session->nx_secure /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if (NX_SECURE_TLS_TLS_1_3_ENABLED) @@ -1304,7 +1318,7 @@ UINT hash_length; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_hkdf_expand_label PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -1332,6 +1346,9 @@ UINT hash_length; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if (NX_SECURE_TLS_TLS_1_3_ENABLED) @@ -1385,9 +1402,9 @@ const NX_CRYPTO_METHOD *session_hmac_method = NX_NULL; data_len = data_len + 1; /* Now copy in label with TLS 1.3 prefix. */ - NX_CRYPTO_MEMCPY(&_nx_secure_tls_hkdf_temp_output[data_len], "tls13 ", 6); + NX_CRYPTO_MEMCPY(&_nx_secure_tls_hkdf_temp_output[data_len], "tls13 ", 6); /* Use case of memcpy is verified. */ data_len += 6; - NX_CRYPTO_MEMCPY(&_nx_secure_tls_hkdf_temp_output[data_len], label, label_len); + NX_CRYPTO_MEMCPY(&_nx_secure_tls_hkdf_temp_output[data_len], label, label_len); /* Use case of memcpy is verified. */ data_len += label_len; /* Add the length of the context (single octet). */ @@ -1395,7 +1412,7 @@ const NX_CRYPTO_METHOD *session_hmac_method = NX_NULL; data_len = data_len + 1; /* Now copy in context. */ - NX_CRYPTO_MEMCPY(&_nx_secure_tls_hkdf_temp_output[data_len], context, context_len); + NX_CRYPTO_MEMCPY(&_nx_secure_tls_hkdf_temp_output[data_len], context, context_len); /* Use case of memcpy is verified. */ data_len += context_len; @@ -1478,7 +1495,7 @@ const NX_CRYPTO_METHOD *session_hmac_method = NX_NULL; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_hkdf_extract PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -1513,6 +1530,8 @@ const NX_CRYPTO_METHOD *session_hmac_method = NX_NULL; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if (NX_SECURE_TLS_TLS_1_3_ENABLED) diff --git a/nx_secure/src/nx_secure_tls_1_3_server_handshake.c b/nx_secure/src/nx_secure_tls_1_3_server_handshake.c index 98b68ef7..20eacdfe 100644 --- a/nx_secure/src/nx_secure_tls_1_3_server_handshake.c +++ b/nx_secure/src/nx_secure_tls_1_3_server_handshake.c @@ -31,7 +31,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_server_handshake PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -94,9 +94,11 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* released packet securely, */ -/* resulting in version 6.0.2 */ +/* fixed certificate buffer */ +/* allocation, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if (NX_SECURE_TLS_TLS_1_3_ENABLED) @@ -227,7 +229,7 @@ NX_SECURE_TLS_SERVER_STATE old_server_state; #ifdef NX_SECURE_ENABLE_CLIENT_CERTIFICATE_VERIFY case NX_SECURE_TLS_CERTIFICATE_MSG: /* Client sent certificate message (in response to a request from us. Process it now. */ - status = _nx_secure_tls_process_remote_certificate(tls_session, packet_buffer, message_length); + status = _nx_secure_tls_process_remote_certificate(tls_session, packet_buffer, message_length, data_length); /* If client sends an empty Certificate message, server should abort the handshake with a "certificate_required" alert. */ if (status == NX_SECURE_TLS_EMPTY_REMOTE_CERTIFICATE_RECEIVED) diff --git a/nx_secure/src/nx_secure_tls_1_3_session_keys_set.c b/nx_secure/src/nx_secure_tls_1_3_session_keys_set.c index ec196437..ba1b5912 100644 --- a/nx_secure/src/nx_secure_tls_1_3_session_keys_set.c +++ b/nx_secure/src/nx_secure_tls_1_3_session_keys_set.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_1_3_session_keys_set PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -71,6 +71,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #define NX_SECURE_SOURCE_CODE @@ -135,12 +138,12 @@ const NX_CRYPTO_METHOD *session_cipher_method = NX_NULL; if (is_client) { NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_write_key, - tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_next_write_key, key_size); + tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_next_write_key, key_size); /* Use case of memcpy is verified. */ } else { NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_write_key, - tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_next_write_key, key_size); + tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_next_write_key, key_size); /* Use case of memcpy is verified. */ } } @@ -151,12 +154,12 @@ const NX_CRYPTO_METHOD *session_cipher_method = NX_NULL; if (is_client) { NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_iv, - tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_next_iv, iv_size); + tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_next_iv, iv_size); /* Use case of memcpy is verified. */ } else { NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_iv, - tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_next_iv, iv_size); + tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_next_iv, iv_size); /* Use case of memcpy is verified. */ } } diff --git a/nx_secure/src/nx_secure_tls_1_3_transcript_hash_save.c b/nx_secure/src/nx_secure_tls_1_3_transcript_hash_save.c index 58b0c854..378cbe93 100644 --- a/nx_secure/src/nx_secure_tls_1_3_transcript_hash_save.c +++ b/nx_secure/src/nx_secure_tls_1_3_transcript_hash_save.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_1_3_transcript_hash_save PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -63,6 +63,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if (NX_SECURE_TLS_TLS_1_3_ENABLED) @@ -106,7 +109,7 @@ CHAR *metadata; /* Copy over the handshake hash state into a local structure to do the intermediate calculation. */ NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_scratch, tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata, - tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata_size); + tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata_size); /* Use case of memcpy is verified. */ metadata = tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_scratch; } diff --git a/nx_secure/src/nx_secure_tls_active_certificate_set.c b/nx_secure/src/nx_secure_tls_active_certificate_set.c index d1e84629..c9e472f2 100644 --- a/nx_secure/src/nx_secure_tls_active_certificate_set.c +++ b/nx_secure/src/nx_secure_tls_active_certificate_set.c @@ -32,7 +32,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_active_certificate_set PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -73,6 +73,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_active_certificate_set(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_allocate_handshake_packet.c b/nx_secure/src/nx_secure_tls_allocate_handshake_packet.c index 2dfacb21..b02a5d86 100644 --- a/nx_secure/src/nx_secure_tls_allocate_handshake_packet.c +++ b/nx_secure/src/nx_secure_tls_allocate_handshake_packet.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_allocate_handshake_packet PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -69,6 +69,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_allocate_handshake_packet(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_check_protocol_version.c b/nx_secure/src/nx_secure_tls_check_protocol_version.c index 34a9dd91..f1df8382 100644 --- a/nx_secure/src/nx_secure_tls_check_protocol_version.c +++ b/nx_secure/src/nx_secure_tls_check_protocol_version.c @@ -61,7 +61,7 @@ NX_SECURE_VERSIONS_LIST nx_secure_supported_versions_list[] = /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_check_protocol_version PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -102,6 +102,8 @@ NX_SECURE_VERSIONS_LIST nx_secure_supported_versions_list[] = /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_check_protocol_version(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_ciphersuite_lookup.c b/nx_secure/src/nx_secure_tls_ciphersuite_lookup.c index 84a05775..3a37d811 100644 --- a/nx_secure/src/nx_secure_tls_ciphersuite_lookup.c +++ b/nx_secure/src/nx_secure_tls_ciphersuite_lookup.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_ciphersuite_lookup PORTABLE C */ -/* 6.0.1 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,9 +68,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), return */ +/* 09-30-2020 Timothy Stapko Modified comment(s), return */ /* priority of selected suite, */ -/* resulting in version 6.0.1 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_ciphersuite_lookup(NX_SECURE_TLS_SESSION *tls_session, UINT ciphersuite, diff --git a/nx_secure/src/nx_secure_tls_client_handshake.c b/nx_secure/src/nx_secure_tls_client_handshake.c index 5168c9c8..fb269fd1 100644 --- a/nx_secure/src/nx_secure_tls_client_handshake.c +++ b/nx_secure/src/nx_secure_tls_client_handshake.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_client_handshake PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -101,10 +101,12 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* released packet securely, */ /* fixed renegotiation bug, */ -/* resulting in version 6.0.2 */ +/* fixed certificate buffer */ +/* allocation, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_client_handshake(NX_SECURE_TLS_SESSION *tls_session, UCHAR *packet_buffer, @@ -116,6 +118,7 @@ UINT temp_status; USHORT message_type = NX_SECURE_TLS_INVALID_MESSAGE; USHORT header_bytes; UINT message_length; +UINT packet_buffer_length = data_length; UCHAR *packet_start; NX_PACKET *send_packet = NX_NULL; NX_PACKET_POOL *packet_pool; @@ -177,7 +180,7 @@ const NX_CRYPTO_METHOD break; case NX_SECURE_TLS_CERTIFICATE_MSG: /* Server has sent its certificate message. */ - status = _nx_secure_tls_process_remote_certificate(tls_session, packet_buffer, message_length); + status = _nx_secure_tls_process_remote_certificate(tls_session, packet_buffer, message_length, packet_buffer_length); break; case NX_SECURE_TLS_SERVER_HELLO_DONE: /* Server has responded to our ClientHello. */ diff --git a/nx_secure/src/nx_secure_tls_client_psk_set.c b/nx_secure/src/nx_secure_tls_client_psk_set.c index 40369165..822d018e 100644 --- a/nx_secure/src/nx_secure_tls_client_psk_set.c +++ b/nx_secure/src/nx_secure_tls_client_psk_set.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_client_psk_set PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -69,6 +69,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #ifdef NX_SECURE_ENABLE_PSK_CIPHERSUITES @@ -86,15 +89,15 @@ UINT status; hint_length <= NX_SECURE_TLS_MAX_PSK_ID_SIZE) { /* Save off the PSK and its length. */ - NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_credentials.nx_secure_tls_client_psk.nx_secure_tls_psk_data, pre_shared_key, psk_length); + NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_credentials.nx_secure_tls_client_psk.nx_secure_tls_psk_data, pre_shared_key, psk_length); /* Use case of memcpy is verified. */ tls_session -> nx_secure_tls_credentials.nx_secure_tls_client_psk.nx_secure_tls_psk_data_size = psk_length; /* Save off the identity and its length. */ - NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_credentials.nx_secure_tls_client_psk.nx_secure_tls_psk_id, psk_identity, identity_length); + NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_credentials.nx_secure_tls_client_psk.nx_secure_tls_psk_id, psk_identity, identity_length); /* Use case of memcpy is verified. */ tls_session -> nx_secure_tls_credentials.nx_secure_tls_client_psk.nx_secure_tls_psk_id_size = identity_length; /* Save off the hint and its length. */ - NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_credentials.nx_secure_tls_client_psk.nx_secure_tls_psk_id_hint, hint, hint_length); + NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_credentials.nx_secure_tls_client_psk.nx_secure_tls_psk_id_hint, hint, hint_length); /* Use case of memcpy is verified. */ tls_session -> nx_secure_tls_credentials.nx_secure_tls_client_psk.nx_secure_tls_psk_id_hint_size = hint_length; status = NX_SUCCESS; diff --git a/nx_secure/src/nx_secure_tls_ecc_generate_keys.c b/nx_secure/src/nx_secure_tls_ecc_generate_keys.c index 717bffa6..d8c8f1bf 100644 --- a/nx_secure/src/nx_secure_tls_ecc_generate_keys.c +++ b/nx_secure/src/nx_secure_tls_ecc_generate_keys.c @@ -47,7 +47,7 @@ static const UCHAR _NX_CRYPTO_DER_OID_SHA_512[] = {0x30, 0x51, 0x30, 0x0d, /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_ecc_generate_keys PORTABLE C */ -/* 6.0.1 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -92,9 +92,10 @@ static const UCHAR _NX_CRYPTO_DER_OID_SHA_512[] = {0x30, 0x51, 0x30, 0x0d, /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), update */ +/* 09-30-2020 Timothy Stapko Modified comment(s), update */ /* ECC find curve method, */ -/* resulting in version 6.0.1 */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_ecc_generate_keys(NX_SECURE_TLS_SESSION *tls_session, UINT ecc_named_curve, USHORT sign_key, @@ -729,10 +730,10 @@ USHORT signature_algorithm_id; _nx_secure_padded_signature[signature_offset - 1] = 0x0; if (der_encoding_length > 0) { - NX_CRYPTO_MEMCPY(&_nx_secure_padded_signature[signature_offset], der_encoding, der_encoding_length); + NX_CRYPTO_MEMCPY(&_nx_secure_padded_signature[signature_offset], der_encoding, der_encoding_length); /* Use case of memcpy is verified. */ signature_offset += der_encoding_length; } - NX_CRYPTO_MEMCPY(&_nx_secure_padded_signature[signature_offset], hash, hash_length); + NX_CRYPTO_MEMCPY(&_nx_secure_padded_signature[signature_offset], hash, hash_length); /* Use case of memcpy is verified. */ if (auth_method -> nx_crypto_init != NX_NULL) { diff --git a/nx_secure/src/nx_secure_tls_ecc_initialize.c b/nx_secure/src/nx_secure_tls_ecc_initialize.c index 3916b262..638f3127 100644 --- a/nx_secure/src/nx_secure_tls_ecc_initialize.c +++ b/nx_secure/src/nx_secure_tls_ecc_initialize.c @@ -33,7 +33,7 @@ NX_SECURE_TLS_ECC _nx_secure_tls_ecc_info; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_ecc_initialize PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -66,6 +66,8 @@ NX_SECURE_TLS_ECC _nx_secure_tls_ecc_info; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_ecc_initialize(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_find_curve_method.c b/nx_secure/src/nx_secure_tls_find_curve_method.c index 854833fe..b561a02e 100644 --- a/nx_secure/src/nx_secure_tls_find_curve_method.c +++ b/nx_secure/src/nx_secure_tls_find_curve_method.c @@ -33,7 +33,7 @@ extern NX_SECURE_TLS_ECC _nx_secure_tls_ecc_info; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_find_curve_method PORTABLE C */ -/* 6.0.1 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -85,9 +85,9 @@ extern NX_SECURE_TLS_ECC _nx_secure_tls_ecc_info; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), added */ +/* 09-30-2020 Timothy Stapko Modified comment(s), added */ /* curve priority return value,*/ -/* resulting in version 6.0.1 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_find_curve_method(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_finished_hash_generate.c b/nx_secure/src/nx_secure_tls_finished_hash_generate.c index adf5947e..05cb2ecc 100644 --- a/nx_secure/src/nx_secure_tls_finished_hash_generate.c +++ b/nx_secure/src/nx_secure_tls_finished_hash_generate.c @@ -33,7 +33,7 @@ static UCHAR handshake_hash[16 + 20]; /* We concatenate MD5 and SHA-1 hashes int /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_finished_hash_generate PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -69,6 +69,9 @@ static UCHAR handshake_hash[16 + 20]; /* We concatenate MD5 and SHA-1 hashes int /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_finished_hash_generate(NX_SECURE_TLS_SESSION *tls_session, @@ -132,7 +135,7 @@ UINT hash_size = 0; /* Copy over the handshake hash state into scratch space to do the intermediate calculation. */ NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_scratch, tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata, - tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata_size); + tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata_size); /* Use case of memcpy is verified. */ /* Finalize the handshake message hash that we started at the beginning of the handshake. */ method_ptr = tls_session -> nx_secure_tls_crypto_table -> nx_secure_tls_handshake_hash_sha256_method; @@ -187,11 +190,11 @@ UINT hash_size = 0; first, then MD5. */ NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_scratch, tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha1_metadata, - tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha1_metadata_size); + tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha1_metadata_size); /* Use case of memcpy is verified. */ NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_scratch + tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha1_metadata_size, tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_md5_metadata, - tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_md5_metadata_size); + tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_md5_metadata_size); /* Use case of memcpy is verified. */ /* Finalize the handshake message hashes that we started at the beginning of the handshake. */ method_ptr = tls_session -> nx_secure_tls_crypto_table -> nx_secure_tls_handshake_hash_md5_method; diff --git a/nx_secure/src/nx_secure_tls_generate_keys.c b/nx_secure/src/nx_secure_tls_generate_keys.c index 0eab82b7..6666c335 100644 --- a/nx_secure/src/nx_secure_tls_generate_keys.c +++ b/nx_secure/src/nx_secure_tls_generate_keys.c @@ -35,7 +35,7 @@ static UCHAR _nx_secure_tls_gen_keys_random[NX_SECURE_TLS_RANDOM_SIZE + NX_SECUR /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_generate_keys PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -72,6 +72,9 @@ static UCHAR _nx_secure_tls_gen_keys_random[NX_SECURE_TLS_RANDOM_SIZE + NX_SECUR /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_generate_keys(NX_SECURE_TLS_SESSION *tls_session) @@ -142,9 +145,9 @@ VOID *handler = NX_NULL; /* Concatenate random values to feed into PRF. */ NX_SECURE_MEMCPY(_nx_secure_tls_gen_keys_random, tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_random, - NX_SECURE_TLS_RANDOM_SIZE); + NX_SECURE_TLS_RANDOM_SIZE); /* Use case of memcpy is verified. */ NX_SECURE_MEMCPY(&_nx_secure_tls_gen_keys_random[NX_SECURE_TLS_RANDOM_SIZE], - tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_random, NX_SECURE_TLS_RANDOM_SIZE); + tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_random, NX_SECURE_TLS_RANDOM_SIZE); /* Use case of memcpy is verified. */ /* Generate the master secret using the pre-master secret, the defined TLS label, and the concatenated random values. */ @@ -290,9 +293,9 @@ VOID *handler = NX_NULL; /* The order of the randoms is reversed from that used for the master secret when generating the key block. */ NX_SECURE_MEMCPY(_nx_secure_tls_gen_keys_random, tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_random, - NX_SECURE_TLS_RANDOM_SIZE); + NX_SECURE_TLS_RANDOM_SIZE); /* Use case of memcpy is verified. */ NX_SECURE_MEMCPY(&_nx_secure_tls_gen_keys_random[NX_SECURE_TLS_RANDOM_SIZE], - tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_random, NX_SECURE_TLS_RANDOM_SIZE); + tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_random, NX_SECURE_TLS_RANDOM_SIZE); /* Use case of memcpy is verified. */ /* Key expansion uses the PRF to generate a block of key material from the master secret (generated above) and the client and server random values transmitted during the initial hello negotiation. */ diff --git a/nx_secure/src/nx_secure_tls_generate_premaster_secret.c b/nx_secure/src/nx_secure_tls_generate_premaster_secret.c index b0dcc824..e04963e5 100644 --- a/nx_secure/src/nx_secure_tls_generate_premaster_secret.c +++ b/nx_secure/src/nx_secure_tls_generate_premaster_secret.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_generate_premaster_secret PORTABLE C */ -/* 6.0.1 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,9 +68,10 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), update */ +/* 09-30-2020 Timothy Stapko Modified comment(s), update */ /* ECC find curve method, */ -/* resulting in version 6.0.1 */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_generate_premaster_secret(NX_SECURE_TLS_SESSION *tls_session, UINT id) @@ -266,7 +267,7 @@ NX_CRYPTO_EXTENDED_OUTPUT extended_output; tls_session -> nx_secure_tls_key_material.nx_secure_tls_pre_master_secret[index + 1] = (UCHAR)psk_length; index += 2; - NX_SECURE_MEMCPY(&tls_session -> nx_secure_tls_key_material.nx_secure_tls_pre_master_secret[index], psk_data, psk_length); + NX_SECURE_MEMCPY(&tls_session -> nx_secure_tls_key_material.nx_secure_tls_pre_master_secret[index], psk_data, psk_length); /* Use case of memcpy is verified. */ index += psk_length; /* Save the pre-master secret size for later use. */ diff --git a/nx_secure/src/nx_secure_tls_handshake_hash_init.c b/nx_secure/src/nx_secure_tls_handshake_hash_init.c index 98da9915..f81734f4 100644 --- a/nx_secure/src/nx_secure_tls_handshake_hash_init.c +++ b/nx_secure/src/nx_secure_tls_handshake_hash_init.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_handshake_hash_init PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -64,6 +64,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_handshake_hash_init(NX_SECURE_TLS_SESSION *tls_session) diff --git a/nx_secure/src/nx_secure_tls_handshake_hash_update.c b/nx_secure/src/nx_secure_tls_handshake_hash_update.c index 5a9ea46d..b973cadb 100644 --- a/nx_secure/src/nx_secure_tls_handshake_hash_update.c +++ b/nx_secure/src/nx_secure_tls_handshake_hash_update.c @@ -32,7 +32,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_handshake_hash_update PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -71,6 +71,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_handshake_hash_update(NX_SECURE_TLS_SESSION *tls_session, UCHAR *data, diff --git a/nx_secure/src/nx_secure_tls_handshake_process.c b/nx_secure/src/nx_secure_tls_handshake_process.c index cbf2d5f8..1edfec0a 100644 --- a/nx_secure/src/nx_secure_tls_handshake_process.c +++ b/nx_secure/src/nx_secure_tls_handshake_process.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_handshake_process PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -67,10 +67,10 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* released packet securely, */ /* fixed compiler warnings, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_handshake_process(NX_SECURE_TLS_SESSION *tls_session, UINT wait_option) diff --git a/nx_secure/src/nx_secure_tls_hash_record.c b/nx_secure/src/nx_secure_tls_hash_record.c index 16d837b1..567cb8e4 100644 --- a/nx_secure/src/nx_secure_tls_hash_record.c +++ b/nx_secure/src/nx_secure_tls_hash_record.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_hash_record PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -70,9 +70,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* supported chained packet, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_hash_record(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_initialize.c b/nx_secure/src/nx_secure_tls_initialize.c index 29378d03..6b166f0e 100644 --- a/nx_secure/src/nx_secure_tls_initialize.c +++ b/nx_secure/src/nx_secure_tls_initialize.c @@ -33,7 +33,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_initialize PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -64,6 +64,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ VOID _nx_secure_tls_initialize(VOID) diff --git a/nx_secure/src/nx_secure_tls_key_material_init.c b/nx_secure/src/nx_secure_tls_key_material_init.c index 156f967a..7ea0483a 100644 --- a/nx_secure/src/nx_secure_tls_key_material_init.c +++ b/nx_secure/src/nx_secure_tls_key_material_init.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_key_material_init PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -59,6 +59,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_key_material_init(NX_SECURE_TLS_KEY_MATERIAL *key_material) diff --git a/nx_secure/src/nx_secure_tls_local_certificate_add.c b/nx_secure/src/nx_secure_tls_local_certificate_add.c index 8543a8f7..96e73769 100644 --- a/nx_secure/src/nx_secure_tls_local_certificate_add.c +++ b/nx_secure/src/nx_secure_tls_local_certificate_add.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_local_certificate_add PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,6 +68,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_local_certificate_add(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_local_certificate_find.c b/nx_secure/src/nx_secure_tls_local_certificate_find.c index 6abbc6eb..168747d5 100644 --- a/nx_secure/src/nx_secure_tls_local_certificate_find.c +++ b/nx_secure/src/nx_secure_tls_local_certificate_find.c @@ -32,7 +32,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_local_certificate_find PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,6 +68,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_local_certificate_find(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_local_certificate_remove.c b/nx_secure/src/nx_secure_tls_local_certificate_remove.c index 3513ae03..528c5e5e 100644 --- a/nx_secure/src/nx_secure_tls_local_certificate_remove.c +++ b/nx_secure/src/nx_secure_tls_local_certificate_remove.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_local_certificate_remove PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -66,6 +66,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_local_certificate_remove(NX_SECURE_TLS_SESSION *tls_session, UCHAR *common_name, diff --git a/nx_secure/src/nx_secure_tls_map_error_to_alert.c b/nx_secure/src/nx_secure_tls_map_error_to_alert.c index 007b71e1..1cde8b2a 100644 --- a/nx_secure/src/nx_secure_tls_map_error_to_alert.c +++ b/nx_secure/src/nx_secure_tls_map_error_to_alert.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_map_error_to_alert PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,9 +68,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* fixed renegotiation bug, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ VOID _nx_secure_tls_map_error_to_alert(UINT error_number, UINT *alert_number, UINT *alert_level) diff --git a/nx_secure/src/nx_secure_tls_metadata_size_calculate.c b/nx_secure/src/nx_secure_tls_metadata_size_calculate.c index 2a83cf63..c55043ab 100644 --- a/nx_secure/src/nx_secure_tls_metadata_size_calculate.c +++ b/nx_secure/src/nx_secure_tls_metadata_size_calculate.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_metadata_size_calculate PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -63,6 +63,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_metadata_size_calculate(const NX_SECURE_TLS_CRYPTO *crypto_table, diff --git a/nx_secure/src/nx_secure_tls_newest_supported_version.c b/nx_secure/src/nx_secure_tls_newest_supported_version.c index 9264c789..33e2049b 100644 --- a/nx_secure/src/nx_secure_tls_newest_supported_version.c +++ b/nx_secure/src/nx_secure_tls_newest_supported_version.c @@ -32,7 +32,7 @@ extern const NX_SECURE_VERSIONS_LIST nx_secure_supported_versions_list[]; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_newest_supported_version PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -69,6 +69,8 @@ extern const NX_SECURE_VERSIONS_LIST nx_secure_supported_versions_list[]; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ VOID _nx_secure_tls_newest_supported_version(NX_SECURE_TLS_SESSION *session_ptr, @@ -110,7 +112,7 @@ INT i; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_highest_supported_version_negotiate PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -144,11 +146,11 @@ INT i; /* */ /* DATE NAME DESCRIPTION */ /* */ -/* 08-14-2020 Timothy Stapko Initial Version 6.0.2 */ +/* 09-30-2020 Timothy Stapko Initial Version 6.1 */ /* */ /**************************************************************************/ void _nx_secure_tls_highest_supported_version_negotiate(NX_SECURE_TLS_SESSION *session_ptr, - USHORT *protocol_version, UINT id) + USHORT *protocol_version, UINT id) { INT i; USHORT highest_version = 0; diff --git a/nx_secure/src/nx_secure_tls_packet_allocate.c b/nx_secure/src/nx_secure_tls_packet_allocate.c index cd84ed54..18ec4ac2 100644 --- a/nx_secure/src/nx_secure_tls_packet_allocate.c +++ b/nx_secure/src/nx_secure_tls_packet_allocate.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_packet_allocate PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -71,6 +71,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_packet_allocate(NX_SECURE_TLS_SESSION *tls_session, NX_PACKET_POOL *pool_ptr, diff --git a/nx_secure/src/nx_secure_tls_packet_release.c b/nx_secure/src/nx_secure_tls_packet_release.c index 208e451a..ec213949 100644 --- a/nx_secure/src/nx_secure_tls_packet_release.c +++ b/nx_secure/src/nx_secure_tls_packet_release.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_packet_release PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -81,7 +81,7 @@ /* */ /* DATE NAME DESCRIPTION */ /* */ -/* 08-14-2020 Timothy Stapko Initial Version 6.0.2 */ +/* 05-19-2020 Timothy Stapko Initial Version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_packet_release(NX_PACKET *packet_ptr) diff --git a/nx_secure/src/nx_secure_tls_process_certificate_request.c b/nx_secure/src/nx_secure_tls_process_certificate_request.c index 405f751f..b5650647 100644 --- a/nx_secure/src/nx_secure_tls_process_certificate_request.c +++ b/nx_secure/src/nx_secure_tls_process_certificate_request.c @@ -33,7 +33,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_process_certificate_request PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -69,6 +69,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_process_certificate_request(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_process_certificate_verify.c b/nx_secure/src/nx_secure_tls_process_certificate_verify.c index ceefd392..41ab0e36 100644 --- a/nx_secure/src/nx_secure_tls_process_certificate_verify.c +++ b/nx_secure/src/nx_secure_tls_process_certificate_verify.c @@ -39,7 +39,7 @@ static const UCHAR _NX_SECURE_OID_SHA256[] = {0x30, 0x31, 0x30, 0x0d, 0x06, 0x09 /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_process_certificate_verify PORTABLE C */ -/* 6.0.1 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -81,9 +81,10 @@ static const UCHAR _NX_SECURE_OID_SHA256[] = {0x30, 0x31, 0x30, 0x0d, 0x06, 0x09 /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), update */ +/* 09-30-2020 Timothy Stapko Modified comment(s), update */ /* ECC find curve method, */ -/* resulting in version 6.0.1 */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_process_certificate_verify(NX_SECURE_TLS_SESSION *tls_session, @@ -218,16 +219,16 @@ NX_SECURE_EC_PUBLIC_KEY *ec_pubkey; if (tls_session -> nx_secure_tls_socket_type == NX_SECURE_TLS_SESSION_TYPE_CLIENT) { /* Copy in context string and 0-byte separator. */ - NX_SECURE_MEMCPY(&handshake_hash[64], server_context, 34); + NX_SECURE_MEMCPY(&handshake_hash[64], server_context, 34); /* Use case of memcpy is verified. */ } else { /* Copy in context string and 0-byte separator. */ - NX_SECURE_MEMCPY(&handshake_hash[64], client_context, 34); + NX_SECURE_MEMCPY(&handshake_hash[64], client_context, 34); /* Use case of memcpy is verified. */ } /* Copy in transcript hash. */ - NX_SECURE_MEMCPY(&handshake_hash[64 + 34], transcript_hash, 32); + NX_SECURE_MEMCPY(&handshake_hash[64 + 34], transcript_hash, 32); /* Use case of memcpy is verified. */ handshake_hash_length = 130; @@ -347,7 +348,7 @@ NX_SECURE_EC_PUBLIC_KEY *ec_pubkey; /* Copy over the handshake hash state into a local structure to do the intermediate calculation. */ NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_scratch, tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata, - tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata_size); + tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata_size); /* Use case of memcpy is verified. */ /* Use SHA-256 for now... */ hash_method = tls_session -> nx_secure_tls_crypto_table -> nx_secure_tls_handshake_hash_sha256_method; @@ -396,11 +397,11 @@ NX_SECURE_EC_PUBLIC_KEY *ec_pubkey; first, then MD5. */ NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_scratch, tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha1_metadata, - tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha1_metadata_size); + tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha1_metadata_size); /* Use case of memcpy is verified. */ NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_scratch + tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha1_metadata_size, tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_md5_metadata, - tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_md5_metadata_size); + tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_md5_metadata_size); /* Use case of memcpy is verified. */ /* Finalize the handshake message hashes that we started at the beginning of the handshake. */ hash_method = tls_session -> nx_secure_tls_crypto_table -> nx_secure_tls_handshake_hash_md5_method; diff --git a/nx_secure/src/nx_secure_tls_process_changecipherspec.c b/nx_secure/src/nx_secure_tls_process_changecipherspec.c index c37d1d85..1fdc669e 100644 --- a/nx_secure/src/nx_secure_tls_process_changecipherspec.c +++ b/nx_secure/src/nx_secure_tls_process_changecipherspec.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_process_changecipherspec PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -64,6 +64,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_process_changecipherspec(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_process_client_key_exchange.c b/nx_secure/src/nx_secure_tls_process_client_key_exchange.c index 6c07701d..53091a40 100644 --- a/nx_secure/src/nx_secure_tls_process_client_key_exchange.c +++ b/nx_secure/src/nx_secure_tls_process_client_key_exchange.c @@ -31,7 +31,7 @@ static UCHAR _nx_secure_client_padded_pre_master[600]; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_process_client_key_exchange PORTABLE C */ -/* 6.0.1 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -76,9 +76,10 @@ static UCHAR _nx_secure_client_padded_pre_master[600]; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), update */ +/* 09-30-2020 Timothy Stapko Modified comment(s), update */ /* ECC find curve method, */ -/* resulting in version 6.0.1 */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_process_client_key_exchange(NX_SECURE_TLS_SESSION *tls_session, @@ -340,7 +341,7 @@ UINT private_key_length; { length = sizeof(tls_session -> nx_secure_tls_key_material.nx_secure_tls_pre_master_secret); } - NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_key_material.nx_secure_tls_pre_master_secret, encrypted_pre_master_secret, length); + NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_key_material.nx_secure_tls_pre_master_secret, encrypted_pre_master_secret, length); /* Use case of memcpy is verified. */ tls_session -> nx_secure_tls_key_material.nx_secure_tls_pre_master_secret_size = length; } @@ -530,7 +531,7 @@ UINT private_key_length; /* Extract the 48 bytes of the actual pre-master secret from the data we just decrypted, stripping the padding, which comes at the beginning of the decrypted block (the pre-master secret is the last 48 bytes. */ NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_key_material.nx_secure_tls_pre_master_secret, - &_nx_secure_client_padded_pre_master[length - NX_SECURE_TLS_RSA_PREMASTER_SIZE], NX_SECURE_TLS_RSA_PREMASTER_SIZE); + &_nx_secure_client_padded_pre_master[length - NX_SECURE_TLS_RSA_PREMASTER_SIZE], NX_SECURE_TLS_RSA_PREMASTER_SIZE); /* Use case of memcpy is verified. */ } tls_session -> nx_secure_tls_key_material.nx_secure_tls_pre_master_secret_size = NX_SECURE_TLS_RSA_PREMASTER_SIZE; } /* End RSA-specific section. */ diff --git a/nx_secure/src/nx_secure_tls_process_clienthello.c b/nx_secure/src/nx_secure_tls_process_clienthello.c index 5e7ae1a4..64124884 100644 --- a/nx_secure/src/nx_secure_tls_process_clienthello.c +++ b/nx_secure/src/nx_secure_tls_process_clienthello.c @@ -36,7 +36,7 @@ static UINT _nx_secure_tls_check_ciphersuite(const NX_SECURE_TLS_CIPHERSUITE_INF /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_process_clienthello PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -85,13 +85,12 @@ static UINT _nx_secure_tls_check_ciphersuite(const NX_SECURE_TLS_CIPHERSUITE_INF /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), added */ +/* 09-30-2020 Timothy Stapko Modified comment(s), added */ /* priority ciphersuite logic, */ -/* resulting in version 6.0.1 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ -/* improved negotiation logic, */ +/* verified memcpy use cases, */ /* fixed renegotiation bug, */ -/* resulting in version 6.0.2 */ +/* improved negotiation logic, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_process_clienthello(NX_SECURE_TLS_SESSION *tls_session, UCHAR *packet_buffer, @@ -230,7 +229,7 @@ USHORT tls_1_3 = tls_session -> nx_secure_tls_1_3 tls_session -> nx_secure_tls_protocol_version = protocol_version; /* Save off the random value for key generation later. */ - NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_random, &packet_buffer[length], NX_SECURE_TLS_RANDOM_SIZE); + NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_random, &packet_buffer[length], NX_SECURE_TLS_RANDOM_SIZE); /* Use case of memcpy is verified. */ length += NX_SECURE_TLS_RANDOM_SIZE; /* Extract the session ID if there is one. */ @@ -246,7 +245,7 @@ USHORT tls_1_3 = tls_session -> nx_secure_tls_1_3 tls_session -> nx_secure_tls_session_id_length = session_id_length; if (session_id_length > 0) { - NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_session_id, &packet_buffer[length], session_id_length); + NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_session_id, &packet_buffer[length], session_id_length); /* Use case of memcpy is verified. */ length += session_id_length; } @@ -516,7 +515,7 @@ USHORT tls_1_3 = tls_session -> nx_secure_tls_1_3 /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_check_ciphersuite PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -551,6 +550,8 @@ USHORT tls_1_3 = tls_session -> nx_secure_tls_1_3 /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #ifdef NX_SECURE_ENABLE_ECC_CIPHERSUITE diff --git a/nx_secure/src/nx_secure_tls_process_clienthello_extensions.c b/nx_secure/src/nx_secure_tls_process_clienthello_extensions.c index 56245e76..1d3468de 100644 --- a/nx_secure/src/nx_secure_tls_process_clienthello_extensions.c +++ b/nx_secure/src/nx_secure_tls_process_clienthello_extensions.c @@ -54,7 +54,7 @@ static UINT _nx_secure_tls_process_clienthello_psk_extension(NX_SECURE_TLS_SESSI /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_process_clienthello_extensions PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -97,9 +97,9 @@ static UINT _nx_secure_tls_process_clienthello_psk_extension(NX_SECURE_TLS_SESSI /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* fixed renegotiation bug, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_process_clienthello_extensions(NX_SECURE_TLS_SESSION *tls_session, @@ -284,7 +284,7 @@ USHORT supported_version = tls_session -> nx_secure_tls_protocol_version; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_proc_clienthello_sec_reneg_extension PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -319,9 +319,9 @@ USHORT supported_version = tls_session -> nx_secure_tls_protocol_version; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* fixed renegotiation bug, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #ifndef NX_SECURE_TLS_DISABLE_SECURE_RENEGOTIATION @@ -436,7 +436,7 @@ INT compare_value; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_proc_clienthello_sec_sa_extension PORTABLE C */ -/* 6.0.1 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -475,9 +475,9 @@ INT compare_value; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), added */ +/* 09-30-2020 Timothy Stapko Modified comment(s), added */ /* curve priority logic, */ -/* resulting in version 6.0.1 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #ifdef NX_SECURE_ENABLE_ECC_CIPHERSUITE @@ -704,7 +704,7 @@ UCHAR expected_signature = 0; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_proc_clienthello_keyshare_extension PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -737,6 +737,8 @@ UCHAR expected_signature = 0; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if (NX_SECURE_TLS_TLS_1_3_ENABLED) @@ -967,7 +969,7 @@ NX_SECURE_TLS_ECC *ecc_info; /* */ /* _nx_secure_tls_proc_clienthello_supported_versions_extension */ /* PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -1002,6 +1004,8 @@ NX_SECURE_TLS_ECC *ecc_info; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_tls_proc_clienthello_supported_versions_extension(NX_SECURE_TLS_SESSION *tls_session, @@ -1059,7 +1063,7 @@ ULONG offset; /* */ /* _nx_secure_tls_proc_clienthello_signature_algorithms_extension */ /* PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -1093,6 +1097,8 @@ ULONG offset; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static VOID _nx_secure_tls_proc_clienthello_signature_algorithms_extension(NX_SECURE_TLS_SESSION *tls_session, @@ -1201,7 +1207,7 @@ NX_SECURE_X509_CERT *local_certificate = NX_NULL; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_get_signature_algorithm_id PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -1231,6 +1237,8 @@ NX_SECURE_X509_CERT *local_certificate = NX_NULL; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ VOID _nx_secure_tls_get_signature_algorithm_id(UINT signature_algorithm, USHORT *signature_algorithm_id) @@ -1281,7 +1289,7 @@ VOID _nx_secure_tls_get_signature_algorithm_id(UINT signature_algorithm, USHORT /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_process_clienthello_psk_extension PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -1312,6 +1320,9 @@ VOID _nx_secure_tls_get_signature_algorithm_id(UINT signature_algorithm, USHORT /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if (NX_SECURE_TLS_TLS_1_3_ENABLED) && defined(NX_SECURE_ENABLE_PSK_CIPHERSUITES) @@ -1553,7 +1564,7 @@ NX_SECURE_TLS_PSK_STORE *psk_store; /* Save the handshake hash state. */ NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_scratch, tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata, - tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata_size); + tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata_size); /* Use case of memcpy is verified. */ } /* Hash the ClientHello, adding the TLS record header. */ @@ -1575,7 +1586,7 @@ NX_SECURE_TLS_PSK_STORE *psk_store; { NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata, tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_scratch, - tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata_size); + tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata_size); /* Use case of memcpy is verified. */ } /* Generate the binder for our selected PSK. */ @@ -1598,7 +1609,7 @@ NX_SECURE_TLS_PSK_STORE *psk_store; } /* Make sure the Client PSK is initialized for later key generation. */ - NX_SECURE_MEMCPY(tls_session->nx_secure_tls_credentials.nx_secure_tls_client_psk.nx_secure_tls_psk_data, psk_data, psk_length); + NX_SECURE_MEMCPY(tls_session->nx_secure_tls_credentials.nx_secure_tls_client_psk.nx_secure_tls_psk_data, psk_data, psk_length); /* Use case of memcpy is verified. */ tls_session->nx_secure_tls_credentials.nx_secure_tls_client_psk.nx_secure_tls_psk_data_size = psk_length; return(NX_SUCCESS); diff --git a/nx_secure/src/nx_secure_tls_process_encrypted_extensions.c b/nx_secure/src/nx_secure_tls_process_encrypted_extensions.c index 01897d7a..da66ee04 100644 --- a/nx_secure/src/nx_secure_tls_process_encrypted_extensions.c +++ b/nx_secure/src/nx_secure_tls_process_encrypted_extensions.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_process_encrypted_extensions PORTABLE C */ -/* 6.0.1 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -63,9 +63,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), update */ +/* 09-30-2020 Timothy Stapko Modified comment(s), update */ /* ciphersuite lookup method, */ -/* resulting in version 6.0.1 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_process_encrypted_extensions(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_process_finished.c b/nx_secure/src/nx_secure_tls_process_finished.c index 2d77ecf7..9e896255 100644 --- a/nx_secure/src/nx_secure_tls_process_finished.c +++ b/nx_secure/src/nx_secure_tls_process_finished.c @@ -31,7 +31,7 @@ static UCHAR generated_hash[NX_SECURE_TLS_MAX_HASH_SIZE]; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_process_finished PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -70,9 +70,10 @@ static UCHAR generated_hash[NX_SECURE_TLS_MAX_HASH_SIZE]; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ /* fixed renegotiation bug, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_process_finished(NX_SECURE_TLS_SESSION *tls_session, UCHAR *packet_buffer, @@ -156,7 +157,7 @@ UINT is_server; #ifndef NX_SECURE_TLS_DISABLE_SECURE_RENEGOTIATION /* If we are doing secure renegotiation as per RFC 5746, we need to save off the generated verify data now. For TLS 1.0-1.2 this is 12 bytes. If SSLv3 is ever used, it will be 36 bytes. */ - NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_remote_verify_data, generated_hash, NX_SECURE_TLS_FINISHED_HASH_SIZE); + NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_remote_verify_data, generated_hash, NX_SECURE_TLS_FINISHED_HASH_SIZE); /* Use case of memcpy is verified. */ #endif /* NX_SECURE_TLS_DISABLE_SECURE_RENEGOTIATION */ /* The finished verify data is always 12 bytes (*except for SSLv3) - compare to see if the Finished hash matches the recevied hash. */ diff --git a/nx_secure/src/nx_secure_tls_process_handshake_header.c b/nx_secure/src/nx_secure_tls_process_handshake_header.c index c8dcab94..b28a398e 100644 --- a/nx_secure/src/nx_secure_tls_process_handshake_header.c +++ b/nx_secure/src/nx_secure_tls_process_handshake_header.c @@ -31,7 +31,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_process_handshake_header PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -67,6 +67,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_process_handshake_header(UCHAR *packet_buffer, USHORT *message_type, diff --git a/nx_secure/src/nx_secure_tls_process_header.c b/nx_secure/src/nx_secure_tls_process_header.c index ec58188e..bfd8b281 100644 --- a/nx_secure/src/nx_secure_tls_process_header.c +++ b/nx_secure/src/nx_secure_tls_process_header.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_process_header PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,9 +68,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* supported chained packet, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_process_header(NX_SECURE_TLS_SESSION *tls_session, NX_PACKET *packet_ptr, diff --git a/nx_secure/src/nx_secure_tls_process_newsessionticket.c b/nx_secure/src/nx_secure_tls_process_newsessionticket.c index 4e5ac140..aa197e72 100644 --- a/nx_secure/src/nx_secure_tls_process_newsessionticket.c +++ b/nx_secure/src/nx_secure_tls_process_newsessionticket.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_process_newsessionticket PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -63,6 +63,10 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* fixed compiler warnings, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if (NX_SECURE_TLS_TLS_1_3_ENABLED) @@ -70,14 +74,11 @@ UINT _nx_secure_tls_process_newsessionticket(NX_SECURE_TLS_SESSION *tls_session, UINT message_length) { UINT status = NX_SUCCESS; -UINT length; UINT lifetime; -UINT age_add; UINT nonce; UINT nonce_len; UINT ticket_len; UCHAR *ticket; -UINT extensions_len; UINT psk_count; NX_SECURE_TLS_PSK_STORE *ticket_psk; @@ -144,10 +145,6 @@ NX_SECURE_TLS_PSK_STORE *ticket_psk; */ - NX_PARAMETER_NOT_USED(tls_session); - - length = 0; - /* Get a PSK entry into which we can copy the ticket data we received. */ psk_count = tls_session->nx_secure_tls_credentials.nx_secure_tls_psk_count; psk_count++; @@ -170,8 +167,7 @@ NX_SECURE_TLS_PSK_STORE *ticket_psk; /* Save the lifetime of the ticket. */ ticket_psk->nx_secure_tls_psk_ticket_lifetime = lifetime; - /* Get the age add value. */ - age_add = (UINT)((packet_buffer[0] << 24) + (packet_buffer[1] << 16) + (packet_buffer[2] << 8) + packet_buffer[3]);; + /* Skip the age add value. */ packet_buffer = &packet_buffer[4]; /* Get the nonce length. */ @@ -199,12 +195,9 @@ NX_SECURE_TLS_PSK_STORE *ticket_psk; packet_buffer = &packet_buffer[ticket_len]; /* Copy ticket to PSK store - the ticket is the PSK ID used to identify the PSK in the future. */ - NX_SECURE_MEMCPY(ticket_psk->nx_secure_tls_psk_id, ticket, ticket_len); + NX_SECURE_MEMCPY(ticket_psk->nx_secure_tls_psk_id, ticket, ticket_len); /* Use case of memcpy is verified. */ ticket_psk->nx_secure_tls_psk_id_size = ticket_len; - /* Add in extensions if available. */ - extensions_len = (USHORT)((packet_buffer[0] << 8) + packet_buffer[1]); - /* We can now generate the PSK for this session using our ticket nonce and the cryptographic secrets we created earlier in the handshake. */ status = _nx_secure_tls_1_3_session_psk_generate(tls_session, ticket_psk, (UCHAR *)nonce, nonce_len); diff --git a/nx_secure/src/nx_secure_tls_process_record.c b/nx_secure/src/nx_secure_tls_process_record.c index 3b950328..113819d0 100644 --- a/nx_secure/src/nx_secure_tls_process_record.c +++ b/nx_secure/src/nx_secure_tls_process_record.c @@ -31,7 +31,7 @@ static VOID _nx_secure_tls_packet_trim(NX_PACKET *packet_ptr); /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_process_record PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -80,10 +80,10 @@ static VOID _nx_secure_tls_packet_trim(NX_PACKET *packet_ptr); /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* supported chained packet, */ /* fixed compiler warnings, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_process_record(NX_SECURE_TLS_SESSION *tls_session, NX_PACKET *packet_ptr, @@ -491,7 +491,7 @@ NX_PACKET *decrypted_packet; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_packet_trim PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -520,7 +520,7 @@ NX_PACKET *decrypted_packet; /* */ /* DATE NAME DESCRIPTION */ /* */ -/* 08-14-2020 Timothy Stapko Initial Version 6.0.2 */ +/* 09-30-2020 Timothy Stapko Initial Version 6.1 */ /* */ /**************************************************************************/ static VOID _nx_secure_tls_packet_trim(NX_PACKET *packet_ptr) diff --git a/nx_secure/src/nx_secure_tls_process_remote_certificate.c b/nx_secure/src/nx_secure_tls_process_remote_certificate.c index 4d00d23a..929a3b6a 100644 --- a/nx_secure/src/nx_secure_tls_process_remote_certificate.c +++ b/nx_secure/src/nx_secure_tls_process_remote_certificate.c @@ -31,7 +31,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_process_remote_certificate PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -49,6 +49,7 @@ /* tls_session TLS control block */ /* packet_buffer Pointer to message data */ /* message_length Length of message data (bytes)*/ +/* data_length Length of packet buffer */ /* */ /* OUTPUT */ /* */ @@ -75,10 +76,16 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* fixed certificate buffer */ +/* allocation, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_process_remote_certificate(NX_SECURE_TLS_SESSION *tls_session, - UCHAR *packet_buffer, UINT message_length) + UCHAR *packet_buffer, UINT message_length, + UINT data_length) { UINT length; UINT total_length; @@ -92,7 +99,7 @@ UINT bytes_processed; UINT extensions_length; #endif UCHAR *cert_buffer; -ULONG cert_buf_size; +ULONG cert_buf_size; /* Structure: @@ -120,11 +127,17 @@ ULONG cert_buf_size; | Packet buffer | Certificate buffer | |<-----------data------------------>|--> free space <--| Endpoint Cert 1 | X.509 | */ + + if (data_length > tls_session -> nx_secure_tls_packet_buffer_size) + { + return(NX_SECURE_TLS_PACKET_BUFFER_TOO_SMALL); + } + /* Certificate buffer is at the end of the record in the record assembly buffer. */ - cert_buffer = &tls_session->nx_secure_tls_packet_buffer[message_length]; + cert_buffer = &tls_session->nx_secure_tls_packet_buffer[data_length]; /* The size of the buffer is the remaining space in the record assembly buffer. */ - cert_buf_size = tls_session -> nx_secure_tls_packet_buffer_size - message_length; + cert_buf_size = tls_session -> nx_secure_tls_packet_buffer_size - data_length; /* Use our length as an index into the buffer. */ length = 0; @@ -191,6 +204,7 @@ ULONG cert_buf_size; /* Get space for the parsing structure. */ cert_buf_size -= sizeof(NX_SECURE_X509_CERT); certificate = (NX_SECURE_X509_CERT*)(&cert_buffer[cert_buf_size]); + NX_SECURE_MEMSET(certificate, 0, sizeof(NX_SECURE_X509_CERT)); /* Point structure to certificate being parsed. Note that the certificate structure points directly into the packet buffer where the certificate @@ -210,7 +224,7 @@ ULONG cert_buf_size; /* Copy the certificate from the packet buffer into our allocated certificate space. */ certificate -> nx_secure_x509_certificate_raw_data_length = cert_length; - NX_SECURE_MEMCPY(certificate -> nx_secure_x509_certificate_raw_data, &packet_buffer[length], cert_length); + NX_SECURE_MEMCPY(certificate -> nx_secure_x509_certificate_raw_data, &packet_buffer[length], cert_length); /* Use case of memcpy is verified. */ } length += cert_length; @@ -317,23 +331,26 @@ ULONG cert_buf_size; if (status != NX_SUCCESS) { /* No remote certificates added. Instead try extracting space from packet buffer. */ - cert_buffer = &tls_session->nx_secure_tls_packet_buffer[message_length]; - cert_buf_size = tls_session->nx_secure_tls_packet_buffer_size - message_length; + cert_buffer = &tls_session -> nx_secure_tls_packet_buffer[data_length]; + cert_buf_size = tls_session -> nx_secure_tls_packet_buffer_size - data_length; - if(cert_buf_size < sizeof(NX_SECURE_X509_CERT)) + if (cert_buf_size < sizeof(NX_SECURE_X509_CERT)) { + /* Not enough space to allocate the X.509 structure. */ - return(NX_SECURE_TLS_INSUFFICIENT_CERT_SPACE); + return(NX_SECURE_TLS_INSUFFICIENT_CERT_SPACE); } /* Get space for the parsing structure. */ cert_buf_size -= sizeof(NX_SECURE_X509_CERT); certificate = (NX_SECURE_X509_CERT*)(&cert_buffer[cert_buf_size]); + NX_SECURE_MEMSET(certificate, 0, sizeof(NX_SECURE_X509_CERT)); if(cert_buf_size < endpoint_length) { + /* Not enough space to allocate the raw certificate data. */ - return(NX_SECURE_TLS_INSUFFICIENT_CERT_SPACE); + return(NX_SECURE_TLS_INSUFFICIENT_CERT_SPACE); } /* Allocate space for the endpoint certificate. */ @@ -344,12 +361,12 @@ ULONG cert_buf_size; certificate -> nx_secure_x509_certificate_raw_buffer_size = endpoint_length; /* Update total remaining size. */ - tls_session->nx_secure_tls_packet_buffer_size -= cert_buf_size; + tls_session -> nx_secure_tls_packet_buffer_size -= (sizeof(NX_SECURE_X509_CERT) + endpoint_length); } /* Copy the certificate data to the end of the certificate buffer or use an allocated certificate. */ certificate -> nx_secure_x509_certificate_raw_data_length = endpoint_length; - NX_SECURE_MEMCPY(certificate->nx_secure_x509_certificate_raw_data, endpoint_raw_ptr, endpoint_length); + NX_SECURE_MEMCPY(certificate->nx_secure_x509_certificate_raw_data, endpoint_raw_ptr, endpoint_length); /* Use case of memcpy is verified. */ /* Release the protection. */ tx_mutex_put(&_nx_secure_tls_protection); diff --git a/nx_secure/src/nx_secure_tls_process_server_key_exchange.c b/nx_secure/src/nx_secure_tls_process_server_key_exchange.c index ce7754e7..9e5494b6 100644 --- a/nx_secure/src/nx_secure_tls_process_server_key_exchange.c +++ b/nx_secure/src/nx_secure_tls_process_server_key_exchange.c @@ -38,7 +38,7 @@ static UCHAR decrypted_signature[512]; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_process_server_key_exchange PORTABLE C */ -/* 6.0.1 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -80,9 +80,10 @@ static UCHAR decrypted_signature[512]; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), update */ +/* 09-30-2020 Timothy Stapko Modified comment(s), update */ /* ECC find curve method, */ -/* resulting in version 6.0.1 */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_process_server_key_exchange(NX_SECURE_TLS_SESSION *tls_session, @@ -159,7 +160,7 @@ UINT i; /* Extract the identity hint and save in the TLS Session. Then when pre-master is generated in client_handshake, we can do the right thing... */ - NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_credentials.nx_secure_tls_remote_psk_id, &packet_buffer[0], length); + NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_credentials.nx_secure_tls_remote_psk_id, &packet_buffer[0], length); /* Use case of memcpy is verified. */ tls_session -> nx_secure_tls_credentials.nx_secure_tls_remote_psk_id_size = length; return(NX_SECURE_TLS_SUCCESS); diff --git a/nx_secure/src/nx_secure_tls_process_serverhello.c b/nx_secure/src/nx_secure_tls_process_serverhello.c index 9248348c..f2ac0688 100644 --- a/nx_secure/src/nx_secure_tls_process_serverhello.c +++ b/nx_secure/src/nx_secure_tls_process_serverhello.c @@ -32,7 +32,7 @@ extern const UCHAR _nx_secure_tls_hello_retry_request_random[32]; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_process_serverhello PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -73,12 +73,11 @@ extern const UCHAR _nx_secure_tls_hello_retry_request_random[32]; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), added */ +/* 09-30-2020 Timothy Stapko Modified comment(s), added */ /* priority ciphersuite logic, */ -/* resulting in version 6.0.1 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), added */ +/* verified memcpy use cases, */ /* fixed renegotiation bug, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_process_serverhello(NX_SECURE_TLS_SESSION *tls_session, UCHAR *packet_buffer, @@ -160,7 +159,7 @@ NX_SECURE_TLS_SERVER_STATE old_client_state = tls_session -> nx_secur { /* Set the Server random data, used in key generation. First 4 bytes is GMT time. */ - NX_SECURE_MEMCPY(&tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_random[0], &packet_buffer[length], NX_SECURE_TLS_RANDOM_SIZE); + NX_SECURE_MEMCPY(&tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_random[0], &packet_buffer[length], NX_SECURE_TLS_RANDOM_SIZE); /* Use case of memcpy is verified. */ } length += NX_SECURE_TLS_RANDOM_SIZE; @@ -176,7 +175,7 @@ NX_SECURE_TLS_SERVER_STATE old_client_state = tls_session -> nx_secur /* Session ID follows. */ if (tls_session -> nx_secure_tls_session_id_length > 0) { - NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_session_id, &packet_buffer[length], tls_session -> nx_secure_tls_session_id_length); + NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_session_id, &packet_buffer[length], tls_session -> nx_secure_tls_session_id_length); /* Use case of memcpy is verified. */ length += tls_session -> nx_secure_tls_session_id_length; } diff --git a/nx_secure/src/nx_secure_tls_process_serverhello_extensions.c b/nx_secure/src/nx_secure_tls_process_serverhello_extensions.c index f6acc4dc..7e2d9f97 100644 --- a/nx_secure/src/nx_secure_tls_process_serverhello_extensions.c +++ b/nx_secure/src/nx_secure_tls_process_serverhello_extensions.c @@ -56,7 +56,7 @@ static UINT _nx_secure_tls_proc_serverhello_ecjpake_key_kp_pair(NX_SECURE_TLS_SE /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_process_serverhello_extensions PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -99,9 +99,9 @@ static UINT _nx_secure_tls_proc_serverhello_ecjpake_key_kp_pair(NX_SECURE_TLS_SE /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* fixed renegotiation bug, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_process_serverhello_extensions(NX_SECURE_TLS_SESSION *tls_session, @@ -371,7 +371,7 @@ USHORT supported_version = tls_session -> nx_secu /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_proc_serverhello_ecc_point_formats PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -406,6 +406,8 @@ USHORT supported_version = tls_session -> nx_secu /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #ifdef NX_SECURE_ENABLE_ECJPAKE_CIPHERSUITE @@ -473,7 +475,7 @@ UINT offset; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_proc_serverhello_ecjpake_key_kp_pair PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -508,6 +510,8 @@ UINT offset; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #ifdef NX_SECURE_ENABLE_ECJPAKE_CIPHERSUITE @@ -562,7 +566,7 @@ NX_CRYPTO_METHOD *crypto_method; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_proc_serverhello_sec_reneg_extension PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -598,9 +602,9 @@ NX_CRYPTO_METHOD *crypto_method; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* fixed renegotiation bug, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #ifndef NX_SECURE_TLS_DISABLE_SECURE_RENEGOTIATION @@ -736,7 +740,7 @@ INT compare_value; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_proc_serverhello_keyshare_extension PORTABLE C */ -/* 6.0.1 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -770,9 +774,9 @@ INT compare_value; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), update */ +/* 09-30-2020 Timothy Stapko Modified comment(s), update */ /* ECC find curve method, */ -/* resulting in version 6.0.1 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if (NX_SECURE_TLS_TLS_1_3_ENABLED) @@ -981,7 +985,7 @@ NX_SECURE_TLS_ECC *ecc_info; /* */ /* _nx_secure_tls_proc_serverhello_supported_versions_extension */ /* PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -1017,6 +1021,8 @@ NX_SECURE_TLS_ECC *ecc_info; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_tls_proc_serverhello_supported_versions_extension(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_protocol_version_get.c b/nx_secure/src/nx_secure_tls_protocol_version_get.c index a83adf72..baf9c1e1 100644 --- a/nx_secure/src/nx_secure_tls_protocol_version_get.c +++ b/nx_secure/src/nx_secure_tls_protocol_version_get.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_protocol_version_get PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -67,6 +67,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ VOID _nx_secure_tls_protocol_version_get(NX_SECURE_TLS_SESSION *session_ptr, diff --git a/nx_secure/src/nx_secure_tls_psk_add.c b/nx_secure/src/nx_secure_tls_psk_add.c index bcd7a3af..165acfd0 100644 --- a/nx_secure/src/nx_secure_tls_psk_add.c +++ b/nx_secure/src/nx_secure_tls_psk_add.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_psk_add PORTABLE C */ -/* 6.0.1 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,9 +68,10 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), improved */ +/* 09-30-2020 Timothy Stapko Modified comment(s), improved */ /* buffer length verification, */ -/* resulting in version 6.0.1 */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if defined(NX_SECURE_ENABLE_PSK_CIPHERSUITES) || defined(NX_SECURE_ENABLE_ECJPAKE_CIPHERSUITE) @@ -93,15 +94,15 @@ UINT current_index; hint_length <= NX_SECURE_TLS_MAX_PSK_ID_SIZE) { /* Save off the PSK and its length. */ - NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_credentials.nx_secure_tls_psk_store[current_index].nx_secure_tls_psk_data, pre_shared_key, psk_length); + NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_credentials.nx_secure_tls_psk_store[current_index].nx_secure_tls_psk_data, pre_shared_key, psk_length); /* Use case of memcpy is verified. */ tls_session -> nx_secure_tls_credentials.nx_secure_tls_psk_store[current_index].nx_secure_tls_psk_data_size = psk_length; /* Save off the identity and its length. */ - NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_credentials.nx_secure_tls_psk_store[current_index].nx_secure_tls_psk_id, psk_identity, identity_length); + NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_credentials.nx_secure_tls_psk_store[current_index].nx_secure_tls_psk_id, psk_identity, identity_length); /* Use case of memcpy is verified. */ tls_session -> nx_secure_tls_credentials.nx_secure_tls_psk_store[current_index].nx_secure_tls_psk_id_size = identity_length; /* Save off the identity and its length. */ - NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_credentials.nx_secure_tls_psk_store[current_index].nx_secure_tls_psk_id_hint, hint, hint_length); + NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_credentials.nx_secure_tls_psk_store[current_index].nx_secure_tls_psk_id_hint, hint, hint_length); /* Use case of memcpy is verified. */ tls_session -> nx_secure_tls_credentials.nx_secure_tls_psk_store[current_index].nx_secure_tls_psk_id_hint_size = hint_length; /* Increment the session counter. */ diff --git a/nx_secure/src/nx_secure_tls_psk_binder_generate.c b/nx_secure/src/nx_secure_tls_psk_binder_generate.c index 781dfdea..aa055570 100644 --- a/nx_secure/src/nx_secure_tls_psk_binder_generate.c +++ b/nx_secure/src/nx_secure_tls_psk_binder_generate.c @@ -57,7 +57,7 @@ UINT i; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_psk_binder_generate PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -92,6 +92,8 @@ UINT i; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if (NX_SECURE_TLS_TLS_1_3_ENABLED) diff --git a/nx_secure/src/nx_secure_tls_psk_find.c b/nx_secure/src/nx_secure_tls_psk_find.c index ee002818..fabdda8f 100644 --- a/nx_secure/src/nx_secure_tls_psk_find.c +++ b/nx_secure/src/nx_secure_tls_psk_find.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_psk_find PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -69,6 +69,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if defined(NX_SECURE_ENABLE_PSK_CIPHERSUITES) || defined(NX_SECURE_ENABLE_ECJPAKE_CIPHERSUITE) diff --git a/nx_secure/src/nx_secure_tls_psk_identity_find.c b/nx_secure/src/nx_secure_tls_psk_identity_find.c index a633cb6b..a3f1bc42 100644 --- a/nx_secure/src/nx_secure_tls_psk_identity_find.c +++ b/nx_secure/src/nx_secure_tls_psk_identity_find.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_psk_find PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -69,6 +69,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if (NX_SECURE_TLS_TLS_1_3_ENABLED) && defined(NX_SECURE_ENABLE_PSK_CIPHERSUITES) diff --git a/nx_secure/src/nx_secure_tls_record_hash_calculate.c b/nx_secure/src/nx_secure_tls_record_hash_calculate.c index 9d19591c..50f1f2d4 100644 --- a/nx_secure/src/nx_secure_tls_record_hash_calculate.c +++ b/nx_secure/src/nx_secure_tls_record_hash_calculate.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_record_hash_calculate PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -63,6 +63,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_record_hash_calculate(NX_SECURE_TLS_SESSION *tls_session, UCHAR *record_hash, diff --git a/nx_secure/src/nx_secure_tls_record_hash_initialize.c b/nx_secure/src/nx_secure_tls_record_hash_initialize.c index 6df90726..d446637c 100644 --- a/nx_secure/src/nx_secure_tls_record_hash_initialize.c +++ b/nx_secure/src/nx_secure_tls_record_hash_initialize.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_record_hash_initialize PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -67,6 +67,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_record_hash_initialize(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_record_hash_update.c b/nx_secure/src/nx_secure_tls_record_hash_update.c index 13e7ef6a..370d6e9e 100644 --- a/nx_secure/src/nx_secure_tls_record_hash_update.c +++ b/nx_secure/src/nx_secure_tls_record_hash_update.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_record_hash_update PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -62,6 +62,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_record_hash_update(NX_SECURE_TLS_SESSION *tls_session, UCHAR *data, UINT length) diff --git a/nx_secure/src/nx_secure_tls_record_payload_decrypt.c b/nx_secure/src/nx_secure_tls_record_payload_decrypt.c index 18081416..8918181a 100644 --- a/nx_secure/src/nx_secure_tls_record_payload_decrypt.c +++ b/nx_secure/src/nx_secure_tls_record_payload_decrypt.c @@ -49,7 +49,7 @@ extern UCHAR _nx_secure_tls_record_block_buffer[NX_SECURE_TLS_MAX_CIPHER_BLOCK_S /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_record_payload_decrypt PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -96,12 +96,11 @@ extern UCHAR _nx_secure_tls_record_block_buffer[NX_SECURE_TLS_MAX_CIPHER_BLOCK_S /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), fixed */ +/* 09-30-2020 Timothy Stapko Modified comment(s), fixed */ /* AES-CBC padding oracle, */ -/* resulting in version 6.0.1 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), fixed */ +/* verified memcpy use cases, */ /* supported chained packet, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_record_payload_decrypt(NX_SECURE_TLS_SESSION *tls_session, NX_PACKET *encrypted_packet, @@ -195,7 +194,7 @@ UCHAR nonce[13]; nonce[0] = 12; /* Copy client_write_IV or server_write_IV. */ - NX_SECURE_MEMCPY(&nonce[1], iv, 12); + NX_SECURE_MEMCPY(&nonce[1], iv, 12); /* Use case of memcpy is verified. */ /* Correct the endianness of our sequence number and XOR with * the IV. Pad to the left with zeroes. */ @@ -265,7 +264,7 @@ UCHAR nonce[13]; nonce[0] = 12; /* Copy client_write_IV or server_write_IV. */ - NX_SECURE_MEMCPY(&nonce[1], iv, 4); + NX_SECURE_MEMCPY(&nonce[1], iv, 4); /* Use case of memcpy is verified. */ /* Correct the endianness of our sequence number before hashing. */ additional_data[0] = (UCHAR)(sequence_num[1] >> 24); @@ -487,7 +486,7 @@ UCHAR nonce[13]; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_record_chained_packet_decrypt PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -532,7 +531,7 @@ UCHAR nonce[13]; /* */ /* DATE NAME DESCRIPTION */ /* */ -/* 08-14-2020 Timothy Stapko Initial Version 6.0.2 */ +/* 09-30-2020 Timothy Stapko Initial Version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_tls_record_chained_packet_decrypt(NX_SECURE_TLS_SESSION *tls_session, @@ -691,7 +690,7 @@ const NX_CRYPTO_METHOD *session_cipher_method; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_record_packet_decrypt PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -735,7 +734,7 @@ const NX_CRYPTO_METHOD *session_cipher_method; /* */ /* DATE NAME DESCRIPTION */ /* */ -/* 08-14-2020 Timothy Stapko Initial Version 6.0.2 */ +/* 09-30-2020 Timothy Stapko Initial Version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_tls_record_packet_decrypt(NX_SECURE_TLS_SESSION *tls_session, @@ -876,7 +875,7 @@ UINT original_offset = offset; if (session_cipher_method -> nx_crypto_operation == NX_NULL) { - NX_SECURE_MEMCPY(output, input, length); + NX_SECURE_MEMCPY(output, input, length); /* Use case of memcpy is verified. */ } else { @@ -918,7 +917,7 @@ UINT original_offset = offset; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_data_decrypt PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -952,7 +951,7 @@ UINT original_offset = offset; /* */ /* DATE NAME DESCRIPTION */ /* */ -/* 08-14-2020 Timothy Stapko Initial Version 6.0.2 */ +/* 09-30-2020 Timothy Stapko Initial Version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_tls_data_decrypt(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_record_payload_encrypt.c b/nx_secure/src/nx_secure_tls_record_payload_encrypt.c index f279e636..7552ea87 100644 --- a/nx_secure/src/nx_secure_tls_record_payload_encrypt.c +++ b/nx_secure/src/nx_secure_tls_record_payload_encrypt.c @@ -36,7 +36,7 @@ UCHAR _nx_secure_tls_record_block_buffer[NX_SECURE_TLS_MAX_CIPHER_BLOCK_SIZE]; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_record_payload_encrypt PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -72,10 +72,11 @@ UCHAR _nx_secure_tls_record_block_buffer[NX_SECURE_TLS_MAX_CIPHER_BLOCK_SIZE]; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ /* fixed data copy in chained */ /* packet, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_record_payload_encrypt(NX_SECURE_TLS_SESSION *tls_session, NX_PACKET *send_packet, @@ -193,7 +194,7 @@ VOID *crypto_method_metadata; /* New IV is the last encrypted block of the output. */ NX_SECURE_MEMCPY(iv, ¤t_packet -> nx_packet_prepend_ptr[current_length + data_offset - iv_size], - iv_size); + iv_size); /* Use case of memcpy is verified. */ } } } @@ -251,7 +252,7 @@ VOID *crypto_method_metadata; /* Offset for remainder bytes is rounded_length + data_offset. */ NX_SECURE_MEMCPY(&_nx_secure_tls_record_block_buffer[0], ¤t_packet -> nx_packet_prepend_ptr[rounded_length + data_offset], - remainder_length); + remainder_length); /* Use case of memcpy is verified. */ copy_length = (ULONG)(current_packet -> nx_packet_next -> nx_packet_append_ptr - current_packet -> nx_packet_next -> nx_packet_prepend_ptr); if (copy_length > (ULONG)(block_size - remainder_length)) @@ -260,7 +261,7 @@ VOID *crypto_method_metadata; } NX_SECURE_MEMCPY(&_nx_secure_tls_record_block_buffer[remainder_length], current_packet -> nx_packet_next -> nx_packet_prepend_ptr, - copy_length); + copy_length); /* Use case of memcpy is verified. */ /* Encrypt the remainder block. */ status = session_cipher_method -> nx_crypto_operation(NX_CRYPTO_ENCRYPT_UPDATE, @@ -288,17 +289,17 @@ VOID *crypto_method_metadata; /* Copy data from temporary buffer back into packets. */ NX_SECURE_MEMCPY(¤t_packet -> nx_packet_prepend_ptr[rounded_length + data_offset], - &_nx_secure_tls_record_block_buffer[0], remainder_length); + &_nx_secure_tls_record_block_buffer[0], remainder_length); /* Use case of memcpy is verified. */ NX_SECURE_MEMCPY(current_packet -> nx_packet_next -> nx_packet_prepend_ptr, &_nx_secure_tls_record_block_buffer[remainder_length], - copy_length); + copy_length); /* Use case of memcpy is verified. */ /* CBC-mode ciphers need to have their IV's updated after encryption. */ if (session_cipher_method -> nx_crypto_algorithm == NX_CRYPTO_ENCRYPTION_AES_CBC) { /* New IV is the last encrypted block of the output. */ - NX_SECURE_MEMCPY(iv, &_nx_secure_tls_record_block_buffer, iv_size); + NX_SECURE_MEMCPY(iv, &_nx_secure_tls_record_block_buffer, iv_size); /* Use case of memcpy is verified. */ } #ifdef NX_SECURE_KEY_CLEAR @@ -365,7 +366,7 @@ VOID *crypto_method_metadata; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_record_data_encrypt_init PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -401,6 +402,9 @@ VOID *crypto_method_metadata; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_tls_record_data_encrypt_init(NX_SECURE_TLS_SESSION *tls_session, NX_PACKET *send_packet, @@ -488,7 +492,7 @@ UINT message_length; nonce[0] = 12; /* Copy client_write_IV or server_write_IV. */ - NX_SECURE_MEMCPY(&nonce[1], iv, 12); + NX_SECURE_MEMCPY(&nonce[1], iv, 12); /* Use case of memcpy is verified. */ /* Correct the endianness of our sequence number and XOR with * the IV. Pad to the left with zeroes. */ @@ -553,7 +557,7 @@ UINT message_length; nonce[0] = 12; /* Copy client_write_IV or server_write_IV. */ - NX_SECURE_MEMCPY(&nonce[1], iv, 4); + NX_SECURE_MEMCPY(&nonce[1], iv, 4); /* Use case of memcpy is verified. */ /* Correct the endianness of our sequence number before hashing. */ nonce[5] = (UCHAR)(sequence_num[1] >> 24); @@ -569,7 +573,7 @@ UINT message_length; TLSCompressed.version + TLSCompressed.length; */ message_length = send_packet -> nx_packet_length - 8; - NX_SECURE_MEMCPY(additional_data, &nonce[5], 8); + NX_SECURE_MEMCPY(additional_data, &nonce[5], 8); /* Use case of memcpy is verified. */ additional_data[8] = record_type; additional_data[9] = (UCHAR)(tls_session -> nx_secure_tls_protocol_version >> 8); additional_data[10] = (UCHAR)(tls_session -> nx_secure_tls_protocol_version); @@ -580,7 +584,7 @@ UINT message_length; additional_data_size = 13; /* Copy our IV into our data buffer at the head of the payload. */ - NX_SECURE_MEMCPY(send_packet -> nx_packet_prepend_ptr, &nonce[5], 8); + NX_SECURE_MEMCPY(send_packet -> nx_packet_prepend_ptr, &nonce[5], 8); /* Use case of memcpy is verified. */ *data_offset = 8; } @@ -633,7 +637,7 @@ UINT message_length; /* IV size is equal to the AES block size. Copy our IV into our data buffer at the head of the payload. */ - NX_SECURE_MEMCPY(send_packet -> nx_packet_prepend_ptr, iv, iv_size); + NX_SECURE_MEMCPY(send_packet -> nx_packet_prepend_ptr, iv, iv_size); /* Use case of memcpy is verified. */ *data_offset = iv_size; } diff --git a/nx_secure/src/nx_secure_tls_remote_certificate_allocate.c b/nx_secure/src/nx_secure_tls_remote_certificate_allocate.c index 0aab886b..b1f66e8c 100644 --- a/nx_secure/src/nx_secure_tls_remote_certificate_allocate.c +++ b/nx_secure/src/nx_secure_tls_remote_certificate_allocate.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_remote_certificate_allocate PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -78,6 +78,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_remote_certificate_allocate(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_remote_certificate_buffer_allocate.c b/nx_secure/src/nx_secure_tls_remote_certificate_buffer_allocate.c index 1f531729..9ce6508d 100644 --- a/nx_secure/src/nx_secure_tls_remote_certificate_buffer_allocate.c +++ b/nx_secure/src/nx_secure_tls_remote_certificate_buffer_allocate.c @@ -32,7 +32,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_remote_certificate_buffer_allocate PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -77,6 +77,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_remote_certificate_buffer_allocate(NX_SECURE_TLS_SESSION *tls_session, UINT certs_number, VOID *certificate_buffer, ULONG buffer_size) diff --git a/nx_secure/src/nx_secure_tls_remote_certificate_free.c b/nx_secure/src/nx_secure_tls_remote_certificate_free.c index 3b461c00..276f711a 100644 --- a/nx_secure/src/nx_secure_tls_remote_certificate_free.c +++ b/nx_secure/src/nx_secure_tls_remote_certificate_free.c @@ -32,7 +32,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_remote_certificate_free PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -71,9 +71,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), fixed */ +/* 09-30-2020 Timothy Stapko Modified comment(s), fixed */ /* certificate allocation bug, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_remote_certificate_free(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_remote_certificate_free_all.c b/nx_secure/src/nx_secure_tls_remote_certificate_free_all.c index 5a8c14b9..1315cbef 100644 --- a/nx_secure/src/nx_secure_tls_remote_certificate_free_all.c +++ b/nx_secure/src/nx_secure_tls_remote_certificate_free_all.c @@ -32,7 +32,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_remote_certificate_free_all PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -69,6 +69,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_remote_certificate_free_all(NX_SECURE_TLS_SESSION *tls_session) diff --git a/nx_secure/src/nx_secure_tls_remote_certificate_verify.c b/nx_secure/src/nx_secure_tls_remote_certificate_verify.c index e31690fb..8b0c8f2f 100644 --- a/nx_secure/src/nx_secure_tls_remote_certificate_verify.c +++ b/nx_secure/src/nx_secure_tls_remote_certificate_verify.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_remote_certificate_verify PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -72,6 +72,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_remote_certificate_verify(NX_SECURE_TLS_SESSION *tls_session) diff --git a/nx_secure/src/nx_secure_tls_send_alert.c b/nx_secure/src/nx_secure_tls_send_alert.c index 45479bd8..08a06133 100644 --- a/nx_secure/src/nx_secure_tls_send_alert.c +++ b/nx_secure/src/nx_secure_tls_send_alert.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_send_alert PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -73,6 +73,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ VOID _nx_secure_tls_send_alert(NX_SECURE_TLS_SESSION *tls_session, NX_PACKET *send_packet, diff --git a/nx_secure/src/nx_secure_tls_send_certificate.c b/nx_secure/src/nx_secure_tls_send_certificate.c index ace2129b..354495b7 100644 --- a/nx_secure/src/nx_secure_tls_send_certificate.c +++ b/nx_secure/src/nx_secure_tls_send_certificate.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_send_certificate PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -71,6 +71,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_send_certificate(NX_SECURE_TLS_SESSION *tls_session, NX_PACKET *send_packet, diff --git a/nx_secure/src/nx_secure_tls_send_certificate_request.c b/nx_secure/src/nx_secure_tls_send_certificate_request.c index 9ddf949c..a2ed8615 100644 --- a/nx_secure/src/nx_secure_tls_send_certificate_request.c +++ b/nx_secure/src/nx_secure_tls_send_certificate_request.c @@ -34,7 +34,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_send_certificate_request PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,6 +68,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_send_certificate_request(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_send_certificate_verify.c b/nx_secure/src/nx_secure_tls_send_certificate_verify.c index f504a3e1..a8d5c517 100644 --- a/nx_secure/src/nx_secure_tls_send_certificate_verify.c +++ b/nx_secure/src/nx_secure_tls_send_certificate_verify.c @@ -40,7 +40,7 @@ static const UCHAR _NX_SECURE_OID_SHA256[] = {0x30, 0x31, 0x30, 0x0d, 0x06, 0x09 /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_send_certificate_verify PORTABLE C */ -/* 6.0.1 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -84,9 +84,10 @@ static const UCHAR _NX_SECURE_OID_SHA256[] = {0x30, 0x31, 0x30, 0x0d, 0x06, 0x09 /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), update */ +/* 09-30-2020 Timothy Stapko Modified comment(s), update */ /* ECC find curve method, */ -/* resulting in version 6.0.1 */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_send_certificate_verify(NX_SECURE_TLS_SESSION *tls_session, @@ -235,16 +236,16 @@ NX_CRYPTO_EXTENDED_OUTPUT extended_output; if (tls_session -> nx_secure_tls_socket_type == NX_SECURE_TLS_SESSION_TYPE_CLIENT) { /* Copy in context string and 0-byte separator. */ - NX_SECURE_MEMCPY(&handshake_hash[64], client_context, 34); + NX_SECURE_MEMCPY(&handshake_hash[64], client_context, 34); /* Use case of memcpy is verified. */ } else { /* Copy in context string and 0-byte separator. */ - NX_SECURE_MEMCPY(&handshake_hash[64], server_context, 34); + NX_SECURE_MEMCPY(&handshake_hash[64], server_context, 34); /* Use case of memcpy is verified. */ } /* Copy in transcript hash. */ - NX_SECURE_MEMCPY(&handshake_hash[64 + 34], transcript_hash, 32); + NX_SECURE_MEMCPY(&handshake_hash[64 + 34], transcript_hash, 32); /* Use case of memcpy is verified. */ handshake_hash_length = 130; @@ -360,7 +361,7 @@ NX_CRYPTO_EXTENDED_OUTPUT extended_output; /* Copy over the handshake hash state into a local structure to do the intermediate calculation. */ NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_scratch, tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata, - tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata_size); + tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata_size); /* Use case of memcpy is verified. */ /* Use SHA-256 for now... */ hash_method = tls_session -> nx_secure_tls_crypto_table -> nx_secure_tls_handshake_hash_sha256_method; @@ -404,11 +405,11 @@ NX_CRYPTO_EXTENDED_OUTPUT extended_output; first, then MD5. */ NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_scratch, tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha1_metadata, - tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha1_metadata_size); + tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha1_metadata_size); /* Use case of memcpy is verified. */ NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_scratch + tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha1_metadata_size, tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_md5_metadata, - tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_md5_metadata_size); + tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_md5_metadata_size); /* Use case of memcpy is verified. */ /* Finalize the handshake message hashes that we started at the beginning of the handshake. */ hash_method = tls_session -> nx_secure_tls_crypto_table -> nx_secure_tls_handshake_hash_md5_method; @@ -539,10 +540,10 @@ NX_CRYPTO_EXTENDED_OUTPUT extended_output; working_ptr = &_nx_secure_padded_signature[data_size - signature_length]; /* Copy in the DER encoding. */ - NX_SECURE_MEMCPY(&working_ptr[0], _NX_SECURE_OID_SHA256, 19); + NX_SECURE_MEMCPY(&working_ptr[0], _NX_SECURE_OID_SHA256, 19); /* Use case of memcpy is verified. */ /* Now put the data into the padded buffer - must be at the end. */ - NX_SECURE_MEMCPY(&working_ptr[19], handshake_hash, 32); + NX_SECURE_MEMCPY(&working_ptr[19], handshake_hash, 32); /* Use case of memcpy is verified. */ } #endif @@ -578,7 +579,7 @@ NX_CRYPTO_EXTENDED_OUTPUT extended_output; working_ptr = &_nx_secure_padded_signature[data_size - signature_length]; /* Now put the data into the padded buffer - must be at the end. */ - NX_SECURE_MEMCPY(working_ptr, handshake_hash, 36); + NX_SECURE_MEMCPY(working_ptr, handshake_hash, 36); /* Use case of memcpy is verified. */ } #endif diff --git a/nx_secure/src/nx_secure_tls_send_changecipherspec.c b/nx_secure/src/nx_secure_tls_send_changecipherspec.c index 8e0d9706..45aa4f3d 100644 --- a/nx_secure/src/nx_secure_tls_send_changecipherspec.c +++ b/nx_secure/src/nx_secure_tls_send_changecipherspec.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_send_changecipherspec PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -65,6 +65,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_send_changecipherspec(NX_SECURE_TLS_SESSION *tls_session, NX_PACKET *send_packet) diff --git a/nx_secure/src/nx_secure_tls_send_client_key_exchange.c b/nx_secure/src/nx_secure_tls_send_client_key_exchange.c index 3e113da9..7515c441 100644 --- a/nx_secure/src/nx_secure_tls_send_client_key_exchange.c +++ b/nx_secure/src/nx_secure_tls_send_client_key_exchange.c @@ -32,7 +32,7 @@ static UCHAR _nx_secure_client_padded_pre_master[600]; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_send_client_key_exchange PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -72,6 +72,9 @@ static UCHAR _nx_secure_client_padded_pre_master[600]; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_send_client_key_exchange(NX_SECURE_TLS_SESSION *tls_session, @@ -123,7 +126,7 @@ NX_CRYPTO_EXTENDED_OUTPUT extended_output; return(NX_SECURE_TLS_PACKET_BUFFER_TOO_SMALL); } - NX_SECURE_MEMCPY(packet_buffer, tls_session -> nx_secure_tls_key_material.nx_secure_tls_new_key_material_data, data_size); + NX_SECURE_MEMCPY(packet_buffer, tls_session -> nx_secure_tls_key_material.nx_secure_tls_new_key_material_data, data_size); /* Use case of memcpy is verified. */ } else #endif /* NX_SECURE_ENABLE_ECC_CIPHERSUITE */ @@ -148,7 +151,7 @@ NX_CRYPTO_EXTENDED_OUTPUT extended_output; /* Send the PSK Identity string to the remote server along with its length. */ NX_SECURE_MEMCPY(encrypted_data_ptr, tls_session -> nx_secure_tls_credentials.nx_secure_tls_client_psk.nx_secure_tls_psk_id, - tls_session -> nx_secure_tls_credentials.nx_secure_tls_client_psk.nx_secure_tls_psk_id_size); + tls_session -> nx_secure_tls_credentials.nx_secure_tls_client_psk.nx_secure_tls_psk_id_size); /* Use case of memcpy is verified. */ /* Make sure our size is correct. */ data_size = tls_session -> nx_secure_tls_credentials.nx_secure_tls_client_psk.nx_secure_tls_psk_id_size; @@ -237,7 +240,7 @@ NX_CRYPTO_EXTENDED_OUTPUT extended_output; /* Now put the pre-master data into the padded buffer - must be at the end. */ NX_SECURE_MEMCPY(&_nx_secure_client_padded_pre_master[data_size - NX_SECURE_TLS_RSA_PREMASTER_SIZE], - tls_session -> nx_secure_tls_key_material.nx_secure_tls_pre_master_secret, NX_SECURE_TLS_RSA_PREMASTER_SIZE); + tls_session -> nx_secure_tls_key_material.nx_secure_tls_pre_master_secret, NX_SECURE_TLS_RSA_PREMASTER_SIZE); /* Use case of memcpy is verified. */ if (public_cipher_method -> nx_crypto_init != NX_NULL) { diff --git a/nx_secure/src/nx_secure_tls_send_clienthello.c b/nx_secure/src/nx_secure_tls_send_clienthello.c index 881cf0c8..43bc4fb0 100644 --- a/nx_secure/src/nx_secure_tls_send_clienthello.c +++ b/nx_secure/src/nx_secure_tls_send_clienthello.c @@ -38,7 +38,7 @@ UINT _nx_secure_tls_send_clienthello_psk_extension(NX_SECURE_TLS_SESSION *tls_se /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_send_clienthello PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -78,6 +78,9 @@ UINT _nx_secure_tls_send_clienthello_psk_extension(NX_SECURE_TLS_SESSION *tls_se /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_send_clienthello(NX_SECURE_TLS_SESSION *tls_session, NX_PACKET *send_packet) @@ -171,13 +174,13 @@ ULONG extension_length, total_extensions_length; gmt_time = tls_session -> nx_secure_tls_session_time_function(); } NX_CHANGE_ULONG_ENDIAN(gmt_time); - NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_random, (UCHAR *)&gmt_time, sizeof(gmt_time)); + NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_random, (UCHAR *)&gmt_time, sizeof(gmt_time)); /* Use case of memcpy is verified. */ #if (NX_SECURE_TLS_TLS_1_3_ENABLED) if (tls_session -> nx_secure_tls_client_state == NX_SECURE_TLS_CLIENT_STATE_HELLO_RETRY) { NX_SECURE_MEMCPY(&packet_buffer[length], tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_random, - sizeof(tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_random)); + sizeof(tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_random)); /* Use case of memcpy is verified. */ } else #endif @@ -195,7 +198,7 @@ ULONG extension_length, total_extensions_length; /* Copy the random data into the packet. */ NX_SECURE_MEMCPY(&packet_buffer[length], tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_random, - sizeof(tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_random)); + sizeof(tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_random)); /* Use case of memcpy is verified. */ } length += sizeof(tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_random); @@ -207,7 +210,7 @@ ULONG extension_length, total_extensions_length; /* Session ID follows. */ if (tls_session -> nx_secure_tls_session_id_length > 0) { - NX_SECURE_MEMCPY(&packet_buffer[length], tls_session -> nx_secure_tls_session_id, tls_session -> nx_secure_tls_session_id_length); + NX_SECURE_MEMCPY(&packet_buffer[length], tls_session -> nx_secure_tls_session_id, tls_session -> nx_secure_tls_session_id_length); /* Use case of memcpy is verified. */ length += tls_session -> nx_secure_tls_session_id_length; } diff --git a/nx_secure/src/nx_secure_tls_send_clienthello_extensions.c b/nx_secure/src/nx_secure_tls_send_clienthello_extensions.c index 7fa2775e..8184f830 100644 --- a/nx_secure/src/nx_secure_tls_send_clienthello_extensions.c +++ b/nx_secure/src/nx_secure_tls_send_clienthello_extensions.c @@ -82,7 +82,7 @@ static UINT _nx_secure_tls_send_clienthello_sec_reneg_extension(NX_SECURE_TLS_SE /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_send_clienthello_extensions PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -127,9 +127,10 @@ static UINT _nx_secure_tls_send_clienthello_sec_reneg_extension(NX_SECURE_TLS_SE /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ /* fixed renegotiation bug, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_send_clienthello_extensions(NX_SECURE_TLS_SESSION *tls_session, @@ -207,7 +208,7 @@ UINT status; length += 2; /* Add Cookie. */ - NX_SECURE_MEMCPY(&packet_buffer[length], tls_session -> nx_secure_tls_cookie, tls_session -> nx_secure_tls_cookie_length); + NX_SECURE_MEMCPY(&packet_buffer[length], tls_session -> nx_secure_tls_cookie, tls_session -> nx_secure_tls_cookie_length); /* Use case of memcpy is verified. */ length += (tls_session -> nx_secure_tls_cookie_length); /* Update total extensions length and reset the stored cookie length. */ @@ -268,7 +269,7 @@ UINT status; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_send_clienthello_sig_extension PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -304,6 +305,8 @@ UINT status; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_tls_send_clienthello_sig_extension(NX_SECURE_TLS_SESSION *tls_session, @@ -485,7 +488,7 @@ UCHAR sig_algo = 0; /* */ /* _nx_secure_tls_send_clienthello_supported_versions_extension */ /* PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -521,6 +524,8 @@ UCHAR sig_algo = 0; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if (NX_SECURE_TLS_TLS_1_3_ENABLED) @@ -618,7 +623,7 @@ INT i; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_send_clienthello_key_share_extension PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -654,6 +659,9 @@ INT i; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if (NX_SECURE_TLS_TLS_1_3_ENABLED) @@ -783,7 +791,7 @@ USHORT named_curve; offset += 2; /* Set the key data from our already-generated ECC keys. */ - NX_SECURE_MEMCPY(&packet_buffer[offset], &tls_session -> nx_secure_tls_key_material.nx_secure_tls_ecc_key_data[entry_index].nx_secure_tls_ecdhe_public_key[0], key_length); + NX_SECURE_MEMCPY(&packet_buffer[offset], &tls_session -> nx_secure_tls_key_material.nx_secure_tls_ecc_key_data[entry_index].nx_secure_tls_ecdhe_public_key[0], key_length); /* Use case of memcpy is verified. */ offset += (key_length); /* Get the length of the entire extension. */ @@ -818,7 +826,7 @@ USHORT named_curve; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_send_clienthello_psk_extension PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -854,6 +862,9 @@ USHORT named_curve; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ @@ -986,7 +997,7 @@ NX_SECURE_TLS_PSK_STORE *psk_store; offset += 2; /* Put the ID data into our packet. */ - NX_SECURE_MEMCPY(&packet_buffer[offset], id, id_len); + NX_SECURE_MEMCPY(&packet_buffer[offset], id, id_len); /* Use case of memcpy is verified. */ offset += (UINT)(id_len); /* Set the obfuscated PSK age. */ @@ -1062,7 +1073,7 @@ NX_SECURE_TLS_PSK_STORE *psk_store; /* Save the handshake hash state. */ NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_scratch, tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata, - tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata_size); + tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata_size); /* Use case of memcpy is verified. */ } /* Hash the ClientHello up to its current point. */ @@ -1086,7 +1097,7 @@ NX_SECURE_TLS_PSK_STORE *psk_store; { NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata, tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_scratch, - tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata_size); + tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata_size); /* Use case of memcpy is verified. */ } /* Loop through all IDs and set the binders accordingly. */ @@ -1125,7 +1136,7 @@ NX_SECURE_TLS_PSK_STORE *psk_store; offset += (UINT)(1); /* Put the binder data into the packet. */ - NX_SECURE_MEMCPY(&packet_buffer[offset], binder, binder_len); + NX_SECURE_MEMCPY(&packet_buffer[offset], binder, binder_len); /* Use case of memcpy is verified. */ offset += (UINT)(binder_len); /* Update our total with the binder length (binder_len) and length field(1). */ @@ -1156,7 +1167,7 @@ NX_SECURE_TLS_PSK_STORE *psk_store; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_send_clienthello_psk_kem_extension PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -1191,6 +1202,8 @@ NX_SECURE_TLS_PSK_STORE *psk_store; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if (NX_SECURE_TLS_TLS_1_3_ENABLED) @@ -1259,7 +1272,7 @@ USHORT length; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_send_clienthello_sni_extension PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -1296,6 +1309,9 @@ USHORT length; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #ifndef NX_SECURE_TLS_SNI_EXTENSION_DISABLED @@ -1389,7 +1405,7 @@ UINT data_length; offset += 2; /* Write the name into the packet. */ - NX_SECURE_MEMCPY(&packet_buffer[offset], tls_session -> nx_secure_tls_sni_extension_server_name -> nx_secure_x509_dns_name, data_length); + NX_SECURE_MEMCPY(&packet_buffer[offset], tls_session -> nx_secure_tls_sni_extension_server_name -> nx_secure_x509_dns_name, data_length); /* Use case of memcpy is verified. */ offset += data_length; /* Return the amount of data we wrote. */ @@ -1408,7 +1424,7 @@ UINT data_length; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_send_clienthello_sec_reneg_extension PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -1446,9 +1462,10 @@ UINT data_length; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ /* fixed renegotiation bug, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #ifndef NX_SECURE_TLS_DISABLE_SECURE_RENEGOTIATION @@ -1563,7 +1580,7 @@ UINT data_length; offset++; /* Copy the verify data into the packet. */ - NX_SECURE_MEMCPY(&packet_buffer[offset], tls_session -> nx_secure_tls_local_verify_data, NX_SECURE_TLS_FINISHED_HASH_SIZE); + NX_SECURE_MEMCPY(&packet_buffer[offset], tls_session -> nx_secure_tls_local_verify_data, NX_SECURE_TLS_FINISHED_HASH_SIZE); /* Use case of memcpy is verified. */ offset += NX_SECURE_TLS_FINISHED_HASH_SIZE; } @@ -1583,7 +1600,7 @@ UINT data_length; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_send_clienthello_sec_spf_extensions PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -1620,6 +1637,8 @@ UINT data_length; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #ifdef NX_SECURE_ENABLE_ECC_CIPHERSUITE diff --git a/nx_secure/src/nx_secure_tls_send_encrypted_extensions.c b/nx_secure/src/nx_secure_tls_send_encrypted_extensions.c index 3de7b42e..98327716 100644 --- a/nx_secure/src/nx_secure_tls_send_encrypted_extensions.c +++ b/nx_secure/src/nx_secure_tls_send_encrypted_extensions.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_send_encrypted_extensions PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -63,8 +63,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), update */ +/* 09-30-2020 Timothy Stapko Modified comment(s), update */ /* ciphersuite lookup method. */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_send_encrypted_extensions(NX_SECURE_TLS_SESSION *tls_session, NX_PACKET *send_packet) diff --git a/nx_secure/src/nx_secure_tls_send_finished.c b/nx_secure/src/nx_secure_tls_send_finished.c index fc295b05..22695b83 100644 --- a/nx_secure/src/nx_secure_tls_send_finished.c +++ b/nx_secure/src/nx_secure_tls_send_finished.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_send_finished PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -66,9 +66,10 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ /* fixed renegotiation bug, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_send_finished(NX_SECURE_TLS_SESSION *tls_session, NX_PACKET *send_packet) @@ -118,7 +119,7 @@ UINT is_server; #ifndef NX_SECURE_TLS_DISABLE_SECURE_RENEGOTIATION /* If we are doing secure renegotiation as per RFC 5746, we need to save off the generated verify data now. For TLS 1.0-1.2 this is 12 bytes. If SSLv3 is ever used, it will be 36 bytes. */ - NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_local_verify_data, send_packet -> nx_packet_append_ptr, NX_SECURE_TLS_FINISHED_HASH_SIZE); + NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_local_verify_data, send_packet -> nx_packet_append_ptr, NX_SECURE_TLS_FINISHED_HASH_SIZE); /* Use case of memcpy is verified. */ #endif /* The finished verify data is always 12 bytes for TLS 1.2 and earlier. */ diff --git a/nx_secure/src/nx_secure_tls_send_handshake_record.c b/nx_secure/src/nx_secure_tls_send_handshake_record.c index e61c5e9f..6576f020 100644 --- a/nx_secure/src/nx_secure_tls_send_handshake_record.c +++ b/nx_secure/src/nx_secure_tls_send_handshake_record.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_send_handshake_record PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -70,9 +70,10 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ /* released packet securely, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_send_handshake_record(NX_SECURE_TLS_SESSION *tls_session, @@ -138,7 +139,7 @@ UINT buffer_offset; #endif /* (NX_SECURE_TLS_TLS_1_3_ENABLED) */ { NX_SECURE_MEMCPY(&tls_session->nx_secure_tls_key_material.nx_secure_tls_handshake_cache[buffer_offset], - current_packet -> nx_packet_prepend_ptr, (UINT)length); + current_packet -> nx_packet_prepend_ptr, (UINT)length); /* Use case of memcpy is verified. */ /* Advance the length. */ buffer_offset += (UINT)length; diff --git a/nx_secure/src/nx_secure_tls_send_hellorequest.c b/nx_secure/src/nx_secure_tls_send_hellorequest.c index a7a0ec0e..4b6b7792 100644 --- a/nx_secure/src/nx_secure_tls_send_hellorequest.c +++ b/nx_secure/src/nx_secure_tls_send_hellorequest.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_send_hellorequest PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -64,9 +64,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* fixed renegotiation bug, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #ifndef NX_SECURE_TLS_DISABLE_SECURE_RENEGOTIATION diff --git a/nx_secure/src/nx_secure_tls_send_newsessionticket.c b/nx_secure/src/nx_secure_tls_send_newsessionticket.c index eb49f42a..e167a322 100644 --- a/nx_secure/src/nx_secure_tls_send_newsessionticket.c +++ b/nx_secure/src/nx_secure_tls_send_newsessionticket.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_send_newsessionticket PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -63,6 +63,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if (NX_SECURE_TLS_TLS_1_3_ENABLED) @@ -205,7 +208,7 @@ UCHAR *packet_buffer; length += 2; /* Copy in ticket. */ - NX_SECURE_MEMCPY(&packet_buffer[length], ticket, ticket_len); + NX_SECURE_MEMCPY(&packet_buffer[length], ticket, ticket_len); /* Use case of memcpy is verified. */ length += ticket_len; /* Add in extensions if available. */ diff --git a/nx_secure/src/nx_secure_tls_send_record.c b/nx_secure/src/nx_secure_tls_send_record.c index 37991350..a8ceff01 100644 --- a/nx_secure/src/nx_secure_tls_send_record.c +++ b/nx_secure/src/nx_secure_tls_send_record.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_send_record PORTABLE C */ -/* 6.0.1 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -80,10 +80,10 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), and */ +/* 09-30-2020 Timothy Stapko Modified comment(s), and */ /* fixed race condition for */ /* multithread transmission, */ -/* resulting in version 6.0.1 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_send_record(NX_SECURE_TLS_SESSION *tls_session, NX_PACKET *send_packet, diff --git a/nx_secure/src/nx_secure_tls_send_server_key_exchange.c b/nx_secure/src/nx_secure_tls_send_server_key_exchange.c index 1a88fd70..deb981c4 100644 --- a/nx_secure/src/nx_secure_tls_send_server_key_exchange.c +++ b/nx_secure/src/nx_secure_tls_send_server_key_exchange.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_send_server_key_exchange PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -65,6 +65,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_send_server_key_exchange(NX_SECURE_TLS_SESSION *tls_session, @@ -142,7 +145,7 @@ NX_SECURE_TLS_ECDHE_HANDSHAKE_DATA *ecdhe_data; length = (USHORT)(length + 2); /* Extract the identity hint and put it into the packet buffer. */ - NX_SECURE_MEMCPY(&packet_buffer[length], identity, identity_length); + NX_SECURE_MEMCPY(&packet_buffer[length], identity, identity_length); /* Use case of memcpy is verified. */ /* Advance our total length. */ length = (USHORT)(length + identity_length); diff --git a/nx_secure/src/nx_secure_tls_send_serverhello.c b/nx_secure/src/nx_secure_tls_send_serverhello.c index 04627083..66049bc8 100644 --- a/nx_secure/src/nx_secure_tls_send_serverhello.c +++ b/nx_secure/src/nx_secure_tls_send_serverhello.c @@ -47,7 +47,7 @@ const UCHAR _nx_secure_tls_1_1_random[8] = /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_send_serverhello PORTABLE C */ -/* 6.0.1 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -81,9 +81,10 @@ const UCHAR _nx_secure_tls_1_1_random[8] = /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), improved */ +/* 09-30-2020 Timothy Stapko Modified comment(s), improved */ /* buffer length verification, */ -/* resulting in version 6.0.1 */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_send_serverhello(NX_SECURE_TLS_SESSION *tls_session, NX_PACKET *send_packet) @@ -133,14 +134,14 @@ UINT status; } NX_CHANGE_ULONG_ENDIAN(gmt_time); - NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_random, (UCHAR *)&gmt_time, sizeof(gmt_time)); + NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_random, (UCHAR *)&gmt_time, sizeof(gmt_time)); /* Use case of memcpy is verified. */ #if (NX_SECURE_TLS_TLS_1_3_ENABLED) if (tls_session -> nx_secure_tls_server_state == NX_SECURE_TLS_SERVER_STATE_SEND_HELLO_RETRY) { NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_random, _nx_secure_tls_hello_retry_request_random, - sizeof(_nx_secure_tls_hello_retry_request_random)); + sizeof(_nx_secure_tls_hello_retry_request_random)); /* Use case of memcpy is verified. */ } else if (!(tls_session -> nx_secure_tls_1_3) && !(tls_session -> nx_secure_tls_protocol_version_override)) { @@ -161,13 +162,13 @@ UINT status; { NX_SECURE_MEMCPY(&(tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_random[24]), _nx_secure_tls_1_2_random, - sizeof(_nx_secure_tls_1_2_random)); + sizeof(_nx_secure_tls_1_2_random)); /* Use case of memcpy is verified. */ } else { NX_SECURE_MEMCPY(&(tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_random[24]), _nx_secure_tls_1_1_random, - sizeof(_nx_secure_tls_1_1_random)); + sizeof(_nx_secure_tls_1_1_random)); /* Use case of memcpy is verified. */ } } else @@ -187,7 +188,7 @@ UINT status; /* Copy the random data into the packet. */ NX_SECURE_MEMCPY(&packet_buffer[length], tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_random, - sizeof(tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_random)); + sizeof(tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_random)); /* Use case of memcpy is verified. */ length += sizeof(tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_random); /* Session ID length is one byte. Session ID data follows if we ever implement session resumption. */ @@ -208,7 +209,7 @@ UINT status; return(NX_SECURE_TLS_PACKET_BUFFER_TOO_SMALL); } - NX_SECURE_MEMCPY(&packet_buffer[length], tls_session -> nx_secure_tls_session_id, tls_session->nx_secure_tls_session_id_length); + NX_SECURE_MEMCPY(&packet_buffer[length], tls_session -> nx_secure_tls_session_id, tls_session->nx_secure_tls_session_id_length); /* Use case of memcpy is verified. */ length += tls_session->nx_secure_tls_session_id_length; } else diff --git a/nx_secure/src/nx_secure_tls_send_serverhello_extensions.c b/nx_secure/src/nx_secure_tls_send_serverhello_extensions.c index 9d45d741..0f5b2574 100644 --- a/nx_secure/src/nx_secure_tls_send_serverhello_extensions.c +++ b/nx_secure/src/nx_secure_tls_send_serverhello_extensions.c @@ -56,7 +56,7 @@ static UINT _nx_secure_tls_send_serverhello_psk_extension(NX_SECURE_TLS_SESSION /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_send_serverhello_extensions PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -93,9 +93,9 @@ static UINT _nx_secure_tls_send_serverhello_psk_extension(NX_SECURE_TLS_SESSION /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* fixed renegotiation bug, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_send_serverhello_extensions(NX_SECURE_TLS_SESSION *tls_session, @@ -219,7 +219,7 @@ UINT status = NX_SUCCESS; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_send_serverhello_sec_reneg_extension PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -256,10 +256,11 @@ UINT status = NX_SUCCESS; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), improved */ +/* 09-30-2020 Timothy Stapko Modified comment(s), improved */ /* buffer length verification, */ +/* verified memcpy use cases, */ /* fixed renegotiation bug, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #ifndef NX_SECURE_TLS_DISABLE_SECURE_RENEGOTIATION @@ -362,9 +363,9 @@ UINT data_length; offset++; /* Copy the verify data into the packet. */ - NX_SECURE_MEMCPY(&packet_buffer[offset], tls_session -> nx_secure_tls_remote_verify_data, NX_SECURE_TLS_FINISHED_HASH_SIZE); + NX_SECURE_MEMCPY(&packet_buffer[offset], tls_session -> nx_secure_tls_remote_verify_data, NX_SECURE_TLS_FINISHED_HASH_SIZE); /* Use case of memcpy is verified. */ offset += NX_SECURE_TLS_FINISHED_HASH_SIZE; - NX_SECURE_MEMCPY(&packet_buffer[offset], tls_session -> nx_secure_tls_local_verify_data, NX_SECURE_TLS_FINISHED_HASH_SIZE); + NX_SECURE_MEMCPY(&packet_buffer[offset], tls_session -> nx_secure_tls_local_verify_data, NX_SECURE_TLS_FINISHED_HASH_SIZE); /* Use case of memcpy is verified. */ offset += NX_SECURE_TLS_FINISHED_HASH_SIZE; } @@ -386,7 +387,7 @@ UINT data_length; /* */ /* _nx_secure_tls_send_clienthello_supported_versions_extension */ /* PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -422,6 +423,8 @@ UINT data_length; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if (NX_SECURE_TLS_TLS_1_3_ENABLED) @@ -487,7 +490,7 @@ UINT data_length; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_send_serverhello_key_share_extension PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -523,6 +526,9 @@ UINT data_length; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if (NX_SECURE_TLS_TLS_1_3_ENABLED) @@ -692,7 +698,7 @@ USHORT named_curve; offset += 2; /* Set the key data from our already-generated ECC keys. */ - NX_SECURE_MEMCPY(&packet_buffer[offset], &ecdhe_data->nx_secure_tls_ecdhe_public_key[0], key_length); + NX_SECURE_MEMCPY(&packet_buffer[offset], &ecdhe_data->nx_secure_tls_ecdhe_public_key[0], key_length); /* Use case of memcpy is verified. */ offset += (key_length); /* Get the length of the entire extension. */ @@ -718,7 +724,7 @@ USHORT named_curve; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_send_serverhello_psk_extension PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -754,6 +760,8 @@ USHORT named_curve; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ diff --git a/nx_secure/src/nx_secure_tls_server_certificate_add.c b/nx_secure/src/nx_secure_tls_server_certificate_add.c index 750a8134..b633d70a 100644 --- a/nx_secure/src/nx_secure_tls_server_certificate_add.c +++ b/nx_secure/src/nx_secure_tls_server_certificate_add.c @@ -32,7 +32,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_server_certificate_add PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -67,6 +67,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_server_certificate_add(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_server_certificate_find.c b/nx_secure/src/nx_secure_tls_server_certificate_find.c index 21f17fda..56386960 100644 --- a/nx_secure/src/nx_secure_tls_server_certificate_find.c +++ b/nx_secure/src/nx_secure_tls_server_certificate_find.c @@ -32,7 +32,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_server_certificate_find PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,6 +68,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_server_certificate_find(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_server_certificate_remove.c b/nx_secure/src/nx_secure_tls_server_certificate_remove.c index 9c53ea05..62ae5eb8 100644 --- a/nx_secure/src/nx_secure_tls_server_certificate_remove.c +++ b/nx_secure/src/nx_secure_tls_server_certificate_remove.c @@ -32,7 +32,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_server_certificate_remove PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -67,6 +67,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_server_certificate_remove(NX_SECURE_TLS_SESSION *tls_session, UINT cert_id) diff --git a/nx_secure/src/nx_secure_tls_server_handshake.c b/nx_secure/src/nx_secure_tls_server_handshake.c index 0e87e217..729410e2 100644 --- a/nx_secure/src/nx_secure_tls_server_handshake.c +++ b/nx_secure/src/nx_secure_tls_server_handshake.c @@ -31,7 +31,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_server_handshake PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -94,9 +94,11 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* released packet securely, */ -/* resulting in version 6.0.2 */ +/* fixed certificate buffer */ +/* allocation, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_server_handshake(NX_SECURE_TLS_SESSION *tls_session, UCHAR *packet_buffer, @@ -161,7 +163,7 @@ const NX_CRYPTO_METHOD *method_ptr = NX_NULL; #ifdef NX_SECURE_ENABLE_CLIENT_CERTIFICATE_VERIFY case NX_SECURE_TLS_CERTIFICATE_MSG: /* Client sent certificate message (in response to a request from us. Process it now. */ - status = _nx_secure_tls_process_remote_certificate(tls_session, packet_buffer, message_length); + status = _nx_secure_tls_process_remote_certificate(tls_session, packet_buffer, message_length, data_length); tls_session -> nx_secure_tls_server_state = NX_SECURE_TLS_SERVER_STATE_CLIENT_CERTIFICATE; break; case NX_SECURE_TLS_CERTIFICATE_VERIFY: diff --git a/nx_secure/src/nx_secure_tls_session_alert_value_get.c b/nx_secure/src/nx_secure_tls_session_alert_value_get.c index 89e5da41..9b66eeb1 100644 --- a/nx_secure/src/nx_secure_tls_session_alert_value_get.c +++ b/nx_secure/src/nx_secure_tls_session_alert_value_get.c @@ -32,7 +32,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_session_alert_value_get PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -65,6 +65,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_session_alert_value_get(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_session_certificate_callback_set.c b/nx_secure/src/nx_secure_tls_session_certificate_callback_set.c index 2b213511..225d100b 100644 --- a/nx_secure/src/nx_secure_tls_session_certificate_callback_set.c +++ b/nx_secure/src/nx_secure_tls_session_certificate_callback_set.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_session_certificate_callback_set PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -76,6 +76,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_session_certificate_callback_set(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_session_client_callback_set.c b/nx_secure/src/nx_secure_tls_session_client_callback_set.c index f736a8be..bb906551 100644 --- a/nx_secure/src/nx_secure_tls_session_client_callback_set.c +++ b/nx_secure/src/nx_secure_tls_session_client_callback_set.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_session_client_callback_set PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -64,6 +64,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_session_client_callback_set(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_session_client_verify_disable.c b/nx_secure/src/nx_secure_tls_session_client_verify_disable.c index d2d29b77..5fc916fe 100644 --- a/nx_secure/src/nx_secure_tls_session_client_verify_disable.c +++ b/nx_secure/src/nx_secure_tls_session_client_verify_disable.c @@ -32,7 +32,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_session_client_verify_disable PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,6 +68,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_session_client_verify_disable(NX_SECURE_TLS_SESSION *tls_session) diff --git a/nx_secure/src/nx_secure_tls_session_client_verify_enable.c b/nx_secure/src/nx_secure_tls_session_client_verify_enable.c index a4e4c36b..325a0079 100644 --- a/nx_secure/src/nx_secure_tls_session_client_verify_enable.c +++ b/nx_secure/src/nx_secure_tls_session_client_verify_enable.c @@ -32,7 +32,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_session_client_verify_enable PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -72,6 +72,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_session_client_verify_enable(NX_SECURE_TLS_SESSION *tls_session) diff --git a/nx_secure/src/nx_secure_tls_session_create.c b/nx_secure/src/nx_secure_tls_session_create.c index 26717849..2d1192d4 100644 --- a/nx_secure/src/nx_secure_tls_session_create.c +++ b/nx_secure/src/nx_secure_tls_session_create.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_session_create PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -70,6 +70,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_session_create(NX_SECURE_TLS_SESSION *session_ptr, diff --git a/nx_secure/src/nx_secure_tls_session_create_ext.c b/nx_secure/src/nx_secure_tls_session_create_ext.c index 68e7f5de..f5393c3e 100644 --- a/nx_secure/src/nx_secure_tls_session_create_ext.c +++ b/nx_secure/src/nx_secure_tls_session_create_ext.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_session_create_ext PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -76,14 +76,12 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), and */ +/* 09-30-2020 Timothy Stapko Modified comment(s), and */ /* fixed race condition for */ /* multithread transmission, */ -/* resulting in version 6.0.1 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), and */ /* added ECC initialization, */ /* fixed renegotiation bug, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ @@ -499,15 +497,30 @@ UINT supported_groups_bytes; #if (NX_SECURE_TLS_TLS_1_0_ENABLED || NX_SECURE_TLS_TLS_1_1_ENABLED) const NX_CRYPTO_METHOD *crypto_method_md5; const NX_CRYPTO_METHOD *crypto_method_sha1; +ULONG metadata_size_md5 = 0; +ULONG metadata_size_sha1 = 0; #endif #if (NX_SECURE_TLS_TLS_1_2_ENABLED) const NX_CRYPTO_METHOD *crypto_method_sha256; +ULONG metadata_size_sha256 = 0; #endif /* Get a working pointer to the metadata buffer. */ metadata_area = (CHAR*)metadata_buffer; + /* Check and adjust metadata for four byte alignment. */ + if (((ULONG)metadata_area) & 0x3) + { + if (metadata_size < 4 - (((ULONG)metadata_area) & 0x3)) + { + return(NX_SECURE_TLS_INSUFFICIENT_METADATA_SPACE); + } + + metadata_size -= 4 - (((ULONG)metadata_area) & 0x3); + metadata_area += 4 - (((ULONG)metadata_area) & 0x3); + } + if((crypto_array == NX_NULL) || (cipher_map == NX_NULL)) { @@ -638,9 +651,28 @@ const NX_CRYPTO_METHOD *crypto_method_sha256; #if (NX_SECURE_TLS_TLS_1_0_ENABLED || NX_SECURE_TLS_TLS_1_1_ENABLED) crypto_method_md5 = crypto_table -> nx_secure_tls_handshake_hash_md5_method; crypto_method_sha1 = crypto_table -> nx_secure_tls_handshake_hash_sha1_method; + metadata_size_md5 = crypto_method_md5 -> nx_crypto_metadata_area_size; + metadata_size_sha1 = crypto_method_sha1 -> nx_crypto_metadata_area_size; + + /* Align metadata size to four bytes. */ + if (metadata_size_md5 & 0x3) + { + metadata_size_md5 += 4 - (metadata_size_md5 & 0x3); + } + + if (metadata_size_sha1 & 0x3) + { + metadata_size_sha1 += 4 - (metadata_size_sha1 & 0x3); + } #endif #if (NX_SECURE_TLS_TLS_1_2_ENABLED) crypto_method_sha256 = crypto_table -> nx_secure_tls_handshake_hash_sha256_method; + metadata_size_sha256 = crypto_method_sha256 -> nx_crypto_metadata_area_size; + + if (metadata_size_sha256 & 0x3) + { + metadata_size_sha256 += 4 - (metadata_size_sha256 & 0x3); + } #endif #if (NX_SECURE_TLS_TLS_1_3_ENABLED) tls_session->nx_secure_tls_1_3_supported = NX_FALSE; @@ -713,11 +745,10 @@ const NX_CRYPTO_METHOD *crypto_method_sha256; #if (NX_SECURE_TLS_TLS_1_0_ENABLED || NX_SECURE_TLS_TLS_1_1_ENABLED) if (tls_session -> nx_secure_tls_supported_versions & (USHORT)(NX_SECURE_TLS_BITFIELD_VERSION_1_0 | NX_SECURE_TLS_BITFIELD_VERSION_1_1)) { - max_handshake_hash_metadata_size += (crypto_method_md5 -> nx_crypto_metadata_area_size + - crypto_method_sha1 -> nx_crypto_metadata_area_size); - if (max_handshake_hash_scratch_size < crypto_method_md5 -> nx_crypto_metadata_area_size + crypto_method_sha1 -> nx_crypto_metadata_area_size) + max_handshake_hash_metadata_size += (metadata_size_md5 + metadata_size_sha1); + if (max_handshake_hash_scratch_size < metadata_size_md5 + metadata_size_sha1) { - max_handshake_hash_scratch_size = crypto_method_md5 -> nx_crypto_metadata_area_size + crypto_method_sha1 -> nx_crypto_metadata_area_size; + max_handshake_hash_scratch_size = metadata_size_md5 + metadata_size_sha1; } if (max_tls_prf_metadata_size < crypto_table -> nx_secure_tls_prf_1_method -> nx_crypto_metadata_area_size) @@ -727,12 +758,12 @@ const NX_CRYPTO_METHOD *crypto_method_sha256; } #endif #if (NX_SECURE_TLS_TLS_1_2_ENABLED) - max_handshake_hash_metadata_size += crypto_method_sha256 -> nx_crypto_metadata_area_size; + max_handshake_hash_metadata_size += metadata_size_sha256; /* See if the scratch size from above is bigger. */ - if (max_handshake_hash_scratch_size < crypto_method_sha256 -> nx_crypto_metadata_area_size) + if (max_handshake_hash_scratch_size < metadata_size_sha256) { - max_handshake_hash_scratch_size = crypto_method_sha256 -> nx_crypto_metadata_area_size; + max_handshake_hash_scratch_size = metadata_size_sha256; } if (max_tls_prf_metadata_size < crypto_table -> nx_secure_tls_prf_sha256_method -> nx_crypto_metadata_area_size) @@ -756,6 +787,28 @@ const NX_CRYPTO_METHOD *crypto_method_sha256; max_public_cipher_metadata_size = max_public_auth_metadata_size; } + /* Check and adjust every metadata sizes for four byte alignment. */ + if (max_public_cipher_metadata_size & 0x3) + { + max_public_cipher_metadata_size += 4 - (max_public_cipher_metadata_size & 0x3); + } + if (max_session_cipher_metadata_size & 0x3) + { + max_session_cipher_metadata_size += 4 - (max_session_cipher_metadata_size & 0x3); + } + if (max_hash_mac_metadata_size & 0x3) + { + max_hash_mac_metadata_size += 4 - (max_hash_mac_metadata_size & 0x3); + } + if (max_tls_prf_metadata_size & 0x3) + { + max_tls_prf_metadata_size += 4 - (max_tls_prf_metadata_size & 0x3); + } + if (max_handshake_hash_scratch_size & 0x3) + { + max_handshake_hash_scratch_size += 4 - (max_handshake_hash_scratch_size & 0x3); + } + /* The Total metadata size needed is the sum of all the maximums calculated above. We need to keep track of two separate session cipher states, one for the server and one for the client, so account for that extra space. */ @@ -796,19 +849,22 @@ const NX_CRYPTO_METHOD *crypto_method_sha256; /* Handshake hash metadata. */ #if (NX_SECURE_TLS_TLS_1_0_ENABLED || NX_SECURE_TLS_TLS_1_1_ENABLED) + if (tls_session -> nx_secure_tls_supported_versions & (USHORT)(NX_SECURE_TLS_BITFIELD_VERSION_1_0 | NX_SECURE_TLS_BITFIELD_VERSION_1_1)) + { tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_md5_metadata = &metadata_area[offset]; - tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_md5_metadata_size = crypto_method_md5 -> nx_crypto_metadata_area_size; - offset += crypto_method_md5 -> nx_crypto_metadata_area_size; + tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_md5_metadata_size = metadata_size_md5; + offset += metadata_size_md5; tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha1_metadata = &metadata_area[offset]; - tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha1_metadata_size = crypto_method_sha1 -> nx_crypto_metadata_area_size; - offset += crypto_method_sha1 -> nx_crypto_metadata_area_size; + tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha1_metadata_size = metadata_size_sha1; + offset += metadata_size_sha1; + } #endif #if NX_SECURE_TLS_TLS_1_2_ENABLED tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata = &metadata_area[offset]; - tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata_size = crypto_method_sha256 -> nx_crypto_metadata_area_size; - offset += crypto_method_sha256 -> nx_crypto_metadata_area_size; + tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata_size = metadata_size_sha256; + offset += metadata_size_sha256; #endif tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_scratch = &metadata_area[offset]; diff --git a/nx_secure/src/nx_secure_tls_session_delete.c b/nx_secure/src/nx_secure_tls_session_delete.c index 41e8377b..831768b1 100644 --- a/nx_secure/src/nx_secure_tls_session_delete.c +++ b/nx_secure/src/nx_secure_tls_session_delete.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_session_delete PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -63,13 +63,11 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), and */ +/* 09-30-2020 Timothy Stapko Modified comment(s), and */ /* fixed race condition for */ /* multithread transmission, */ -/* resulting in version 6.0.1 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), and */ /* fixed underflow issue, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_session_delete(NX_SECURE_TLS_SESSION *tls_session) diff --git a/nx_secure/src/nx_secure_tls_session_end.c b/nx_secure/src/nx_secure_tls_session_end.c index cb370206..8b056f87 100644 --- a/nx_secure/src/nx_secure_tls_session_end.c +++ b/nx_secure/src/nx_secure_tls_session_end.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_session_end PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -69,9 +69,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* supported chained packet, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_session_end(NX_SECURE_TLS_SESSION *tls_session, UINT wait_option) diff --git a/nx_secure/src/nx_secure_tls_session_iv_size_get.c b/nx_secure/src/nx_secure_tls_session_iv_size_get.c index 94624333..d870e920 100644 --- a/nx_secure/src/nx_secure_tls_session_iv_size_get.c +++ b/nx_secure/src/nx_secure_tls_session_iv_size_get.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_session_iv_size_get PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -67,6 +67,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_session_iv_size_get(NX_SECURE_TLS_SESSION *tls_session, USHORT *iv_size) diff --git a/nx_secure/src/nx_secure_tls_session_keys_set.c b/nx_secure/src/nx_secure_tls_session_keys_set.c index 130ce1c1..a632cf8f 100644 --- a/nx_secure/src/nx_secure_tls_session_keys_set.c +++ b/nx_secure/src/nx_secure_tls_session_keys_set.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_session_keys_set PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -73,6 +73,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #define NX_SECURE_SOURCE_CODE @@ -155,7 +158,7 @@ const NX_CRYPTO_METHOD *session_cipher_method = NX_NULL; if (is_client) { NX_SECURE_MEMCPY(&tls_session -> nx_secure_tls_key_material.nx_secure_tls_key_material_data[key_offset], - &tls_session -> nx_secure_tls_key_material.nx_secure_tls_new_key_material_data[key_offset], hash_size); + &tls_session -> nx_secure_tls_key_material.nx_secure_tls_new_key_material_data[key_offset], hash_size); /* Use case of memcpy is verified. */ } tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_write_mac_secret = &key_block[key_offset]; key_offset += hash_size; @@ -164,7 +167,7 @@ const NX_CRYPTO_METHOD *session_cipher_method = NX_NULL; if (!is_client) { NX_SECURE_MEMCPY(&tls_session -> nx_secure_tls_key_material.nx_secure_tls_key_material_data[key_offset], - &tls_session -> nx_secure_tls_key_material.nx_secure_tls_new_key_material_data[key_offset], hash_size); + &tls_session -> nx_secure_tls_key_material.nx_secure_tls_new_key_material_data[key_offset], hash_size); /* Use case of memcpy is verified. */ } tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_write_mac_secret = &key_block[key_offset]; key_offset += hash_size; @@ -177,7 +180,7 @@ const NX_CRYPTO_METHOD *session_cipher_method = NX_NULL; if (is_client) { NX_SECURE_MEMCPY(&tls_session -> nx_secure_tls_key_material.nx_secure_tls_key_material_data[key_offset], - &tls_session -> nx_secure_tls_key_material.nx_secure_tls_new_key_material_data[key_offset], key_size); + &tls_session -> nx_secure_tls_key_material.nx_secure_tls_new_key_material_data[key_offset], key_size); /* Use case of memcpy is verified. */ } tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_write_key = &key_block[key_offset]; key_offset += key_size; @@ -186,7 +189,7 @@ const NX_CRYPTO_METHOD *session_cipher_method = NX_NULL; if (!is_client) { NX_SECURE_MEMCPY(&tls_session -> nx_secure_tls_key_material.nx_secure_tls_key_material_data[key_offset], - &tls_session -> nx_secure_tls_key_material.nx_secure_tls_new_key_material_data[key_offset], key_size); + &tls_session -> nx_secure_tls_key_material.nx_secure_tls_new_key_material_data[key_offset], key_size); /* Use case of memcpy is verified. */ } tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_write_key = &key_block[key_offset]; key_offset += key_size; @@ -199,7 +202,7 @@ const NX_CRYPTO_METHOD *session_cipher_method = NX_NULL; if (is_client) { NX_SECURE_MEMCPY(&tls_session -> nx_secure_tls_key_material.nx_secure_tls_key_material_data[key_offset], - &tls_session -> nx_secure_tls_key_material.nx_secure_tls_new_key_material_data[key_offset], iv_size); + &tls_session -> nx_secure_tls_key_material.nx_secure_tls_new_key_material_data[key_offset], iv_size); /* Use case of memcpy is verified. */ } tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_iv = &key_block[key_offset]; key_offset += iv_size; @@ -208,7 +211,7 @@ const NX_CRYPTO_METHOD *session_cipher_method = NX_NULL; if (!is_client) { NX_SECURE_MEMCPY(&tls_session -> nx_secure_tls_key_material.nx_secure_tls_key_material_data[key_offset], - &tls_session -> nx_secure_tls_key_material.nx_secure_tls_new_key_material_data[key_offset], iv_size); + &tls_session -> nx_secure_tls_key_material.nx_secure_tls_new_key_material_data[key_offset], iv_size); /* Use case of memcpy is verified. */ } tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_iv = &key_block[key_offset]; key_offset += iv_size; diff --git a/nx_secure/src/nx_secure_tls_session_packet_buffer_set.c b/nx_secure/src/nx_secure_tls_session_packet_buffer_set.c index 2aa66ada..279dda29 100644 --- a/nx_secure/src/nx_secure_tls_session_packet_buffer_set.c +++ b/nx_secure/src/nx_secure_tls_session_packet_buffer_set.c @@ -32,7 +32,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_session_packet_buffer_set PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -65,6 +65,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_session_packet_buffer_set(NX_SECURE_TLS_SESSION *session_ptr, diff --git a/nx_secure/src/nx_secure_tls_session_protocol_version_override.c b/nx_secure/src/nx_secure_tls_session_protocol_version_override.c index 94336c4a..b4ecbb63 100644 --- a/nx_secure/src/nx_secure_tls_session_protocol_version_override.c +++ b/nx_secure/src/nx_secure_tls_session_protocol_version_override.c @@ -32,7 +32,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_session_protocol_version_override PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -66,9 +66,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* fixed renegotiation bug, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_session_protocol_version_override(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_session_receive.c b/nx_secure/src/nx_secure_tls_session_receive.c index cccadda6..75505b2e 100644 --- a/nx_secure/src/nx_secure_tls_session_receive.c +++ b/nx_secure/src/nx_secure_tls_session_receive.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_session_receive PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -66,10 +66,10 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* supported chained packet, */ /* fixed renegotiation bug, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_session_receive(NX_SECURE_TLS_SESSION *tls_session, NX_PACKET **packet_ptr_ptr, diff --git a/nx_secure/src/nx_secure_tls_session_receive_records.c b/nx_secure/src/nx_secure_tls_session_receive_records.c index 9379d2f3..2daaa972 100644 --- a/nx_secure/src/nx_secure_tls_session_receive_records.c +++ b/nx_secure/src/nx_secure_tls_session_receive_records.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_session_receive_records PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -74,9 +74,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* supported chained packet, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_session_receive_records(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_session_renegotiate.c b/nx_secure/src/nx_secure_tls_session_renegotiate.c index a0697aa5..a8d935ef 100644 --- a/nx_secure/src/nx_secure_tls_session_renegotiate.c +++ b/nx_secure/src/nx_secure_tls_session_renegotiate.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_session_renegotiate PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -83,10 +83,10 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* supported chained packet, */ /* fixed renegotiation bug, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #ifndef NX_SECURE_TLS_DISABLE_SECURE_RENEGOTIATION diff --git a/nx_secure/src/nx_secure_tls_session_renegotiate_callback_set.c b/nx_secure/src/nx_secure_tls_session_renegotiate_callback_set.c index a7baf884..3a9793de 100644 --- a/nx_secure/src/nx_secure_tls_session_renegotiate_callback_set.c +++ b/nx_secure/src/nx_secure_tls_session_renegotiate_callback_set.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_session_renegotiate_callback_set PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,9 +68,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* fixed renegotiation bug, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #ifndef NX_SECURE_TLS_DISABLE_SECURE_RENEGOTIATION diff --git a/nx_secure/src/nx_secure_tls_session_reset.c b/nx_secure/src/nx_secure_tls_session_reset.c index 0efe833c..5446592e 100644 --- a/nx_secure/src/nx_secure_tls_session_reset.c +++ b/nx_secure/src/nx_secure_tls_session_reset.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_session_reset PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,9 +68,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* fixed renegotiation bug, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_session_reset(NX_SECURE_TLS_SESSION *session_ptr) diff --git a/nx_secure/src/nx_secure_tls_session_send.c b/nx_secure/src/nx_secure_tls_session_send.c index a00c5fe8..754f2077 100644 --- a/nx_secure/src/nx_secure_tls_session_send.c +++ b/nx_secure/src/nx_secure_tls_session_send.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_session_send PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -66,6 +66,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_session_send(NX_SECURE_TLS_SESSION *tls_session, NX_PACKET *packet_ptr, diff --git a/nx_secure/src/nx_secure_tls_session_server_callback_set.c b/nx_secure/src/nx_secure_tls_session_server_callback_set.c index f97a3f91..41efc0ec 100644 --- a/nx_secure/src/nx_secure_tls_session_server_callback_set.c +++ b/nx_secure/src/nx_secure_tls_session_server_callback_set.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_session_server_callback_set PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -64,6 +64,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_session_server_callback_set(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_session_sni_extension_parse.c b/nx_secure/src/nx_secure_tls_session_sni_extension_parse.c index 584db171..4f2b4cff 100644 --- a/nx_secure/src/nx_secure_tls_session_sni_extension_parse.c +++ b/nx_secure/src/nx_secure_tls_session_sni_extension_parse.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_session_sni_extension_parse PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -73,6 +73,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_session_sni_extension_parse(NX_SECURE_TLS_SESSION *tls_session, @@ -129,7 +132,7 @@ UINT offset; } /* Name and lengths check out, save off the name data. */ - NX_SECURE_MEMCPY(dns_name -> nx_secure_x509_dns_name, &data_ptr[offset], dns_name -> nx_secure_x509_dns_name_length); + NX_SECURE_MEMCPY(dns_name -> nx_secure_x509_dns_name, &data_ptr[offset], dns_name -> nx_secure_x509_dns_name_length); /* Use case of memcpy is verified. */ /* Success! */ return(NX_SUCCESS); diff --git a/nx_secure/src/nx_secure_tls_session_sni_extension_set.c b/nx_secure/src/nx_secure_tls_session_sni_extension_set.c index 14cd1f1a..4deb657b 100644 --- a/nx_secure/src/nx_secure_tls_session_sni_extension_set.c +++ b/nx_secure/src/nx_secure_tls_session_sni_extension_set.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_session_sni_extension_set PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -64,6 +64,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_session_sni_extension_set(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_session_start.c b/nx_secure/src/nx_secure_tls_session_start.c index 7c46d423..89b7c5b5 100644 --- a/nx_secure/src/nx_secure_tls_session_start.c +++ b/nx_secure/src/nx_secure_tls_session_start.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_session_start PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -74,9 +74,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* supported chained packet, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_session_start(NX_SECURE_TLS_SESSION *tls_session, NX_TCP_SOCKET *tcp_socket, diff --git a/nx_secure/src/nx_secure_tls_session_time_function_set.c b/nx_secure/src/nx_secure_tls_session_time_function_set.c index b232bd51..4a506efe 100644 --- a/nx_secure/src/nx_secure_tls_session_time_function_set.c +++ b/nx_secure/src/nx_secure_tls_session_time_function_set.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_session_time_function_set PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,6 +68,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_session_time_function_set(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_session_x509_client_verify_configure.c b/nx_secure/src/nx_secure_tls_session_x509_client_verify_configure.c index 5fdf3d33..6735c726 100644 --- a/nx_secure/src/nx_secure_tls_session_x509_client_verify_configure.c +++ b/nx_secure/src/nx_secure_tls_session_x509_client_verify_configure.c @@ -32,7 +32,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_session_x509_client_verify_configure PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -95,6 +95,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_session_x509_client_verify_configure(NX_SECURE_TLS_SESSION *tls_session, UINT certs_number, VOID *certificate_buffer, ULONG buffer_size) diff --git a/nx_secure/src/nx_secure_tls_shutdown.c b/nx_secure/src/nx_secure_tls_shutdown.c index 85909d6c..3c587120 100644 --- a/nx_secure/src/nx_secure_tls_shutdown.c +++ b/nx_secure/src/nx_secure_tls_shutdown.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_shutdown PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -60,6 +60,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_shutdown(VOID) diff --git a/nx_secure/src/nx_secure_tls_trusted_certificate_add.c b/nx_secure/src/nx_secure_tls_trusted_certificate_add.c index 3abb1251..d4029e39 100644 --- a/nx_secure/src/nx_secure_tls_trusted_certificate_add.c +++ b/nx_secure/src/nx_secure_tls_trusted_certificate_add.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_trusted_certificate_add PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -70,6 +70,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_trusted_certificate_add(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_trusted_certificate_remove.c b/nx_secure/src/nx_secure_tls_trusted_certificate_remove.c index fbdfb345..1c71e61e 100644 --- a/nx_secure/src/nx_secure_tls_trusted_certificate_remove.c +++ b/nx_secure/src/nx_secure_tls_trusted_certificate_remove.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_trusted_certificate_remove PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -66,6 +66,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_trusted_certificate_remove(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nx_secure_tls_verify_mac.c b/nx_secure/src/nx_secure_tls_verify_mac.c index 8e4e0f35..75a83b40 100644 --- a/nx_secure/src/nx_secure_tls_verify_mac.c +++ b/nx_secure/src/nx_secure_tls_verify_mac.c @@ -32,7 +32,7 @@ static UCHAR _received_hash[NX_SECURE_TLS_MAX_HASH_SIZE]; /* FUNCTION RELEASE */ /* */ /* _nx_secure_tls_verify_mac PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -71,12 +71,11 @@ static UCHAR _received_hash[NX_SECURE_TLS_MAX_HASH_SIZE]; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), fixed */ +/* 09-30-2020 Timothy Stapko Modified comment(s), fixed */ /* AES-CBC padding oracle, */ -/* resulting in version 6.0.1 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ /* supported chained packet, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_tls_verify_mac(NX_SECURE_TLS_SESSION *tls_session, UCHAR *header_data, @@ -148,7 +147,7 @@ ULONG bytes_copied; { return(NX_SECURE_TLS_HASH_MAC_VERIFY_FAILURE); } - NX_SECURE_MEMCPY(header, header_data, header_length); + NX_SECURE_MEMCPY(header, header_data, header_length); /* Use case of memcpy is verified. */ /* Adjust the length in the header to match the length of the data before the hash was added. */ header[3] = (UCHAR)((data_length >> 8) & 0x00FF); diff --git a/nx_secure/src/nx_secure_x509.c b/nx_secure/src/nx_secure_x509.c index f6425221..61ea7619 100644 --- a/nx_secure/src/nx_secure_x509.c +++ b/nx_secure/src/nx_secure_x509.c @@ -58,7 +58,7 @@ static UINT _nx_secure_x509_extract_oid_data(const UCHAR *buffer, UINT oid, UINT /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_certificate_parse PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -103,6 +103,8 @@ static UINT _nx_secure_x509_extract_oid_data(const UCHAR *buffer, UINT oid, UINT /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_certificate_parse(const UCHAR *buffer, UINT length, UINT *bytes_processed, @@ -239,7 +241,7 @@ UINT status; /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_extract_oid_data PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -278,6 +280,8 @@ UINT status; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_x509_extract_oid_data(const UCHAR *buffer, UINT oid, UINT oid_param, ULONG length, @@ -425,7 +429,7 @@ NX_SECURE_EC_PUBLIC_KEY *ec_pubkey; /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_parse_cert_data PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -475,6 +479,8 @@ NX_SECURE_EC_PUBLIC_KEY *ec_pubkey; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_x509_parse_cert_data(const UCHAR *buffer, ULONG length, @@ -643,7 +649,7 @@ UINT status; /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_parse_version PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -679,6 +685,8 @@ UINT status; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_x509_parse_version(const UCHAR *buffer, ULONG length, UINT *bytes_processed, @@ -732,7 +740,7 @@ UINT status; /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_parse_serial_num PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -767,6 +775,8 @@ UINT status; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_x509_parse_serial_num(const UCHAR *buffer, ULONG length, @@ -814,7 +824,7 @@ UINT status; /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_parse_signature_algorithm PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -852,6 +862,8 @@ UINT status; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_x509_parse_signature_algorithm(const UCHAR *buffer, ULONG length, @@ -937,7 +949,7 @@ UCHAR oid_found = NX_FALSE; /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_parse_issuer PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -975,6 +987,8 @@ UCHAR oid_found = NX_FALSE; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_x509_parse_issuer(const UCHAR *buffer, ULONG length, UINT *bytes_processed, @@ -1018,7 +1032,7 @@ UINT status; /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_parse_validity PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -1056,6 +1070,8 @@ UINT status; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_x509_parse_validity(const UCHAR *buffer, ULONG length, UINT *bytes_processed, @@ -1139,7 +1155,7 @@ const UCHAR *current_buffer; /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_parse_subject PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -1177,6 +1193,8 @@ const UCHAR *current_buffer; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_x509_parse_subject(const UCHAR *buffer, ULONG length, UINT *bytes_processed, @@ -1221,7 +1239,7 @@ UINT status; /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_parse_public_key PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -1260,6 +1278,8 @@ UINT status; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_x509_parse_public_key(const UCHAR *buffer, ULONG length, @@ -1407,7 +1427,7 @@ UINT status; /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_parse_unique_ids PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -1442,6 +1462,8 @@ UINT status; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_x509_parse_unique_ids(const UCHAR *buffer, ULONG length, @@ -1548,7 +1570,7 @@ UINT processed_id; /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_parse_extensions PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -1586,6 +1608,8 @@ UINT processed_id; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_x509_parse_extensions(const UCHAR *buffer, ULONG length, @@ -1666,7 +1690,7 @@ UINT status; /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_parse_signature_data PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -1705,6 +1729,8 @@ UINT status; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_x509_parse_signature_data(const UCHAR *buffer, ULONG length, diff --git a/nx_secure/src/nx_secure_x509_asn1_tlv_block_parse.c b/nx_secure/src/nx_secure_x509_asn1_tlv_block_parse.c index 949686a3..da8545f1 100644 --- a/nx_secure/src/nx_secure_x509_asn1_tlv_block_parse.c +++ b/nx_secure/src/nx_secure_x509_asn1_tlv_block_parse.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_asn1_tlv_block_parse PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -120,6 +120,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_asn1_tlv_block_parse(const UCHAR *buffer, ULONG *buffer_length, USHORT *tlv_type, diff --git a/nx_secure/src/nx_secure_x509_certificate_chain_verify.c b/nx_secure/src/nx_secure_x509_certificate_chain_verify.c index 9c3213ee..5cd2203f 100644 --- a/nx_secure/src/nx_secure_x509_certificate_chain_verify.c +++ b/nx_secure/src/nx_secure_x509_certificate_chain_verify.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_certificate_chain_verify PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -69,6 +69,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_certificate_chain_verify(NX_SECURE_X509_CERTIFICATE_STORE *store, diff --git a/nx_secure/src/nx_secure_x509_certificate_initialize.c b/nx_secure/src/nx_secure_x509_certificate_initialize.c index 514b75db..5b184631 100644 --- a/nx_secure/src/nx_secure_x509_certificate_initialize.c +++ b/nx_secure/src/nx_secure_x509_certificate_initialize.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_certificate_initialize PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -96,6 +96,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_certificate_initialize(NX_SECURE_X509_CERT *certificate, @@ -136,7 +139,7 @@ NX_SECURE_EC_PRIVATE_KEY *ec_key; /* Use the caller-supplied buffer for the certificate. */ certificate -> nx_secure_x509_certificate_raw_buffer_size = buffer_size; certificate -> nx_secure_x509_certificate_raw_data = raw_data_buffer; - NX_SECURE_MEMCPY(certificate -> nx_secure_x509_certificate_raw_data, certificate_data, length); + NX_SECURE_MEMCPY(certificate -> nx_secure_x509_certificate_raw_data, certificate_data, length); /* Use case of memcpy is verified. */ } /* Parse the DER-encoded X509 certificate to extract the public key data. diff --git a/nx_secure/src/nx_secure_x509_certificate_list_add.c b/nx_secure/src/nx_secure_x509_certificate_list_add.c index 79ae1912..877356ff 100644 --- a/nx_secure/src/nx_secure_x509_certificate_list_add.c +++ b/nx_secure/src/nx_secure_x509_certificate_list_add.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_certificate_list_add PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -73,6 +73,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_certificate_list_add(NX_SECURE_X509_CERT **list_head, diff --git a/nx_secure/src/nx_secure_x509_certificate_list_find.c b/nx_secure/src/nx_secure_x509_certificate_list_find.c index 3185cb0d..f129a3ee 100644 --- a/nx_secure/src/nx_secure_x509_certificate_list_find.c +++ b/nx_secure/src/nx_secure_x509_certificate_list_find.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_certificate_list_find PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -72,6 +72,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_certificate_list_find(NX_SECURE_X509_CERT **list_head, diff --git a/nx_secure/src/nx_secure_x509_certificate_list_remove.c b/nx_secure/src/nx_secure_x509_certificate_list_remove.c index 436998bd..0b279c98 100644 --- a/nx_secure/src/nx_secure_x509_certificate_list_remove.c +++ b/nx_secure/src/nx_secure_x509_certificate_list_remove.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_certificate_list_remove PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -65,6 +65,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_certificate_list_remove(NX_SECURE_X509_CERT **list_head, diff --git a/nx_secure/src/nx_secure_x509_certificate_revocation_list_parse.c b/nx_secure/src/nx_secure_x509_certificate_revocation_list_parse.c index 30539370..8ea595e0 100644 --- a/nx_secure/src/nx_secure_x509_certificate_revocation_list_parse.c +++ b/nx_secure/src/nx_secure_x509_certificate_revocation_list_parse.c @@ -55,7 +55,7 @@ static UINT _nx_secure_x509_crl_extensions_parse(const UCHAR *buffer, ULONG leng /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_certificate_revocation_list_parse PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -95,6 +95,8 @@ static UINT _nx_secure_x509_crl_extensions_parse(const UCHAR *buffer, ULONG leng /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_certificate_revocation_list_parse(const UCHAR *buffer, UINT length, @@ -223,7 +225,7 @@ UINT status; /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_crl_tbscert_list_parse PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -269,6 +271,8 @@ UINT status; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_x509_crl_tbscert_list_parse(const UCHAR *buffer, ULONG length, @@ -413,7 +417,7 @@ UINT status; /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_crl_signature_algorithm_parse PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -452,6 +456,8 @@ UINT status; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_x509_crl_signature_algorithm_parse(const UCHAR *buffer, ULONG length, @@ -537,7 +543,7 @@ UCHAR oid_found = NX_FALSE; /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_crl_signature_data_parse PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -573,6 +579,8 @@ UCHAR oid_found = NX_FALSE; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_x509_crl_signature_data_parse(const UCHAR *buffer, ULONG length, @@ -619,7 +627,7 @@ UINT status; /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_crl_version_parse PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -654,6 +662,8 @@ UINT status; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_x509_crl_version_parse(const UCHAR *buffer, ULONG length, @@ -701,7 +711,7 @@ UINT status; /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_crl_issuer_parse PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -739,6 +749,8 @@ UINT status; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_x509_crl_issuer_parse(const UCHAR *buffer, ULONG length, @@ -780,7 +792,7 @@ UINT status; /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_crl_update_times_parse PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -816,6 +828,8 @@ UINT status; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_x509_crl_update_times_parse(const UCHAR *buffer, ULONG length, @@ -887,7 +901,7 @@ const UCHAR *current_buffer; /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_crl_revoked_certs_list_parse PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -924,6 +938,8 @@ const UCHAR *current_buffer; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_x509_crl_revoked_certs_list_parse(const UCHAR *buffer, ULONG length, @@ -969,7 +985,7 @@ const UCHAR *current_buffer; /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_crl_extensions_parse PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -1005,6 +1021,8 @@ const UCHAR *current_buffer; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_x509_crl_extensions_parse(const UCHAR *buffer, ULONG length, diff --git a/nx_secure/src/nx_secure_x509_certificate_verify.c b/nx_secure/src/nx_secure_x509_certificate_verify.c index ddfc2e27..cb218cee 100644 --- a/nx_secure/src/nx_secure_x509_certificate_verify.c +++ b/nx_secure/src/nx_secure_x509_certificate_verify.c @@ -35,7 +35,7 @@ static UCHAR decrypted_signature[512]; /* This needs to hold the entire decrypte /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_certificate_verify PORTABLE C */ -/* 6.0.1 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -75,9 +75,10 @@ static UCHAR decrypted_signature[512]; /* This needs to hold the entire decrypte /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), update */ +/* 09-30-2020 Timothy Stapko Modified comment(s), update */ /* ECC find curve method, */ -/* resulting in version 6.0.1 */ +/* add KeyUsage check, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_certificate_verify(NX_SECURE_X509_CERTIFICATE_STORE *store, @@ -99,6 +100,9 @@ const NX_CRYPTO_METHOD *hash_method; const NX_CRYPTO_METHOD *public_cipher_method; NX_SECURE_X509_CRYPTO *crypto_methods; VOID *handler = NX_NULL; +#ifndef NX_SECURE_X509_DISABLE_KEY_USAGE_CHECK +USHORT key_usage_bitfield = 0; +#endif #ifdef NX_SECURE_ENABLE_ECC_CIPHERSUITE NX_SECURE_EC_PUBLIC_KEY *ec_pubkey; const NX_CRYPTO_METHOD *curve_method; @@ -106,6 +110,21 @@ const NX_CRYPTO_METHOD *curve_method; NX_PARAMETER_NOT_USED(store); +#ifndef NX_SECURE_X509_DISABLE_KEY_USAGE_CHECK + /* Before we do any crypto verification, we need to check the KeyUsage extension. */ + status = _nx_secure_x509_key_usage_extension_parse(issuer_certificate, &key_usage_bitfield); + + /* If extension is not present, we don't need to verify per RFC 5280. */ + if(NX_SUCCESS == status) + { + /* The issuer cert has a KeyUsage extension - check the KeyCertSign bit. */ + if(!(key_usage_bitfield & NX_SECURE_X509_KEY_USAGE_KEY_CERT_SIGN)) + { + return(NX_SECURE_X509_KEY_USAGE_ERROR); + } + } +#endif + /* Get working pointers to relevant data. */ certificate_verify_data = certificate -> nx_secure_x509_certificate_data; verify_data_length = certificate -> nx_secure_x509_certificate_data_length; diff --git a/nx_secure/src/nx_secure_x509_common_name_dns_check.c b/nx_secure/src/nx_secure_x509_common_name_dns_check.c index 96b8b2df..ca11ad10 100644 --- a/nx_secure/src/nx_secure_x509_common_name_dns_check.c +++ b/nx_secure/src/nx_secure_x509_common_name_dns_check.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_common_name_dns_check PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -80,6 +80,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_common_name_dns_check(NX_SECURE_X509_CERT *certificate, const UCHAR *dns_tld, diff --git a/nx_secure/src/nx_secure_x509_crl_revocation_check.c b/nx_secure/src/nx_secure_x509_crl_revocation_check.c index b49a7f8d..cd5ed851 100644 --- a/nx_secure/src/nx_secure_x509_crl_revocation_check.c +++ b/nx_secure/src/nx_secure_x509_crl_revocation_check.c @@ -36,7 +36,7 @@ static UINT _nx_secure_x509_crl_parse_entry(const UCHAR *buffer, ULONG length, U /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_crl_revocation_check PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -86,6 +86,8 @@ static UINT _nx_secure_x509_crl_parse_entry(const UCHAR *buffer, ULONG length, U /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_crl_revocation_check(const UCHAR *crl_data, UINT crl_length, @@ -216,7 +218,7 @@ UINT serial_number_length; /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_crl_parse_entry PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -254,6 +256,8 @@ UINT serial_number_length; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_x509_crl_parse_entry(const UCHAR *buffer, ULONG length, UINT *bytes_processed, diff --git a/nx_secure/src/nx_secure_x509_crl_verify.c b/nx_secure/src/nx_secure_x509_crl_verify.c index 02b9adf1..a2c8aae7 100644 --- a/nx_secure/src/nx_secure_x509_crl_verify.c +++ b/nx_secure/src/nx_secure_x509_crl_verify.c @@ -35,7 +35,7 @@ static UCHAR decrypted_signature[512]; /* This needs to hold the entire decrypte /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_crl_verify PORTABLE C */ -/* 6.0.1 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -78,9 +78,10 @@ static UCHAR decrypted_signature[512]; /* This needs to hold the entire decrypte /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), update */ +/* 09-30-2020 Timothy Stapko Modified comment(s), update */ /* ECC find curve method, */ -/* resulting in version 6.0.1 */ +/* add KeyUsage check, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_crl_verify(NX_SECURE_X509_CERT *certificate, NX_SECURE_X509_CRL *crl, @@ -102,6 +103,9 @@ const NX_CRYPTO_METHOD *hash_method; const NX_CRYPTO_METHOD *public_cipher_method; NX_SECURE_X509_CRYPTO *crypto_methods; VOID *handler = NX_NULL; +#ifndef NX_SECURE_X509_DISABLE_KEY_USAGE_CHECK +USHORT key_usage_bitfield = 0; +#endif #ifdef NX_SECURE_ENABLE_ECC_CIPHERSUITE NX_SECURE_EC_PUBLIC_KEY *ec_pubkey; const NX_CRYPTO_METHOD *curve_method; @@ -109,6 +113,21 @@ const NX_CRYPTO_METHOD *curve_method; NX_PARAMETER_NOT_USED(store); +#ifndef NX_SECURE_X509_DISABLE_KEY_USAGE_CHECK + /* Before we do any crypto verification, we need to check the KeyUsage extension. */ + status = _nx_secure_x509_key_usage_extension_parse(issuer_certificate, &key_usage_bitfield); + + /* If extension is not present, we don't need to verify per RFC 5280. */ + if(NX_SUCCESS == status) + { + /* The issuer cert has a KeyUsage extension - check the CRLSign bit. */ + if(!(key_usage_bitfield & NX_SECURE_X509_KEY_USAGE_CRL_SIGN)) + { + return(NX_SECURE_X509_KEY_USAGE_ERROR); + } + } +#endif + /* Get working pointers to relevant data. */ crl_verify_data = crl -> nx_secure_x509_crl_verify_data; verify_data_length = crl -> nx_secure_x509_crl_verify_data_length; diff --git a/nx_secure/src/nx_secure_x509_distinguished_name_compare.c b/nx_secure/src/nx_secure_x509_distinguished_name_compare.c index fcf9eeeb..051d45f0 100644 --- a/nx_secure/src/nx_secure_x509_distinguished_name_compare.c +++ b/nx_secure/src/nx_secure_x509_distinguished_name_compare.c @@ -33,7 +33,7 @@ static INT _nx_secure_x509_distinguished_name_field_compare(const UCHAR *field1, /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_distinguished_name_compare PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -86,6 +86,8 @@ static INT _nx_secure_x509_distinguished_name_field_compare(const UCHAR *field1, /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ INT _nx_secure_x509_distinguished_name_compare(NX_SECURE_X509_DISTINGUISHED_NAME *name, @@ -229,7 +231,7 @@ INT status = 0; /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_distinguished_name_field_compare PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -266,6 +268,8 @@ INT status = 0; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static INT _nx_secure_x509_distinguished_name_field_compare(const UCHAR *field1, const UINT length1, diff --git a/nx_secure/src/nx_secure_x509_distinguished_name_parse.c b/nx_secure/src/nx_secure_x509_distinguished_name_parse.c index 21a050d4..41ac6717 100644 --- a/nx_secure/src/nx_secure_x509_distinguished_name_parse.c +++ b/nx_secure/src/nx_secure_x509_distinguished_name_parse.c @@ -34,7 +34,7 @@ static UINT _nx_secure_x509_extract_name_oid_data(const UCHAR *buffer, UINT oid, /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_distinguished_name_parse PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -73,6 +73,8 @@ static UINT _nx_secure_x509_extract_name_oid_data(const UCHAR *buffer, UINT oid, /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_distinguished_name_parse(const UCHAR *buffer, UINT length, UINT *bytes_processed, @@ -183,7 +185,7 @@ UINT oid; /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_extract_name_oid_data PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -220,6 +222,8 @@ UINT oid; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_x509_extract_name_oid_data(const UCHAR *buffer, UINT oid, ULONG length, diff --git a/nx_secure/src/nx_secure_x509_dns_name_initialize.c b/nx_secure/src/nx_secure_x509_dns_name_initialize.c index 5be5289e..6b9ef500 100644 --- a/nx_secure/src/nx_secure_x509_dns_name_initialize.c +++ b/nx_secure/src/nx_secure_x509_dns_name_initialize.c @@ -33,7 +33,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_dns_name_initialize PORTABLE C */ -/* 6.0.1 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -66,9 +66,10 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 06-30-2020 Timothy Stapko Modified comment(s), improved */ +/* 09-30-2020 Timothy Stapko Modified comment(s), improved */ /* buffer length verification, */ -/* resulting in version 6.0.1 */ +/* verified memcpy use cases, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_dns_name_initialize(NX_SECURE_X509_DNS_NAME *dns_name, @@ -82,7 +83,7 @@ UINT _nx_secure_x509_dns_name_initialize(NX_SECURE_X509_DNS_NAME *dns_name, } /* Copy the name string into the entry structure. */ - NX_SECURE_MEMCPY(dns_name -> nx_secure_x509_dns_name, name_string, length); + NX_SECURE_MEMCPY(dns_name -> nx_secure_x509_dns_name, name_string, length); /* Use case of memcpy is verified. */ dns_name -> nx_secure_x509_dns_name_length = length; diff --git a/nx_secure/src/nx_secure_x509_ec_private_key_parse.c b/nx_secure/src/nx_secure_x509_ec_private_key_parse.c index 874a2603..08c52d09 100644 --- a/nx_secure/src/nx_secure_x509_ec_private_key_parse.c +++ b/nx_secure/src/nx_secure_x509_ec_private_key_parse.c @@ -33,7 +33,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_ec_private_key_parse PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,6 +68,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_ec_private_key_parse(const UCHAR *buffer, UINT length, diff --git a/nx_secure/src/nx_secure_x509_expiration_check.c b/nx_secure/src/nx_secure_x509_expiration_check.c index 869bb335..99115b3f 100644 --- a/nx_secure/src/nx_secure_x509_expiration_check.c +++ b/nx_secure/src/nx_secure_x509_expiration_check.c @@ -34,7 +34,7 @@ static UINT _nx_secure_x509_asn1_time_to_unix_convert(const UCHAR *asn1_time, US /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_expiration_check PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,6 +68,8 @@ static UINT _nx_secure_x509_asn1_time_to_unix_convert(const UCHAR *asn1_time, US /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_expiration_check(NX_SECURE_X509_CERT *certificate, ULONG current_time) @@ -125,7 +127,7 @@ static const UINT days_before_month[12] = {0, 31, 59, 90, 120, 151, 181, 212, 24 /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_asn1_time_to_unix_convert PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -159,6 +161,8 @@ static const UINT days_before_month[12] = {0, 31, 59, 90, 120, 151, 181, 212, 24 /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static UINT _nx_secure_x509_asn1_time_to_unix_convert(const UCHAR *asn1_time, USHORT asn1_length, diff --git a/nx_secure/src/nx_secure_x509_extended_key_usage_extension_parse.c b/nx_secure/src/nx_secure_x509_extended_key_usage_extension_parse.c index 22368863..dbb30f6f 100644 --- a/nx_secure/src/nx_secure_x509_extended_key_usage_extension_parse.c +++ b/nx_secure/src/nx_secure_x509_extended_key_usage_extension_parse.c @@ -31,7 +31,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_extended_key_usage_extension_parse PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -67,6 +67,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_extended_key_usage_extension_parse(NX_SECURE_X509_CERT *certificate, diff --git a/nx_secure/src/nx_secure_x509_extension_find.c b/nx_secure/src/nx_secure_x509_extension_find.c index 9d588109..a212a43c 100644 --- a/nx_secure/src/nx_secure_x509_extension_find.c +++ b/nx_secure/src/nx_secure_x509_extension_find.c @@ -31,7 +31,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_extension_find PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -73,6 +73,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_extension_find(NX_SECURE_X509_CERT *certificate, diff --git a/nx_secure/src/nx_secure_x509_find_certificate_methods.c b/nx_secure/src/nx_secure_x509_find_certificate_methods.c index f58e18e8..d7d12e46 100644 --- a/nx_secure/src/nx_secure_x509_find_certificate_methods.c +++ b/nx_secure/src/nx_secure_x509_find_certificate_methods.c @@ -31,7 +31,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_find_certificate_methods PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -70,6 +70,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_find_certificate_methods(NX_SECURE_X509_CERT *cert, USHORT signature_algorithm, diff --git a/nx_secure/src/nx_secure_x509_free_certificate_get.c b/nx_secure/src/nx_secure_x509_free_certificate_get.c index 69c33ccf..ba6ef730 100644 --- a/nx_secure/src/nx_secure_x509_free_certificate_get.c +++ b/nx_secure/src/nx_secure_x509_free_certificate_get.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_free_certificate_get PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -65,6 +65,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_free_certificate_get(NX_SECURE_X509_CERTIFICATE_STORE *store, diff --git a/nx_secure/src/nx_secure_x509_key_usage_extension_parse.c b/nx_secure/src/nx_secure_x509_key_usage_extension_parse.c index 36dcc4de..f1485181 100644 --- a/nx_secure/src/nx_secure_x509_key_usage_extension_parse.c +++ b/nx_secure/src/nx_secure_x509_key_usage_extension_parse.c @@ -31,7 +31,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_key_usage_extension_parse PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -65,6 +65,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* fixed parsing issue, */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_key_usage_extension_parse(NX_SECURE_X509_CERT *certificate, USHORT *bitfield) @@ -134,8 +137,8 @@ NX_SECURE_X509_EXTENSION key_usage_extension; /* DER-encoding of a BIT STRING with flag values uses the top octet of the 2 byte string to encode the number of 0 bits at the end of the lower octet. Thus, we need to extract - the top byte and right-shift the bottom byte to get the actual bitfield value. */ - *bitfield = (USHORT)(tlv_data[1] >> tlv_data[0]); + the top byte and shift the bottom byte to get the actual bitfield value. */ + *bitfield = (USHORT)((tlv_data[1] << 8) + tlv_data[0]); return(NX_SUCCESS); diff --git a/nx_secure/src/nx_secure_x509_local_certificate_find.c b/nx_secure/src/nx_secure_x509_local_certificate_find.c index 3cb21cd3..08864a01 100644 --- a/nx_secure/src/nx_secure_x509_local_certificate_find.c +++ b/nx_secure/src/nx_secure_x509_local_certificate_find.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_local_certificate_find PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -66,6 +66,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_local_certificate_find(NX_SECURE_X509_CERTIFICATE_STORE *store, diff --git a/nx_secure/src/nx_secure_x509_local_device_certificate_get.c b/nx_secure/src/nx_secure_x509_local_device_certificate_get.c index 8d6cd3c6..001f8b31 100644 --- a/nx_secure/src/nx_secure_x509_local_device_certificate_get.c +++ b/nx_secure/src/nx_secure_x509_local_device_certificate_get.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_local_device_certificate_get PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -74,6 +74,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_local_device_certificate_get(NX_SECURE_X509_CERTIFICATE_STORE *store, diff --git a/nx_secure/src/nx_secure_x509_oid_parse.c b/nx_secure/src/nx_secure_x509_oid_parse.c index c3f5c845..f409e4e1 100644 --- a/nx_secure/src/nx_secure_x509_oid_parse.c +++ b/nx_secure/src/nx_secure_x509_oid_parse.c @@ -234,7 +234,7 @@ static const UINT _nx_secure_x509_oid_map_size = sizeof(_nx_secure_x509_oid_map) /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_oid_parse PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -281,6 +281,8 @@ static const UINT _nx_secure_x509_oid_map_size = sizeof(_nx_secure_x509_oid_map) /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ VOID _nx_secure_x509_oid_parse(const UCHAR *oid, ULONG length, UINT *oid_value) diff --git a/nx_secure/src/nx_secure_x509_pkcs1_rsa_private_key_parse.c b/nx_secure/src/nx_secure_x509_pkcs1_rsa_private_key_parse.c index aa53471c..ab6d2a61 100644 --- a/nx_secure/src/nx_secure_x509_pkcs1_rsa_private_key_parse.c +++ b/nx_secure/src/nx_secure_x509_pkcs1_rsa_private_key_parse.c @@ -33,7 +33,7 @@ static VOID _nx_secure_asn1_parse_unsigned_integer(const UCHAR *data, ULONG leng /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_pkcs1_rsa_private_key_parse PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -70,6 +70,8 @@ static VOID _nx_secure_asn1_parse_unsigned_integer(const UCHAR *data, ULONG leng /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_pkcs1_rsa_private_key_parse(const UCHAR *buffer, UINT length, @@ -307,7 +309,7 @@ USHORT version; /* FUNCTION RELEASE */ /* */ /* _nx_secure_asn1_parse_unsigned_integer PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -341,6 +343,8 @@ USHORT version; /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ static VOID _nx_secure_asn1_parse_unsigned_integer(const UCHAR *data, ULONG length, diff --git a/nx_secure/src/nx_secure_x509_pkcs7_decode.c b/nx_secure/src/nx_secure_x509_pkcs7_decode.c index ae908337..23964e99 100644 --- a/nx_secure/src/nx_secure_x509_pkcs7_decode.c +++ b/nx_secure/src/nx_secure_x509_pkcs7_decode.c @@ -31,7 +31,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_pkcs7_decode PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -72,6 +72,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_pkcs7_decode(const UCHAR *signature_pointer, UINT signature_length, diff --git a/nx_secure/src/nx_secure_x509_remote_endpoint_certificate_get.c b/nx_secure/src/nx_secure_x509_remote_endpoint_certificate_get.c index 0c33e9b1..3d25db86 100644 --- a/nx_secure/src/nx_secure_x509_remote_endpoint_certificate_get.c +++ b/nx_secure/src/nx_secure_x509_remote_endpoint_certificate_get.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_remote_endpoint_certificate_get PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -72,6 +72,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_remote_endpoint_certificate_get(NX_SECURE_X509_CERTIFICATE_STORE *store, diff --git a/nx_secure/src/nx_secure_x509_store_certificate_add.c b/nx_secure/src/nx_secure_x509_store_certificate_add.c index 47812d5d..bf54f8b5 100644 --- a/nx_secure/src/nx_secure_x509_store_certificate_add.c +++ b/nx_secure/src/nx_secure_x509_store_certificate_add.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_store_certificate_add PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -72,6 +72,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_store_certificate_add(NX_SECURE_X509_CERT *certificate, diff --git a/nx_secure/src/nx_secure_x509_store_certificate_find.c b/nx_secure/src/nx_secure_x509_store_certificate_find.c index 3d585ed3..f0c6843e 100644 --- a/nx_secure/src/nx_secure_x509_store_certificate_find.c +++ b/nx_secure/src/nx_secure_x509_store_certificate_find.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_store_certificate_find PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,6 +68,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_store_certificate_find(NX_SECURE_X509_CERTIFICATE_STORE *store, diff --git a/nx_secure/src/nx_secure_x509_store_certificate_remove.c b/nx_secure/src/nx_secure_x509_store_certificate_remove.c index fa02c1ab..97b33790 100644 --- a/nx_secure/src/nx_secure_x509_store_certificate_remove.c +++ b/nx_secure/src/nx_secure_x509_store_certificate_remove.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_store_certificate_remove PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -76,6 +76,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_store_certificate_remove(NX_SECURE_X509_CERTIFICATE_STORE *store, diff --git a/nx_secure/src/nx_secure_x509_subject_alt_names_find.c b/nx_secure/src/nx_secure_x509_subject_alt_names_find.c index 542679c3..a71e6478 100644 --- a/nx_secure/src/nx_secure_x509_subject_alt_names_find.c +++ b/nx_secure/src/nx_secure_x509_subject_alt_names_find.c @@ -31,7 +31,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_subject_alt_names_find PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,6 +68,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nx_secure_x509_subject_alt_names_find(NX_SECURE_X509_EXTENSION *extension, const UCHAR *name, diff --git a/nx_secure/src/nx_secure_x509_wildcard_compare.c b/nx_secure/src/nx_secure_x509_wildcard_compare.c index 5260dbb6..cc35e3fa 100644 --- a/nx_secure/src/nx_secure_x509_wildcard_compare.c +++ b/nx_secure/src/nx_secure_x509_wildcard_compare.c @@ -31,7 +31,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_x509_wildcard_compare PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -69,6 +69,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ INT _nx_secure_x509_wildcard_compare(const UCHAR *dns_name, UINT dns_name_len, diff --git a/nx_secure/src/nxe_secure_dtls_client_protocol_version_override.c b/nx_secure/src/nxe_secure_dtls_client_protocol_version_override.c index f1341e3e..84dd108e 100644 --- a/nx_secure/src/nxe_secure_dtls_client_protocol_version_override.c +++ b/nx_secure/src/nxe_secure_dtls_client_protocol_version_override.c @@ -32,7 +32,7 @@ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_client_protocol_version_override PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -65,6 +65,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_client_protocol_version_override(NX_SECURE_DTLS_SESSION *dtls_session, diff --git a/nx_secure/src/nxe_secure_dtls_client_session_start.c b/nx_secure/src/nxe_secure_dtls_client_session_start.c index 3be09825..f59f514b 100644 --- a/nx_secure/src/nxe_secure_dtls_client_session_start.c +++ b/nx_secure/src/nxe_secure_dtls_client_session_start.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_client_session_start PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -63,6 +63,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_client_session_start(NX_SECURE_DTLS_SESSION *dtls_session, NX_UDP_SOCKET *udp_socket, NXD_ADDRESS *ip_address, UINT port, UINT wait_option) diff --git a/nx_secure/src/nxe_secure_dtls_ecc_initialize.c b/nx_secure/src/nxe_secure_dtls_ecc_initialize.c index e591c87a..604e9a76 100644 --- a/nx_secure/src/nxe_secure_dtls_ecc_initialize.c +++ b/nx_secure/src/nxe_secure_dtls_ecc_initialize.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_ecc_initialize PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -62,6 +62,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_ecc_initialize(NX_SECURE_DTLS_SESSION *dtls_session, diff --git a/nx_secure/src/nxe_secure_dtls_packet_allocate.c b/nx_secure/src/nxe_secure_dtls_packet_allocate.c index 1c451767..137abd9d 100644 --- a/nx_secure/src/nxe_secure_dtls_packet_allocate.c +++ b/nx_secure/src/nxe_secure_dtls_packet_allocate.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_packet_allocate PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -63,6 +63,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_packet_allocate(NX_SECURE_DTLS_SESSION *dtls_session, NX_PACKET_POOL *pool_ptr, diff --git a/nx_secure/src/nxe_secure_dtls_psk_add.c b/nx_secure/src/nxe_secure_dtls_psk_add.c index 63615be2..4b98af9e 100644 --- a/nx_secure/src/nxe_secure_dtls_psk_add.c +++ b/nx_secure/src/nxe_secure_dtls_psk_add.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_psk_add PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -65,6 +65,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if defined(NX_SECURE_ENABLE_PSK_CIPHERSUITES) || defined(NX_SECURE_ENABLE_ECJPAKE_CIPHERSUITE) diff --git a/nx_secure/src/nxe_secure_dtls_server_create.c b/nx_secure/src/nxe_secure_dtls_server_create.c index d8f8cf58..f183a750 100644 --- a/nx_secure/src/nxe_secure_dtls_server_create.c +++ b/nx_secure/src/nxe_secure_dtls_server_create.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_server_create PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -71,6 +71,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_server_create(NX_SECURE_DTLS_SERVER *server_ptr, NX_IP *ip_ptr, UINT port, ULONG timeout, diff --git a/nx_secure/src/nxe_secure_dtls_server_delete.c b/nx_secure/src/nxe_secure_dtls_server_delete.c index 8b32d9dd..4f2de4cd 100644 --- a/nx_secure/src/nxe_secure_dtls_server_delete.c +++ b/nx_secure/src/nxe_secure_dtls_server_delete.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_server_delete PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -59,6 +59,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_server_delete(NX_SECURE_DTLS_SERVER *server_ptr) diff --git a/nx_secure/src/nxe_secure_dtls_server_ecc_initialize.c b/nx_secure/src/nxe_secure_dtls_server_ecc_initialize.c index 267bf3d1..7429da03 100644 --- a/nx_secure/src/nxe_secure_dtls_server_ecc_initialize.c +++ b/nx_secure/src/nxe_secure_dtls_server_ecc_initialize.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_server_ecc_initialize PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -63,6 +63,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_server_ecc_initialize(NX_SECURE_DTLS_SERVER *server_ptr, diff --git a/nx_secure/src/nxe_secure_dtls_server_local_certificate_add.c b/nx_secure/src/nxe_secure_dtls_server_local_certificate_add.c index 2495bf6f..57e2399d 100644 --- a/nx_secure/src/nxe_secure_dtls_server_local_certificate_add.c +++ b/nx_secure/src/nxe_secure_dtls_server_local_certificate_add.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_server_local_certificate_add PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -62,6 +62,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_server_local_certificate_add(NX_SECURE_DTLS_SERVER *server_ptr, diff --git a/nx_secure/src/nxe_secure_dtls_server_local_certificate_remove.c b/nx_secure/src/nxe_secure_dtls_server_local_certificate_remove.c index 757e7cd7..5996f0a2 100644 --- a/nx_secure/src/nxe_secure_dtls_server_local_certificate_remove.c +++ b/nx_secure/src/nxe_secure_dtls_server_local_certificate_remove.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_server_local_certificate_remove PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -64,6 +64,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_server_local_certificate_remove(NX_SECURE_DTLS_SERVER *server_ptr, diff --git a/nx_secure/src/nxe_secure_dtls_server_notify_set.c b/nx_secure/src/nxe_secure_dtls_server_notify_set.c index da17249c..ad7ae86f 100644 --- a/nx_secure/src/nxe_secure_dtls_server_notify_set.c +++ b/nx_secure/src/nxe_secure_dtls_server_notify_set.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_server_notify_set PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -62,6 +62,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_server_notify_set(NX_SECURE_DTLS_SERVER *server_ptr, diff --git a/nx_secure/src/nxe_secure_dtls_server_protocol_version_override.c b/nx_secure/src/nxe_secure_dtls_server_protocol_version_override.c index c3670137..236a24a2 100644 --- a/nx_secure/src/nxe_secure_dtls_server_protocol_version_override.c +++ b/nx_secure/src/nxe_secure_dtls_server_protocol_version_override.c @@ -32,7 +32,7 @@ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_server_protocol_version_override PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -65,6 +65,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_server_protocol_version_override(NX_SECURE_DTLS_SERVER *dtls_server, diff --git a/nx_secure/src/nxe_secure_dtls_server_psk_add.c b/nx_secure/src/nxe_secure_dtls_server_psk_add.c index 34f87396..1430fb1c 100644 --- a/nx_secure/src/nxe_secure_dtls_server_psk_add.c +++ b/nx_secure/src/nxe_secure_dtls_server_psk_add.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_server_psk_add PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -66,6 +66,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if defined(NX_SECURE_ENABLE_PSK_CIPHERSUITES) || defined(NX_SECURE_ENABLE_ECJPAKE_CIPHERSUITE) diff --git a/nx_secure/src/nxe_secure_dtls_server_session_send.c b/nx_secure/src/nxe_secure_dtls_server_session_send.c index 26bcc82e..932b480b 100644 --- a/nx_secure/src/nxe_secure_dtls_server_session_send.c +++ b/nx_secure/src/nxe_secure_dtls_server_session_send.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_server_session_send PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -61,6 +61,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_server_session_send(NX_SECURE_DTLS_SESSION *dtls_session, NX_PACKET *packet_ptr) diff --git a/nx_secure/src/nxe_secure_dtls_server_session_start.c b/nx_secure/src/nxe_secure_dtls_server_session_start.c index 53ee0ece..7ba8c65c 100644 --- a/nx_secure/src/nxe_secure_dtls_server_session_start.c +++ b/nx_secure/src/nxe_secure_dtls_server_session_start.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_server_session_start PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -60,6 +60,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_server_session_start(NX_SECURE_DTLS_SESSION *dtls_session, UINT wait_option) diff --git a/nx_secure/src/nxe_secure_dtls_server_start.c b/nx_secure/src/nxe_secure_dtls_server_start.c index 10954dec..e6422a47 100644 --- a/nx_secure/src/nxe_secure_dtls_server_start.c +++ b/nx_secure/src/nxe_secure_dtls_server_start.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_server_start PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -59,6 +59,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_server_start(NX_SECURE_DTLS_SERVER *server_ptr) diff --git a/nx_secure/src/nxe_secure_dtls_server_stop.c b/nx_secure/src/nxe_secure_dtls_server_stop.c index 4e8d37ee..a49c3949 100644 --- a/nx_secure/src/nxe_secure_dtls_server_stop.c +++ b/nx_secure/src/nxe_secure_dtls_server_stop.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_server_stop PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -59,6 +59,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_server_stop(NX_SECURE_DTLS_SERVER *server_ptr) diff --git a/nx_secure/src/nxe_secure_dtls_server_trusted_certificate_add.c b/nx_secure/src/nxe_secure_dtls_server_trusted_certificate_add.c index e70eab85..9c03fcb7 100644 --- a/nx_secure/src/nxe_secure_dtls_server_trusted_certificate_add.c +++ b/nx_secure/src/nxe_secure_dtls_server_trusted_certificate_add.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_server_trusted_certificate_add PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -63,6 +63,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_server_trusted_certificate_add(NX_SECURE_DTLS_SERVER *server_ptr, diff --git a/nx_secure/src/nxe_secure_dtls_server_trusted_certificate_remove.c b/nx_secure/src/nxe_secure_dtls_server_trusted_certificate_remove.c index 8adac5af..e87daded 100644 --- a/nx_secure/src/nxe_secure_dtls_server_trusted_certificate_remove.c +++ b/nx_secure/src/nxe_secure_dtls_server_trusted_certificate_remove.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_server_trusted_certificate_remove PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -64,6 +64,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_server_trusted_certificate_remove(NX_SECURE_DTLS_SERVER *server_ptr, diff --git a/nx_secure/src/nxe_secure_dtls_server_x509_client_verify_configure.c b/nx_secure/src/nxe_secure_dtls_server_x509_client_verify_configure.c index 6bba074e..a63f7684 100644 --- a/nx_secure/src/nxe_secure_dtls_server_x509_client_verify_configure.c +++ b/nx_secure/src/nxe_secure_dtls_server_x509_client_verify_configure.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_server_x509_client_verify_configure PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -64,6 +64,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_server_x509_client_verify_configure(NX_SECURE_DTLS_SERVER *server_ptr, UINT certs_per_session, diff --git a/nx_secure/src/nxe_secure_dtls_server_x509_client_verify_disable.c b/nx_secure/src/nxe_secure_dtls_server_x509_client_verify_disable.c index ceed678b..7efcc8aa 100644 --- a/nx_secure/src/nxe_secure_dtls_server_x509_client_verify_disable.c +++ b/nx_secure/src/nxe_secure_dtls_server_x509_client_verify_disable.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_server_x509_client_verify_disable PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -61,6 +61,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_server_x509_client_verify_disable(NX_SECURE_DTLS_SERVER *server_ptr) diff --git a/nx_secure/src/nxe_secure_dtls_session_client_info_get.c b/nx_secure/src/nxe_secure_dtls_session_client_info_get.c index c1999f41..ba9504ed 100644 --- a/nx_secure/src/nxe_secure_dtls_session_client_info_get.c +++ b/nx_secure/src/nxe_secure_dtls_session_client_info_get.c @@ -30,7 +30,7 @@ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_session_client_info_get PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -64,6 +64,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_session_client_info_get(NX_SECURE_DTLS_SESSION *dtls_session, diff --git a/nx_secure/src/nxe_secure_dtls_session_create.c b/nx_secure/src/nxe_secure_dtls_session_create.c index 4b0d414b..c5ca504a 100644 --- a/nx_secure/src/nxe_secure_dtls_session_create.c +++ b/nx_secure/src/nxe_secure_dtls_session_create.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_session_create PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -75,6 +75,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_session_create(NX_SECURE_DTLS_SESSION *session_ptr, diff --git a/nx_secure/src/nxe_secure_dtls_session_delete.c b/nx_secure/src/nxe_secure_dtls_session_delete.c index b1f77750..da354807 100644 --- a/nx_secure/src/nxe_secure_dtls_session_delete.c +++ b/nx_secure/src/nxe_secure_dtls_session_delete.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_session_delete PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -67,6 +67,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_session_delete(NX_SECURE_DTLS_SESSION *dtls_session) diff --git a/nx_secure/src/nxe_secure_dtls_session_end.c b/nx_secure/src/nxe_secure_dtls_session_end.c index cea08be1..0f8444c9 100644 --- a/nx_secure/src/nxe_secure_dtls_session_end.c +++ b/nx_secure/src/nxe_secure_dtls_session_end.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_session_end PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,6 +68,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_session_end(NX_SECURE_DTLS_SESSION *dtls_session, UINT wait_option) diff --git a/nx_secure/src/nxe_secure_dtls_session_local_certificate_add.c b/nx_secure/src/nxe_secure_dtls_session_local_certificate_add.c index 6ea71c32..494e4923 100644 --- a/nx_secure/src/nxe_secure_dtls_session_local_certificate_add.c +++ b/nx_secure/src/nxe_secure_dtls_session_local_certificate_add.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_session_local_certificate_add PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -64,6 +64,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_session_local_certificate_add(NX_SECURE_DTLS_SESSION *dtls_session, diff --git a/nx_secure/src/nxe_secure_dtls_session_local_certificate_remove.c b/nx_secure/src/nxe_secure_dtls_session_local_certificate_remove.c index e905c053..54f44b82 100644 --- a/nx_secure/src/nxe_secure_dtls_session_local_certificate_remove.c +++ b/nx_secure/src/nxe_secure_dtls_session_local_certificate_remove.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nx_secure_dtls_session_local_certificate_remove PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -64,6 +64,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_session_local_certificate_remove(NX_SECURE_DTLS_SESSION *dtls_session, diff --git a/nx_secure/src/nxe_secure_dtls_session_receive.c b/nx_secure/src/nxe_secure_dtls_session_receive.c index 2414c3cb..3c31bcca 100644 --- a/nx_secure/src/nxe_secure_dtls_session_receive.c +++ b/nx_secure/src/nxe_secure_dtls_session_receive.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_session_receive PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -70,6 +70,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_session_receive(NX_SECURE_DTLS_SESSION *dtls_session, diff --git a/nx_secure/src/nxe_secure_dtls_session_reset.c b/nx_secure/src/nxe_secure_dtls_session_reset.c index eda2a0a2..8611f9cf 100644 --- a/nx_secure/src/nxe_secure_dtls_session_reset.c +++ b/nx_secure/src/nxe_secure_dtls_session_reset.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_session_reset PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -66,6 +66,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_session_reset(NX_SECURE_DTLS_SESSION *session_ptr) diff --git a/nx_secure/src/nxe_secure_dtls_session_send.c b/nx_secure/src/nxe_secure_dtls_session_send.c index c7961962..b775da3f 100644 --- a/nx_secure/src/nxe_secure_dtls_session_send.c +++ b/nx_secure/src/nxe_secure_dtls_session_send.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_session_send PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -69,6 +69,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_session_send(NX_SECURE_DTLS_SESSION *dtls_session, NX_PACKET *packet_ptr, diff --git a/nx_secure/src/nxe_secure_dtls_session_start.c b/nx_secure/src/nxe_secure_dtls_session_start.c index 759c07f7..87d100af 100644 --- a/nx_secure/src/nxe_secure_dtls_session_start.c +++ b/nx_secure/src/nxe_secure_dtls_session_start.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_session_start PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -69,6 +69,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_session_start(NX_SECURE_DTLS_SESSION *dtls_session, NX_UDP_SOCKET *udp_socket, diff --git a/nx_secure/src/nxe_secure_dtls_session_trusted_certificate_add.c b/nx_secure/src/nxe_secure_dtls_session_trusted_certificate_add.c index 2c59284e..4e57f65d 100644 --- a/nx_secure/src/nxe_secure_dtls_session_trusted_certificate_add.c +++ b/nx_secure/src/nxe_secure_dtls_session_trusted_certificate_add.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_session_trusted_certificate_add PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -63,6 +63,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_session_trusted_certificate_add(NX_SECURE_DTLS_SESSION *dtls_session, diff --git a/nx_secure/src/nxe_secure_dtls_session_trusted_certificate_remove.c b/nx_secure/src/nxe_secure_dtls_session_trusted_certificate_remove.c index 293d8325..976829d9 100644 --- a/nx_secure/src/nxe_secure_dtls_session_trusted_certificate_remove.c +++ b/nx_secure/src/nxe_secure_dtls_session_trusted_certificate_remove.c @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_session_trusted_certificate_remove PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -64,6 +64,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_session_trusted_certificate_remove(NX_SECURE_DTLS_SESSION *dtls_session, diff --git a/nx_secure/src/nxe_secure_tls_active_certificate_set.c b/nx_secure/src/nxe_secure_tls_active_certificate_set.c index fe87c111..30dfb75a 100644 --- a/nx_secure/src/nxe_secure_tls_active_certificate_set.c +++ b/nx_secure/src/nxe_secure_tls_active_certificate_set.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_active_certificate_set PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -69,6 +69,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_active_certificate_set(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nxe_secure_tls_client_psk_set.c b/nx_secure/src/nxe_secure_tls_client_psk_set.c index c4346756..0473376a 100644 --- a/nx_secure/src/nxe_secure_tls_client_psk_set.c +++ b/nx_secure/src/nxe_secure_tls_client_psk_set.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_client_psk_set PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -73,6 +73,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #ifdef NX_SECURE_ENABLE_PSK_CIPHERSUITES diff --git a/nx_secure/src/nxe_secure_tls_local_certificate_add.c b/nx_secure/src/nxe_secure_tls_local_certificate_add.c index 09b57aca..98d5fa6e 100644 --- a/nx_secure/src/nxe_secure_tls_local_certificate_add.c +++ b/nx_secure/src/nxe_secure_tls_local_certificate_add.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_local_certificate_add PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -69,6 +69,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_local_certificate_add(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nxe_secure_tls_local_certificate_find.c b/nx_secure/src/nxe_secure_tls_local_certificate_find.c index e46feb83..06ad7762 100644 --- a/nx_secure/src/nxe_secure_tls_local_certificate_find.c +++ b/nx_secure/src/nxe_secure_tls_local_certificate_find.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_local_certificate_find PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -71,6 +71,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_local_certificate_find(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nxe_secure_tls_local_certificate_remove.c b/nx_secure/src/nxe_secure_tls_local_certificate_remove.c index 87fdf2b8..c5fea1b9 100644 --- a/nx_secure/src/nxe_secure_tls_local_certificate_remove.c +++ b/nx_secure/src/nxe_secure_tls_local_certificate_remove.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_local_certificate_remove PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -71,6 +71,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_local_certificate_remove(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nxe_secure_tls_metadata_size_calculate.c b/nx_secure/src/nxe_secure_tls_metadata_size_calculate.c index b804ba10..defb9521 100644 --- a/nx_secure/src/nxe_secure_tls_metadata_size_calculate.c +++ b/nx_secure/src/nxe_secure_tls_metadata_size_calculate.c @@ -33,7 +33,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_metadata_size_calculate PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,6 +68,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_metadata_size_calculate(const NX_SECURE_TLS_CRYPTO *cipher_table, diff --git a/nx_secure/src/nxe_secure_tls_packet_allocate.c b/nx_secure/src/nxe_secure_tls_packet_allocate.c index c6b1174c..c923ead2 100644 --- a/nx_secure/src/nxe_secure_tls_packet_allocate.c +++ b/nx_secure/src/nxe_secure_tls_packet_allocate.c @@ -34,7 +34,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_packet_allocate PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,6 +68,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_packet_allocate(NX_SECURE_TLS_SESSION *tls_session, NX_PACKET_POOL *pool_ptr, diff --git a/nx_secure/src/nxe_secure_tls_psk_add.c b/nx_secure/src/nxe_secure_tls_psk_add.c index 391b88e8..7391ac66 100644 --- a/nx_secure/src/nxe_secure_tls_psk_add.c +++ b/nx_secure/src/nxe_secure_tls_psk_add.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_psk_add PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -72,6 +72,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #if defined(NX_SECURE_ENABLE_PSK_CIPHERSUITES) || defined(NX_SECURE_ENABLE_ECJPAKE_CIPHERSUITE) diff --git a/nx_secure/src/nxe_secure_tls_remote_certificate_allocate.c b/nx_secure/src/nxe_secure_tls_remote_certificate_allocate.c index 24ca53f0..074866be 100644 --- a/nx_secure/src/nxe_secure_tls_remote_certificate_allocate.c +++ b/nx_secure/src/nxe_secure_tls_remote_certificate_allocate.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_remote_certificate_allocate PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -72,6 +72,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_remote_certificate_allocate(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nxe_secure_tls_remote_certificate_buffer_allocate.c b/nx_secure/src/nxe_secure_tls_remote_certificate_buffer_allocate.c index fb9b330f..30398ac8 100644 --- a/nx_secure/src/nxe_secure_tls_remote_certificate_buffer_allocate.c +++ b/nx_secure/src/nxe_secure_tls_remote_certificate_buffer_allocate.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_remote_certificate_buffer_allocate PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -70,6 +70,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_remote_certificate_buffer_allocate(NX_SECURE_TLS_SESSION *tls_session, UINT certs_number, VOID *certificate_buffer, ULONG buffer_size) diff --git a/nx_secure/src/nxe_secure_tls_remote_certificate_free_all.c b/nx_secure/src/nxe_secure_tls_remote_certificate_free_all.c index cbc6b059..afb4a1ac 100644 --- a/nx_secure/src/nxe_secure_tls_remote_certificate_free_all.c +++ b/nx_secure/src/nxe_secure_tls_remote_certificate_free_all.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_remote_certificate_free_all PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -69,6 +69,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_remote_certificate_free_all(NX_SECURE_TLS_SESSION *tls_session) diff --git a/nx_secure/src/nxe_secure_tls_server_certificate_add.c b/nx_secure/src/nxe_secure_tls_server_certificate_add.c index 553a7c4a..5b896c17 100644 --- a/nx_secure/src/nxe_secure_tls_server_certificate_add.c +++ b/nx_secure/src/nxe_secure_tls_server_certificate_add.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_server_certificate_add PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -70,6 +70,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_server_certificate_add(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nxe_secure_tls_server_certificate_find.c b/nx_secure/src/nxe_secure_tls_server_certificate_find.c index fd2c8d3e..35eb8634 100644 --- a/nx_secure/src/nxe_secure_tls_server_certificate_find.c +++ b/nx_secure/src/nxe_secure_tls_server_certificate_find.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_server_certificate_find PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -70,6 +70,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_server_certificate_find(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nxe_secure_tls_server_certificate_remove.c b/nx_secure/src/nxe_secure_tls_server_certificate_remove.c index 6f19bcc4..ed2a5f0e 100644 --- a/nx_secure/src/nxe_secure_tls_server_certificate_remove.c +++ b/nx_secure/src/nxe_secure_tls_server_certificate_remove.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_server_certificate_remove PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -70,6 +70,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_server_certificate_remove(NX_SECURE_TLS_SESSION *tls_session, UINT cert_id) diff --git a/nx_secure/src/nxe_secure_tls_session_alert_value_get.c b/nx_secure/src/nxe_secure_tls_session_alert_value_get.c index 4a067e4e..74c35511 100644 --- a/nx_secure/src/nxe_secure_tls_session_alert_value_get.c +++ b/nx_secure/src/nxe_secure_tls_session_alert_value_get.c @@ -32,7 +32,7 @@ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_session_alert_value_get PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -66,6 +66,8 @@ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_session_alert_value_get(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nxe_secure_tls_session_certificate_callback_set.c b/nx_secure/src/nxe_secure_tls_session_certificate_callback_set.c index 47db00cd..ba0d574d 100644 --- a/nx_secure/src/nxe_secure_tls_session_certificate_callback_set.c +++ b/nx_secure/src/nxe_secure_tls_session_certificate_callback_set.c @@ -34,7 +34,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_session_certificate_callback_set PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -67,6 +67,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_session_certificate_callback_set(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nxe_secure_tls_session_client_callback_set.c b/nx_secure/src/nxe_secure_tls_session_client_callback_set.c index ace5a95a..5f40ff3a 100644 --- a/nx_secure/src/nxe_secure_tls_session_client_callback_set.c +++ b/nx_secure/src/nxe_secure_tls_session_client_callback_set.c @@ -34,7 +34,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_session_client_callback_set PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -67,6 +67,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_session_client_callback_set(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nxe_secure_tls_session_client_verify_disable.c b/nx_secure/src/nxe_secure_tls_session_client_verify_disable.c index 09fd166d..871061f7 100644 --- a/nx_secure/src/nxe_secure_tls_session_client_verify_disable.c +++ b/nx_secure/src/nxe_secure_tls_session_client_verify_disable.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_session_client_verify_disable PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,6 +68,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_session_client_verify_disable(NX_SECURE_TLS_SESSION *tls_session) diff --git a/nx_secure/src/nxe_secure_tls_session_client_verify_enable.c b/nx_secure/src/nxe_secure_tls_session_client_verify_enable.c index a2066961..090ec4fc 100644 --- a/nx_secure/src/nxe_secure_tls_session_client_verify_enable.c +++ b/nx_secure/src/nxe_secure_tls_session_client_verify_enable.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_session_client_verify_enable PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,6 +68,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_session_client_verify_enable(NX_SECURE_TLS_SESSION *tls_session) diff --git a/nx_secure/src/nxe_secure_tls_session_create.c b/nx_secure/src/nxe_secure_tls_session_create.c index 3852a611..8f9580b8 100644 --- a/nx_secure/src/nxe_secure_tls_session_create.c +++ b/nx_secure/src/nxe_secure_tls_session_create.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_session_create PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -70,6 +70,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_session_create(NX_SECURE_TLS_SESSION *session_ptr, diff --git a/nx_secure/src/nxe_secure_tls_session_delete.c b/nx_secure/src/nxe_secure_tls_session_delete.c index 1277d82b..2e3af9ac 100644 --- a/nx_secure/src/nxe_secure_tls_session_delete.c +++ b/nx_secure/src/nxe_secure_tls_session_delete.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_session_delete PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -66,6 +66,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_session_delete(NX_SECURE_TLS_SESSION *tls_session) diff --git a/nx_secure/src/nxe_secure_tls_session_end.c b/nx_secure/src/nxe_secure_tls_session_end.c index 8c446177..381d2ac4 100644 --- a/nx_secure/src/nxe_secure_tls_session_end.c +++ b/nx_secure/src/nxe_secure_tls_session_end.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_session_end PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,6 +68,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_session_end(NX_SECURE_TLS_SESSION *tls_session, UINT wait_option) diff --git a/nx_secure/src/nxe_secure_tls_session_packet_buffer_set.c b/nx_secure/src/nxe_secure_tls_session_packet_buffer_set.c index 436ef062..5abe32ab 100644 --- a/nx_secure/src/nxe_secure_tls_session_packet_buffer_set.c +++ b/nx_secure/src/nxe_secure_tls_session_packet_buffer_set.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_session_packet_buffer_set PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -71,6 +71,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_session_packet_buffer_set(NX_SECURE_TLS_SESSION *session_ptr, diff --git a/nx_secure/src/nxe_secure_tls_session_protocol_version_override.c b/nx_secure/src/nxe_secure_tls_session_protocol_version_override.c index 18b8074e..579777f1 100644 --- a/nx_secure/src/nxe_secure_tls_session_protocol_version_override.c +++ b/nx_secure/src/nxe_secure_tls_session_protocol_version_override.c @@ -39,7 +39,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_session_protocol_version_override PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -72,6 +72,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_session_protocol_version_override(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nxe_secure_tls_session_receive.c b/nx_secure/src/nxe_secure_tls_session_receive.c index 4681cbfe..9a689c12 100644 --- a/nx_secure/src/nxe_secure_tls_session_receive.c +++ b/nx_secure/src/nxe_secure_tls_session_receive.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_session_receive PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -70,6 +70,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_session_receive(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nxe_secure_tls_session_renegotiate.c b/nx_secure/src/nxe_secure_tls_session_renegotiate.c index 06daf941..f5d1d3be 100644 --- a/nx_secure/src/nxe_secure_tls_session_renegotiate.c +++ b/nx_secure/src/nxe_secure_tls_session_renegotiate.c @@ -33,7 +33,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_session_renegotiate PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -65,9 +65,9 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* fixed renegotiation bug, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #ifndef NX_SECURE_TLS_DISABLE_SECURE_RENEGOTIATION diff --git a/nx_secure/src/nxe_secure_tls_session_renegotiate_callback_set.c b/nx_secure/src/nxe_secure_tls_session_renegotiate_callback_set.c index 66122cda..d97c85fc 100644 --- a/nx_secure/src/nxe_secure_tls_session_renegotiate_callback_set.c +++ b/nx_secure/src/nxe_secure_tls_session_renegotiate_callback_set.c @@ -34,7 +34,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_session_renegotiate_callback_set PORTABLE C */ -/* 6.0.2 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -67,9 +67,9 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ -/* 08-14-2020 Timothy Stapko Modified comment(s), */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ /* fixed renegotiation bug, */ -/* resulting in version 6.0.2 */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ #ifndef NX_SECURE_TLS_DISABLE_SECURE_RENEGOTIATION diff --git a/nx_secure/src/nxe_secure_tls_session_reset.c b/nx_secure/src/nxe_secure_tls_session_reset.c index 73c404da..ba1dc54d 100644 --- a/nx_secure/src/nxe_secure_tls_session_reset.c +++ b/nx_secure/src/nxe_secure_tls_session_reset.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_session_reset PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -66,6 +66,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_session_reset(NX_SECURE_TLS_SESSION *session_ptr) diff --git a/nx_secure/src/nxe_secure_tls_session_send.c b/nx_secure/src/nxe_secure_tls_session_send.c index b7e5e926..63eba468 100644 --- a/nx_secure/src/nxe_secure_tls_session_send.c +++ b/nx_secure/src/nxe_secure_tls_session_send.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_session_send PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -69,6 +69,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_session_send(NX_SECURE_TLS_SESSION *tls_session, NX_PACKET *packet_ptr, diff --git a/nx_secure/src/nxe_secure_tls_session_server_callback_set.c b/nx_secure/src/nxe_secure_tls_session_server_callback_set.c index cc37e2d9..cd24931b 100644 --- a/nx_secure/src/nxe_secure_tls_session_server_callback_set.c +++ b/nx_secure/src/nxe_secure_tls_session_server_callback_set.c @@ -34,7 +34,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_session_server_callback_set PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -67,6 +67,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_session_server_callback_set(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nxe_secure_tls_session_sni_extension_parse.c b/nx_secure/src/nxe_secure_tls_session_sni_extension_parse.c index 15052097..0b0c4ada 100644 --- a/nx_secure/src/nxe_secure_tls_session_sni_extension_parse.c +++ b/nx_secure/src/nxe_secure_tls_session_sni_extension_parse.c @@ -33,7 +33,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_session_sni_extension_parse PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -70,6 +70,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_session_sni_extension_parse(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nxe_secure_tls_session_sni_extension_set.c b/nx_secure/src/nxe_secure_tls_session_sni_extension_set.c index 7bc2b9cc..d7bed288 100644 --- a/nx_secure/src/nxe_secure_tls_session_sni_extension_set.c +++ b/nx_secure/src/nxe_secure_tls_session_sni_extension_set.c @@ -33,7 +33,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_session_sni_extension_set PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -66,6 +66,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_session_sni_extension_set(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nxe_secure_tls_session_start.c b/nx_secure/src/nxe_secure_tls_session_start.c index 2fc692e2..147f3f80 100644 --- a/nx_secure/src/nxe_secure_tls_session_start.c +++ b/nx_secure/src/nxe_secure_tls_session_start.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_session_start PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,6 +68,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_session_start(NX_SECURE_TLS_SESSION *tls_session, NX_TCP_SOCKET *tcp_socket, diff --git a/nx_secure/src/nxe_secure_tls_session_time_function_set.c b/nx_secure/src/nxe_secure_tls_session_time_function_set.c index 059c8d45..47f99660 100644 --- a/nx_secure/src/nxe_secure_tls_session_time_function_set.c +++ b/nx_secure/src/nxe_secure_tls_session_time_function_set.c @@ -34,7 +34,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_session_time_function_set PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -66,6 +66,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_session_time_function_set(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nxe_secure_tls_session_x509_client_verify_configure.c b/nx_secure/src/nxe_secure_tls_session_x509_client_verify_configure.c index 0b9cee25..414c2b32 100644 --- a/nx_secure/src/nxe_secure_tls_session_x509_client_verify_configure.c +++ b/nx_secure/src/nxe_secure_tls_session_x509_client_verify_configure.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_session_x509_client_verify_configure PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -71,6 +71,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_session_x509_client_verify_configure(NX_SECURE_TLS_SESSION *tls_session, UINT certs_number, VOID *certificate_buffer, ULONG buffer_size) diff --git a/nx_secure/src/nxe_secure_tls_trusted_certificate_add.c b/nx_secure/src/nxe_secure_tls_trusted_certificate_add.c index c508e9ab..f8be6bd5 100644 --- a/nx_secure/src/nxe_secure_tls_trusted_certificate_add.c +++ b/nx_secure/src/nxe_secure_tls_trusted_certificate_add.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_trusted_certificate_add PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -70,6 +70,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_trusted_certificate_add(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nxe_secure_tls_trusted_certificate_remove.c b/nx_secure/src/nxe_secure_tls_trusted_certificate_remove.c index 962947f3..e22e630b 100644 --- a/nx_secure/src/nxe_secure_tls_trusted_certificate_remove.c +++ b/nx_secure/src/nxe_secure_tls_trusted_certificate_remove.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_tls_trusted_certificate_remove PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -71,6 +71,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_tls_trusted_certificate_remove(NX_SECURE_TLS_SESSION *tls_session, diff --git a/nx_secure/src/nxe_secure_x509_certificate_initialize.c b/nx_secure/src/nxe_secure_x509_certificate_initialize.c index 0c41e3b1..6722ae8a 100644 --- a/nx_secure/src/nxe_secure_x509_certificate_initialize.c +++ b/nx_secure/src/nxe_secure_x509_certificate_initialize.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_x509_certificate_initialize PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -75,6 +75,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_x509_certificate_initialize(NX_SECURE_X509_CERT *certificate, UCHAR *certificate_data, diff --git a/nx_secure/src/nxe_secure_x509_common_name_dns_check.c b/nx_secure/src/nxe_secure_x509_common_name_dns_check.c index d45fb909..4787c1a3 100644 --- a/nx_secure/src/nxe_secure_x509_common_name_dns_check.c +++ b/nx_secure/src/nxe_secure_x509_common_name_dns_check.c @@ -34,7 +34,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_x509_common_name_dns_check PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,6 +68,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_x509_common_name_dns_check(NX_SECURE_X509_CERT *certificate, const UCHAR *dns_tld, diff --git a/nx_secure/src/nxe_secure_x509_crl_revocation_check.c b/nx_secure/src/nxe_secure_x509_crl_revocation_check.c index ad44a27d..837e3984 100644 --- a/nx_secure/src/nxe_secure_x509_crl_revocation_check.c +++ b/nx_secure/src/nxe_secure_x509_crl_revocation_check.c @@ -34,7 +34,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_x509_crl_revocation_check PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,6 +68,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_x509_crl_revocation_check(const UCHAR *crl_data, UINT crl_length, diff --git a/nx_secure/src/nxe_secure_x509_dns_name_initialize.c b/nx_secure/src/nxe_secure_x509_dns_name_initialize.c index ed5dc6f9..e5edd93e 100644 --- a/nx_secure/src/nxe_secure_x509_dns_name_initialize.c +++ b/nx_secure/src/nxe_secure_x509_dns_name_initialize.c @@ -36,7 +36,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_x509_dns_name_initialize PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -69,6 +69,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_x509_dns_name_initialize(NX_SECURE_X509_DNS_NAME *dns_name, diff --git a/nx_secure/src/nxe_secure_x509_extended_key_usage_extension_parse.c b/nx_secure/src/nxe_secure_x509_extended_key_usage_extension_parse.c index 87af2449..29dfdf29 100644 --- a/nx_secure/src/nxe_secure_x509_extended_key_usage_extension_parse.c +++ b/nx_secure/src/nxe_secure_x509_extended_key_usage_extension_parse.c @@ -35,7 +35,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_x509_extended_key_usage_extension_parse PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,6 +68,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_x509_extended_key_usage_extension_parse(NX_SECURE_X509_CERT *certificate, diff --git a/nx_secure/src/nxe_secure_x509_extension_find.c b/nx_secure/src/nxe_secure_x509_extension_find.c index a113c23e..c87dcccb 100644 --- a/nx_secure/src/nxe_secure_x509_extension_find.c +++ b/nx_secure/src/nxe_secure_x509_extension_find.c @@ -35,7 +35,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_x509_extension_find PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -68,6 +68,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_x509_extension_find(NX_SECURE_X509_CERT *certificate, diff --git a/nx_secure/src/nxe_secure_x509_key_usage_extension_parse.c b/nx_secure/src/nxe_secure_x509_key_usage_extension_parse.c index 7862bb72..f46e9b48 100644 --- a/nx_secure/src/nxe_secure_x509_key_usage_extension_parse.c +++ b/nx_secure/src/nxe_secure_x509_key_usage_extension_parse.c @@ -35,7 +35,7 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _nxe_secure_x509_key_usage_extension_parse PORTABLE C */ -/* 6.0 */ +/* 6.1 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ @@ -69,6 +69,8 @@ NX_SECURE_CALLER_CHECKING_EXTERNS /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Timothy Stapko Initial Version 6.0 */ +/* 09-30-2020 Timothy Stapko Modified comment(s), */ +/* resulting in version 6.1 */ /* */ /**************************************************************************/ UINT _nxe_secure_x509_key_usage_extension_parse(NX_SECURE_X509_CERT *certificate, USHORT *bitfield) |
