/NetX-Duo-v6.4.1/nx_secure/src/ |
D | nx_secure_tls_1_3_client_handshake.c | 152 UINT _nx_secure_tls_1_3_client_handshake(NX_SECURE_TLS_SESSION *tls_session, UCHAR *packet_buffer, in _nx_secure_tls_1_3_client_handshake() argument 243 … tls_session -> nx_secure_tls_handshake_record_expected_length = message_length + header_bytes; in _nx_secure_tls_1_3_client_handshake() 245 …tls_session -> nx_secure_tls_handshake_record_fragment_state = NX_SECURE_TLS_HANDSHAKE_RECEIVED_FR… in _nx_secure_tls_1_3_client_handshake() 254 packet_pool = tls_session -> nx_secure_tls_packet_pool; in _nx_secure_tls_1_3_client_handshake() 258 …if (tls_session->nx_secure_tls_local_session_active && message_type != NX_SECURE_TLS_HELLO_REQUEST… in _nx_secure_tls_1_3_client_handshake() 261 … _nx_secure_tls_handshake_hash_update(tls_session, packet_start, message_length + header_bytes); in _nx_secure_tls_1_3_client_handshake() 273 status = _nx_secure_tls_process_serverhello(tls_session, packet_buffer, message_length); in _nx_secure_tls_1_3_client_handshake() 278 if ((status == NX_SUCCESS) && (tls_session -> nx_secure_tls_1_3 == NX_FALSE)) in _nx_secure_tls_1_3_client_handshake() 280 if (tls_session -> nx_secure_tls_protocol_version == NX_SECURE_TLS_VERSION_TLS_1_2) in _nx_secure_tls_1_3_client_handshake() 289 … if (NX_SECURE_MEMCMP(&(tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_random[24]), in _nx_secure_tls_1_3_client_handshake() [all …]
|
D | nx_secure_tls_1_3_server_handshake.c | 117 UINT _nx_secure_tls_1_3_server_handshake(NX_SECURE_TLS_SESSION *tls_session, UCHAR *packet_buffer, in _nx_secure_tls_1_3_server_handshake() argument 204 … tls_session -> nx_secure_tls_handshake_record_expected_length = message_length + header_bytes; in _nx_secure_tls_1_3_server_handshake() 206 …tls_session -> nx_secure_tls_handshake_record_fragment_state = NX_SECURE_TLS_HANDSHAKE_RECEIVED_FR… in _nx_secure_tls_1_3_server_handshake() 215 packet_pool = tls_session -> nx_secure_tls_packet_pool; in _nx_secure_tls_1_3_server_handshake() 225 old_server_state = tls_session -> nx_secure_tls_server_state; in _nx_secure_tls_1_3_server_handshake() 226 tls_session -> nx_secure_tls_server_state = NX_SECURE_TLS_SERVER_STATE_IDLE; in _nx_secure_tls_1_3_server_handshake() 229 status = _nx_secure_tls_process_clienthello(tls_session, packet_buffer, message_length); in _nx_secure_tls_1_3_server_handshake() 236 if (tls_session -> nx_secure_tls_1_3 == NX_FALSE) in _nx_secure_tls_1_3_server_handshake() 248 _nx_secure_tls_handshake_hash_init(tls_session); in _nx_secure_tls_1_3_server_handshake() 251 … if (tls_session -> nx_secure_tls_server_state != NX_SECURE_TLS_SERVER_STATE_SEND_HELLO_RETRY) in _nx_secure_tls_1_3_server_handshake() [all …]
|
D | nx_secure_tls_client_handshake.c | 127 UINT _nx_secure_tls_client_handshake(NX_SECURE_TLS_SESSION *tls_session, UCHAR *packet_buffer, in _nx_secure_tls_client_handshake() argument 171 … tls_session -> nx_secure_tls_handshake_record_expected_length = message_length + header_bytes; in _nx_secure_tls_client_handshake() 173 …tls_session -> nx_secure_tls_handshake_record_fragment_state = NX_SECURE_TLS_HANDSHAKE_RECEIVED_FR… in _nx_secure_tls_client_handshake() 183 packet_pool = tls_session -> nx_secure_tls_packet_pool; in _nx_secure_tls_client_handshake() 190 … _nx_secure_tls_handshake_hash_update(tls_session, packet_start, message_length + header_bytes); in _nx_secure_tls_client_handshake() 202 status = _nx_secure_tls_process_serverhello(tls_session, packet_buffer, message_length); in _nx_secure_tls_client_handshake() 206 …status = _nx_secure_tls_process_remote_certificate(tls_session, packet_buffer, message_length, pac… in _nx_secure_tls_client_handshake() 211 tls_session -> nx_secure_tls_client_state = NX_SECURE_TLS_CLIENT_STATE_SERVERHELLO_DONE; in _nx_secure_tls_client_handshake() 216 … status = _nx_secure_tls_process_server_key_exchange(tls_session, packet_buffer, message_length); in _nx_secure_tls_client_handshake() 220 … status = _nx_secure_tls_process_certificate_request(tls_session, packet_buffer, message_length); in _nx_secure_tls_client_handshake() [all …]
|
D | nx_secure_tls_process_record.c | 109 UINT _nx_secure_tls_process_record(NX_SECURE_TLS_SESSION *tls_session, NX_PACKET *packet_ptr, in _nx_secure_tls_process_record() argument 150 if (tls_session -> nx_secure_tls_socket_type == NX_SECURE_TLS_SESSION_TYPE_NONE) in _nx_secure_tls_process_record() 174 if (tls_session -> nx_secure_record_queue_header == NX_NULL) in _nx_secure_tls_process_record() 176 tls_session -> nx_secure_record_queue_header = packet_ptr; in _nx_secure_tls_process_record() 182 … tls_session -> nx_secure_record_queue_header -> nx_packet_last -> nx_packet_next = packet_ptr; in _nx_secure_tls_process_record() 183 … tls_session -> nx_secure_record_queue_header -> nx_packet_last = packet_ptr -> nx_packet_last; in _nx_secure_tls_process_record() 184 …tls_session -> nx_secure_record_queue_header -> nx_packet_length += packet_ptr -> nx_packet_length; in _nx_secure_tls_process_record() 189 …if (tls_session->nx_secure_tls_handshake_record_fragment_state == NX_SECURE_TLS_HANDSHAKE_NO_FRAGM… in _nx_secure_tls_process_record() 191 tls_session->nx_secure_tls_packet_buffer_bytes_copied = 0; in _nx_secure_tls_process_record() 195 packet_ptr = tls_session -> nx_secure_record_queue_header; in _nx_secure_tls_process_record() [all …]
|
D | nx_secure_tls_process_server_key_exchange.c | 89 UINT _nx_secure_tls_process_server_key_exchange(NX_SECURE_TLS_SESSION *tls_session, in _nx_secure_tls_process_server_key_exchange() argument 103 ciphersuite = tls_session -> nx_secure_tls_session_ciphersuite; in _nx_secure_tls_process_server_key_exchange() 117 … if (tls_session -> nx_secure_tls_client_state != NX_SECURE_TLS_CLIENT_STATE_SERVER_CERTIFICATE) in _nx_secure_tls_process_server_key_exchange() 122 tls_session -> nx_secure_tls_client_state = NX_SECURE_TLS_CLIENT_STATE_SERVER_KEY_EXCHANGE; in _nx_secure_tls_process_server_key_exchange() 126 …status = tls_session -> nx_secure_process_server_key_exchange(tls_session -> nx_secure_tls_session… in _nx_secure_tls_process_server_key_exchange() 127 … tls_session -> nx_secure_tls_protocol_version, packet_buffer, message_length, in _nx_secure_tls_process_server_key_exchange() 128 … &tls_session -> nx_secure_tls_key_material, &tls_session -> nx_secure_tls_credentials, in _nx_secure_tls_process_server_key_exchange() 129 …&tls_session -> nx_secure_tls_handshake_hash, tls_session -> nx_secure_public_cipher_metadata_area, in _nx_secure_tls_process_server_key_exchange() 130 … tls_session -> nx_secure_public_cipher_metadata_size, in _nx_secure_tls_process_server_key_exchange() 131 …tls_session -> nx_secure_public_auth_metadata_area, tls_session -> nx_secure_public_auth_metadata_… in _nx_secure_tls_process_server_key_exchange() [all …]
|
D | nx_secure_tls_1_3_session_keys_set.c | 83 UINT _nx_secure_tls_1_3_session_keys_set(NX_SECURE_TLS_SESSION *tls_session, USHORT key_set) in _nx_secure_tls_1_3_session_keys_set() argument 97 tls_session -> nx_secure_tls_local_session_active = 1; in _nx_secure_tls_1_3_session_keys_set() 100 …NX_SECURE_MEMSET(tls_session -> nx_secure_tls_local_sequence_number, 0, sizeof(tls_session -> nx_s… in _nx_secure_tls_1_3_session_keys_set() 104 tls_session -> nx_secure_tls_remote_session_active = 1; in _nx_secure_tls_1_3_session_keys_set() 107 …NX_SECURE_MEMSET(tls_session -> nx_secure_tls_remote_sequence_number, 0, sizeof(tls_session -> nx_… in _nx_secure_tls_1_3_session_keys_set() 112 …if ((key_set == NX_SECURE_TLS_KEY_SET_REMOTE && tls_session -> nx_secure_tls_socket_type == NX_SEC… in _nx_secure_tls_1_3_session_keys_set() 113 …(key_set == NX_SECURE_TLS_KEY_SET_LOCAL && tls_session -> nx_secure_tls_socket_type == NX_SECURE_… in _nx_secure_tls_1_3_session_keys_set() 124 if (tls_session -> nx_secure_tls_session_ciphersuite == NX_NULL) in _nx_secure_tls_1_3_session_keys_set() 131 …session_cipher_method = tls_session -> nx_secure_tls_session_ciphersuite -> nx_secure_tls_session_… in _nx_secure_tls_1_3_session_keys_set() 142 … NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_key_material.nx_secure_tls_client_write_key, in _nx_secure_tls_1_3_session_keys_set() [all …]
|
D | nx_secure_tls_server_handshake.c | 116 UINT _nx_secure_tls_server_handshake(NX_SECURE_TLS_SESSION *tls_session, UCHAR *packet_buffer, in _nx_secure_tls_server_handshake() argument 157 … tls_session -> nx_secure_tls_handshake_record_expected_length = message_length + header_bytes; in _nx_secure_tls_server_handshake() 159 …tls_session -> nx_secure_tls_handshake_record_fragment_state = NX_SECURE_TLS_HANDSHAKE_RECEIVED_FR… in _nx_secure_tls_server_handshake() 168 packet_pool = tls_session -> nx_secure_tls_packet_pool; in _nx_secure_tls_server_handshake() 176 _nx_secure_tls_handshake_hash_init(tls_session); in _nx_secure_tls_server_handshake() 188 status = _nx_secure_tls_process_clienthello(tls_session, packet_buffer, message_length); in _nx_secure_tls_server_handshake() 189 tls_session -> nx_secure_tls_server_state = NX_SECURE_TLS_SERVER_STATE_SEND_HELLO; in _nx_secure_tls_server_handshake() 194 …status = _nx_secure_tls_process_remote_certificate(tls_session, packet_buffer, message_length, dat… in _nx_secure_tls_server_handshake() 195 … tls_session -> nx_secure_tls_server_state = NX_SECURE_TLS_SERVER_STATE_CLIENT_CERTIFICATE; in _nx_secure_tls_server_handshake() 199 … status = _nx_secure_tls_process_certificate_verify(tls_session, packet_buffer, message_length); in _nx_secure_tls_server_handshake() [all …]
|
D | nx_secure_tls_process_serverhello.c | 88 UINT _nx_secure_tls_process_serverhello(NX_SECURE_TLS_SESSION *tls_session, UCHAR *packet_buffer, in _nx_secure_tls_process_serverhello() argument 101 USHORT tls_1_3 = tls_session -> nx_secure_tls_1_3; in _nx_secure_tls_process_serverhello() 103 NX_SECURE_TLS_SERVER_STATE old_client_state = tls_session -> nx_secure_tls_client_state; in _nx_secure_tls_process_serverhello() 105 tls_session -> nx_secure_tls_client_state = NX_SECURE_TLS_CLIENT_STATE_IDLE; in _nx_secure_tls_process_serverhello() 124 if (tls_session -> nx_secure_tls_1_3 && tls_session -> nx_secure_tls_local_session_active) in _nx_secure_tls_process_serverhello() 137 status = _nx_secure_tls_check_protocol_version(tls_session, version, NX_SECURE_TLS); in _nx_secure_tls_process_serverhello() 145 tls_session -> nx_secure_tls_protocol_version = version; in _nx_secure_tls_process_serverhello() 148 if (tls_session -> nx_secure_tls_1_3 && in _nx_secure_tls_process_serverhello() 161 tls_session -> nx_secure_tls_client_state = NX_SECURE_TLS_CLIENT_STATE_HELLO_RETRY; in _nx_secure_tls_process_serverhello() 169 …NX_SECURE_MEMCPY(&tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_random[0], &packe… in _nx_secure_tls_process_serverhello() [all …]
|
D | nx_secure_tls_process_client_key_exchange.c | 85 UINT _nx_secure_tls_process_client_key_exchange(NX_SECURE_TLS_SESSION *tls_session, in _nx_secure_tls_process_client_key_exchange() argument 93 if (tls_session -> nx_secure_tls_session_ciphersuite == NX_NULL) in _nx_secure_tls_process_client_key_exchange() 103 …status = tls_session -> nx_secure_process_client_key_exchange(tls_session -> nx_secure_tls_session… in _nx_secure_tls_process_client_key_exchange() 104 …packet_buffer, message_length, &tls_session -> nx_secure_tls_received_remote_credentials, &tls_ses… in _nx_secure_tls_process_client_key_exchange() 105 … &tls_session -> nx_secure_tls_credentials, tls_session -> nx_secure_public_cipher_metadata_area, in _nx_secure_tls_process_client_key_exchange() 106 … tls_session -> nx_secure_public_cipher_metadata_size, in _nx_secure_tls_process_client_key_exchange() 107 … tls_session -> nx_secure_public_auth_metadata_area, in _nx_secure_tls_process_client_key_exchange() 108 … tls_session -> nx_secure_public_auth_metadata_size, in _nx_secure_tls_process_client_key_exchange() 109 … &tls_session -> nx_secure_tls_ecc); in _nx_secure_tls_process_client_key_exchange() 115 …status = tls_session -> nx_secure_process_client_key_exchange(tls_session -> nx_secure_tls_session… in _nx_secure_tls_process_client_key_exchange() [all …]
|
D | nx_secure_tls_finished_hash_generate.c | 79 UINT _nx_secure_tls_finished_hash_generate(NX_SECURE_TLS_SESSION *tls_session, in _nx_secure_tls_finished_hash_generate() argument 118 if (tls_session -> nx_secure_tls_session_ciphersuite == NX_NULL) in _nx_secure_tls_finished_hash_generate() 125 master_sec = tls_session -> nx_secure_tls_key_material.nx_secure_tls_master_secret; in _nx_secure_tls_finished_hash_generate() 131 if (tls_session -> nx_secure_tls_protocol_version == NX_SECURE_TLS_VERSION_TLS_1_2 || in _nx_secure_tls_finished_hash_generate() 132 tls_session -> nx_secure_tls_protocol_version == NX_SECURE_DTLS_VERSION_1_2) in _nx_secure_tls_finished_hash_generate() 134 if (tls_session -> nx_secure_tls_protocol_version == NX_SECURE_TLS_VERSION_TLS_1_2) in _nx_secure_tls_finished_hash_generate() 138 …NX_SECURE_HASH_METADATA_CLONE(tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_… in _nx_secure_tls_finished_hash_generate() 139 … tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata, in _nx_secure_tls_finished_hash_generate() 140 …tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata_size); /*… in _nx_secure_tls_finished_hash_generate() 143 …method_ptr = tls_session -> nx_secure_tls_crypto_table -> nx_secure_tls_handshake_hash_sha256_meth… in _nx_secure_tls_finished_hash_generate() [all …]
|
D | nx_secure_tls_session_renegotiate.c | 110 UINT _nx_secure_tls_session_renegotiate(NX_SECURE_TLS_SESSION *tls_session, UINT wait_option) in _nx_secure_tls_session_renegotiate() argument 120 tls_session -> nx_secure_record_queue_header = NX_NULL; in _nx_secure_tls_session_renegotiate() 121 tls_session -> nx_secure_record_decrypted_packet = NX_NULL; in _nx_secure_tls_session_renegotiate() 124 …if (tls_session -> nx_secure_tls_remote_session_active != NX_TRUE || tls_session -> nx_secure_tls_… in _nx_secure_tls_session_renegotiate() 132 if (tls_session -> nx_secure_tls_1_3) in _nx_secure_tls_session_renegotiate() 140 if(!tls_session -> nx_secure_tls_secure_renegotiation) in _nx_secure_tls_session_renegotiate() 148 if (tls_session -> nx_secure_tls_socket_type == NX_SECURE_TLS_SESSION_TYPE_CLIENT) in _nx_secure_tls_session_renegotiate() 152 …status = _nx_secure_tls_allocate_handshake_packet(tls_session, tls_session -> nx_secure_tls_packet… in _nx_secure_tls_session_renegotiate() 163 tls_session -> nx_secure_tls_client_state = NX_SECURE_TLS_CLIENT_STATE_RENEGOTIATING; in _nx_secure_tls_session_renegotiate() 164 tls_session -> nx_secure_tls_local_initiated_renegotiation = NX_TRUE; in _nx_secure_tls_session_renegotiate() [all …]
|
D | nx_secure_tls_session_keys_set.c | 90 UINT _nx_secure_tls_session_keys_set(NX_SECURE_TLS_SESSION *tls_session, USHORT key_set) in _nx_secure_tls_session_keys_set() argument 97 tls_session -> nx_secure_tls_local_session_active = 1; in _nx_secure_tls_session_keys_set() 101 tls_session -> nx_secure_tls_remote_session_active = 1; in _nx_secure_tls_session_keys_set() 105 …if ((key_set == NX_SECURE_TLS_KEY_SET_REMOTE && tls_session -> nx_secure_tls_socket_type == NX_SEC… in _nx_secure_tls_session_keys_set() 106 …(key_set == NX_SECURE_TLS_KEY_SET_LOCAL && tls_session -> nx_secure_tls_socket_type == NX_SECURE_… in _nx_secure_tls_session_keys_set() 118 if (tls_session -> nx_secure_tls_session_ciphersuite == NX_NULL) in _nx_secure_tls_session_keys_set() 128 …status = tls_session -> nx_secure_session_keys_set(tls_session -> nx_secure_tls_session_ciphersuit… in _nx_secure_tls_session_keys_set() 129 … sizeof(tls_session -> nx_secure_tls_key_material.nx_secure_tls_key_material_data), in _nx_secure_tls_session_keys_set() 130 … is_client, &tls_session -> nx_secure_tls_session_cipher_client_initialized, in _nx_secure_tls_session_keys_set() 131 …tls_session -> nx_secure_session_cipher_metadata_area_client, &tls_session -> nx_secure_session_ci… in _nx_secure_tls_session_keys_set() [all …]
|
D | nx_secure_tls_handshake_hash_update.c | 82 UINT _nx_secure_tls_handshake_hash_update(NX_SECURE_TLS_SESSION *tls_session, UCHAR *data, in _nx_secure_tls_handshake_hash_update() argument 94 if(tls_session->nx_secure_tls_1_3) in _nx_secure_tls_handshake_hash_update() 97 if (tls_session -> nx_secure_tls_session_ciphersuite == NX_NULL) in _nx_secure_tls_handshake_hash_update() 100 …method_ptr = tls_session -> nx_secure_tls_crypto_table->nx_secure_tls_handshake_hash_sha256_method; in _nx_secure_tls_handshake_hash_update() 106 method_ptr = tls_session -> nx_secure_tls_session_ciphersuite -> nx_secure_tls_hash; in _nx_secure_tls_handshake_hash_update() 116 … tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_handler, in _nx_secure_tls_handshake_hash_update() 125 … tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata, in _nx_secure_tls_handshake_hash_update() 126 … tls_session -> nx_secure_tls_handshake_hash.nx_secure_tls_handshake_hash_sha256_metadata_size, in _nx_secure_tls_handshake_hash_update() 132 if (tls_session -> nx_secure_tls_socket_type == NX_SECURE_TLS_SESSION_TYPE_SERVER) in _nx_secure_tls_handshake_hash_update() 134 …hello_retry_process = (tls_session -> nx_secure_tls_server_state == NX_SECURE_TLS_SERVER_STATE_SEN… in _nx_secure_tls_handshake_hash_update() [all …]
|
D | nx_secure_tls_generate_keys.c | 80 UINT _nx_secure_tls_generate_keys(NX_SECURE_TLS_SESSION *tls_session) in _nx_secure_tls_generate_keys() argument 104 ciphersuite = tls_session -> nx_secure_tls_session_ciphersuite; in _nx_secure_tls_generate_keys() 112 pre_master_sec = tls_session -> nx_secure_tls_key_material.nx_secure_tls_pre_master_secret; in _nx_secure_tls_generate_keys() 113 …pre_master_sec_size = tls_session -> nx_secure_tls_key_material.nx_secure_tls_pre_master_secret_si… in _nx_secure_tls_generate_keys() 114 master_sec = tls_session -> nx_secure_tls_key_material.nx_secure_tls_master_secret; in _nx_secure_tls_generate_keys() 119 if (tls_session -> nx_secure_tls_protocol_version == NX_SECURE_TLS_VERSION_TLS_1_2 || in _nx_secure_tls_generate_keys() 120 tls_session -> nx_secure_tls_protocol_version == NX_SECURE_DTLS_VERSION_1_2) in _nx_secure_tls_generate_keys() 122 if (tls_session -> nx_secure_tls_protocol_version == NX_SECURE_TLS_VERSION_TLS_1_2) in _nx_secure_tls_generate_keys() 133 if (tls_session -> nx_secure_tls_protocol_version == NX_SECURE_TLS_VERSION_TLS_1_0 || in _nx_secure_tls_generate_keys() 134 tls_session -> nx_secure_tls_protocol_version == NX_SECURE_TLS_VERSION_TLS_1_1 || in _nx_secure_tls_generate_keys() [all …]
|
D | nx_secure_tls_generate_premaster_secret.c | 80 UINT _nx_secure_tls_generate_premaster_secret(NX_SECURE_TLS_SESSION *tls_session, UINT id) in _nx_secure_tls_generate_premaster_secret() argument 85 if (tls_session -> nx_secure_tls_session_ciphersuite == NX_NULL) in _nx_secure_tls_generate_premaster_secret() 92 _nx_secure_tls_protocol_version_get(tls_session, &protocol_version, id); in _nx_secure_tls_generate_premaster_secret() 95 …status = tls_session -> nx_secure_generate_premaster_secret(tls_session -> nx_secure_tls_session_c… in _nx_secure_tls_generate_premaster_secret() 96 … &tls_session -> nx_secure_tls_key_material, &tls_session -> nx_secure_tls_credentials, in _nx_secure_tls_generate_premaster_secret() 97 … tls_session -> nx_secure_tls_socket_type, in _nx_secure_tls_generate_premaster_secret() 98 …&tls_session -> nx_secure_tls_received_remote_credentials, tls_session -> nx_secure_public_cipher_… in _nx_secure_tls_generate_premaster_secret() 99 … tls_session -> nx_secure_public_cipher_metadata_size, &tls_session -> nx_secure_tls_ecc); in _nx_secure_tls_generate_premaster_secret() 101 …status = tls_session -> nx_secure_generate_premaster_secret(tls_session -> nx_secure_tls_session_c… in _nx_secure_tls_generate_premaster_secret() 102 … &tls_session -> nx_secure_tls_key_material, &tls_session -> nx_secure_tls_credentials, in _nx_secure_tls_generate_premaster_secret() [all …]
|
D | nx_secure_tls_send_record.c | 100 UINT _nx_secure_tls_send_record(NX_SECURE_TLS_SESSION *tls_session, NX_PACKET *send_packet, in _nx_secure_tls_send_record() argument 118 if ((tls_session -> nx_secure_tls_tcp_socket) && in _nx_secure_tls_send_record() 119 (tls_session -> nx_secure_tls_tcp_socket -> nx_tcp_socket_ip_ptr) && in _nx_secure_tls_send_record() 120 …(tx_thread_identify() == &(tls_session -> nx_secure_tls_tcp_socket -> nx_tcp_socket_ip_ptr -> nx_i… in _nx_secure_tls_send_record() 130 status = tx_mutex_get(&(tls_session -> nx_secure_tls_session_transmit_mutex), TX_WAIT_FOREVER); in _nx_secure_tls_send_record() 143 if (tls_session -> nx_secure_tls_local_session_active in _nx_secure_tls_send_record() 145 && !tls_session->nx_secure_tls_1_3 in _nx_secure_tls_send_record() 151 status = _nx_secure_tls_session_iv_size_get(tls_session, &iv_size); in _nx_secure_tls_send_record() 155 tx_mutex_put(&(tls_session -> nx_secure_tls_session_transmit_mutex)); in _nx_secure_tls_send_record() 164 tx_mutex_put(&(tls_session -> nx_secure_tls_session_transmit_mutex)); in _nx_secure_tls_send_record() [all …]
|
D | nx_secure_dtls_process_header.c | 89 NX_SECURE_TLS_SESSION *tls_session; in _nx_secure_dtls_process_header() local 93 tls_session = &dtls_session -> nx_secure_dtls_tls_session; in _nx_secure_dtls_process_header() 170 NX_CHANGE_ULONG_ENDIAN(tls_session -> nx_secure_tls_remote_sequence_number[0]); in _nx_secure_dtls_process_header() 171 NX_CHANGE_ULONG_ENDIAN(tls_session -> nx_secure_tls_remote_sequence_number[1]); in _nx_secure_dtls_process_header() 182 NX_CHANGE_ULONG_ENDIAN(tls_session -> nx_secure_tls_remote_sequence_number[0]); in _nx_secure_dtls_process_header() 183 NX_CHANGE_ULONG_ENDIAN(tls_session -> nx_secure_tls_remote_sequence_number[1]); in _nx_secure_dtls_process_header() 218 if (remote_sequence_number[0] < tls_session -> nx_secure_tls_remote_sequence_number[0] || in _nx_secure_dtls_process_header() 219 remote_sequence_number[1] <= tls_session -> nx_secure_tls_remote_sequence_number[1]) in _nx_secure_dtls_process_header() 222 NX_CHANGE_ULONG_ENDIAN(tls_session -> nx_secure_tls_remote_sequence_number[0]); in _nx_secure_dtls_process_header() 223 NX_CHANGE_ULONG_ENDIAN(tls_session -> nx_secure_tls_remote_sequence_number[1]); in _nx_secure_dtls_process_header() [all …]
|
D | nx_secure_tls_1_3_generate_keys.c | 35 static UINT _nx_secure_tls_1_3_generate_handshake_secrets(NX_SECURE_TLS_SESSION *tls_session); 37 static UINT _nx_secure_tls_1_3_generate_session_secrets(NX_SECURE_TLS_SESSION *tls_session); 40 static UINT _nx_secure_tls_hkdf_expand_label(NX_SECURE_TLS_SESSION *tls_session, UCHAR *secret, UIN… 44 static UINT _nx_secure_tls_derive_secret(NX_SECURE_TLS_SESSION *tls_session, UCHAR *secret, UINT se… 49 static UINT _nx_secure_tls_hkdf_extract(NX_SECURE_TLS_SESSION *tls_session, UCHAR *salt, UINT salt_… 99 UINT _nx_secure_tls_1_3_generate_psk_secret(NX_SECURE_TLS_SESSION *tls_session, NX_SECURE_TLS_PSK_S… in _nx_secure_tls_1_3_generate_psk_secret() argument 123 …status = _nx_secure_tls_hkdf_extract(tls_session, _nx_secure_tls_zeroes, hash_length, psk_secret, … in _nx_secure_tls_1_3_generate_psk_secret() 140 …status = _nx_secure_tls_derive_secret(tls_session, psk_entry->nx_secure_tls_psk_early_secret, psk_… in _nx_secure_tls_1_3_generate_psk_secret() 155 …status = _nx_secure_tls_hkdf_expand_label(tls_session, psk_entry->nx_secure_tls_psk_binder_key, ps… in _nx_secure_tls_1_3_generate_psk_secret() 209 UINT _nx_secure_tls_1_3_generate_handshake_keys(NX_SECURE_TLS_SESSION *tls_session) in _nx_secure_tls_1_3_generate_handshake_keys() argument [all …]
|
D | nx_secure_tls_send_serverhello.c | 94 UINT _nx_secure_tls_send_serverhello(NX_SECURE_TLS_SESSION *tls_session, NX_PACKET *send_packet) in _nx_secure_tls_send_serverhello() argument 113 if ((6u + sizeof(tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_random)) > in _nx_secure_tls_send_serverhello() 128 protocol_version = tls_session -> nx_secure_tls_protocol_version; in _nx_secure_tls_send_serverhello() 136 if (tls_session -> nx_secure_tls_session_time_function != NX_NULL) in _nx_secure_tls_send_serverhello() 138 gmt_time = tls_session -> nx_secure_tls_session_time_function(); in _nx_secure_tls_send_serverhello() 142 …NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_random, (UCHAR *)&… in _nx_secure_tls_send_serverhello() 145 if (tls_session -> nx_secure_tls_server_state == NX_SECURE_TLS_SERVER_STATE_SEND_HELLO_RETRY) in _nx_secure_tls_send_serverhello() 147 NX_SECURE_MEMCPY(tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_random, in _nx_secure_tls_send_serverhello() 151 …else if (!(tls_session -> nx_secure_tls_1_3) && !(tls_session -> nx_secure_tls_protocol_version_ov… in _nx_secure_tls_send_serverhello() 157 …tls_session -> nx_secure_tls_key_material.nx_secure_tls_server_random[i] = (UCHAR)(random_valu… in _nx_secure_tls_send_serverhello() [all …]
|
D | nx_secure_tls_session_start.c | 87 UINT _nx_secure_tls_session_start(NX_SECURE_TLS_SESSION *tls_session, NX_TCP_SOCKET *tcp_socket, in _nx_secure_tls_session_start() argument 99 if (!tls_session -> nx_secure_tls_packet_pool) in _nx_secure_tls_session_start() 102 …tls_session -> nx_secure_tls_packet_pool = tcp_socket -> nx_tcp_socket_ip_ptr -> nx_ip_default_pac… in _nx_secure_tls_session_start() 106 tls_session -> nx_secure_tls_tcp_socket = tcp_socket; in _nx_secure_tls_session_start() 109 tls_session -> nx_secure_record_queue_header = NX_NULL; in _nx_secure_tls_session_start() 110 tls_session -> nx_secure_record_decrypted_packet = NX_NULL; in _nx_secure_tls_session_start() 113 tls_session -> nx_secure_tls_local_session_active = 0; in _nx_secure_tls_session_start() 114 tls_session -> nx_secure_tls_remote_session_active = 0; in _nx_secure_tls_session_start() 115 tls_session -> nx_secure_tls_received_remote_credentials = NX_FALSE; in _nx_secure_tls_session_start() 118 tls_session -> nx_secure_tls_received_alert_level = 0; in _nx_secure_tls_session_start() [all …]
|
D | nx_secure_tls_session_receive_records.c | 87 UINT _nx_secure_tls_session_receive_records(NX_SECURE_TLS_SESSION *tls_session, in _nx_secure_tls_session_receive_records() argument 107 tcp_socket = tls_session -> nx_secure_tls_tcp_socket; in _nx_secure_tls_session_receive_records() 120 if (tls_session -> nx_secure_record_queue_header) in _nx_secure_tls_session_receive_records() 126 status = _nx_secure_tls_process_record(tls_session, NX_NULL, &bytes_processed, wait_option); in _nx_secure_tls_session_receive_records() 150 … status = _nx_secure_tls_process_record(tls_session, packet_ptr, &bytes_processed, wait_option); in _nx_secure_tls_session_receive_records() 162 tls_session -> nx_secure_record_queue_header -> nx_packet_length -= bytes_processed; in _nx_secure_tls_session_receive_records() 163 current_packet = tls_session -> nx_secure_record_queue_header; in _nx_secure_tls_session_receive_records() 186 nx_secure_tls_packet_release(tls_session -> nx_secure_record_queue_header); in _nx_secure_tls_session_receive_records() 187 tls_session -> nx_secure_record_queue_header = NX_NULL; in _nx_secure_tls_session_receive_records() 197 …current_packet -> nx_packet_length = tls_session -> nx_secure_record_queue_header -> nx_packet_len… in _nx_secure_tls_session_receive_records() [all …]
|
D | nx_secure_tls_process_clienthello_extensions.c | 27 static UINT _nx_secure_tls_proc_clienthello_sec_reneg_extension(NX_SECURE_TLS_SESSION *tls_session, 34 static UINT _nx_secure_tls_proc_clienthello_keyshare_extension(NX_SECURE_TLS_SESSION *tls_session, 37 …NT _nx_secure_tls_proc_clienthello_supported_versions_extension(NX_SECURE_TLS_SESSION *tls_session, 41 … _nx_secure_tls_proc_clienthello_signature_algorithms_extension(NX_SECURE_TLS_SESSION *tls_session, 46 static UINT _nx_secure_tls_process_clienthello_psk_extension(NX_SECURE_TLS_SESSION *tls_session, co… 109 UINT _nx_secure_tls_process_clienthello_extensions(NX_SECURE_TLS_SESSION *tls_session, in _nx_secure_tls_process_clienthello_extensions() argument 120 USHORT supported_version = tls_session -> nx_secure_tls_protocol_version; in _nx_secure_tls_process_clienthello_extensions() 124 NX_PARAMETER_NOT_USED(tls_session); in _nx_secure_tls_process_clienthello_extensions() 166 status = _nx_secure_tls_proc_clienthello_sec_reneg_extension(tls_session, in _nx_secure_tls_process_clienthello_extensions() 179 if(tls_session -> nx_secure_tls_1_3) in _nx_secure_tls_process_clienthello_extensions() [all …]
|
/NetX-Duo-v6.4.1/test/regression/nx_secure_test/ |
D | nx_secure_tls_newest_supported_version_coverage_test.c | 9 static NX_SECURE_TLS_SESSION tls_session; variable 74 tls_session.nx_secure_tls_socket_type = NX_SECURE_TLS_SESSION_TYPE_SERVER; in TEST() 75 tls_session.nx_secure_tls_protocol_version_override = NX_SECURE_TLS_VERSION_TLS_1_2; in TEST() 76 _nx_secure_tls_newest_supported_version(&tls_session, &protocol_version, 0); in TEST() 77 tls_session.nx_secure_tls_negotiated_highest_protocol_version = NX_SECURE_TLS_VERSION_TLS_1_2; in TEST() 78 _nx_secure_tls_highest_supported_version_negotiate(&tls_session, &protocol_version, 0); in TEST() 80 tls_session.nx_secure_tls_socket_type = NX_SECURE_TLS_SESSION_TYPE_CLIENT; in TEST() 81 tls_session.nx_secure_tls_protocol_version_override = NX_SECURE_TLS_VERSION_TLS_1_2; in TEST() 82 _nx_secure_tls_newest_supported_version(&tls_session, &protocol_version, 0); in TEST() 83 tls_session.nx_secure_tls_negotiated_highest_protocol_version = NX_SECURE_TLS_VERSION_TLS_1_2; in TEST() [all …]
|
D | nx_secure_tls_error_checking_2_test.c | 49 static ULONG test_client_callback(NX_SECURE_TLS_SESSION *tls_session, in test_client_callback() argument 61 static ULONG test_server_callback(NX_SECURE_TLS_SESSION *tls_session, in test_server_callback() argument 82 NX_SECURE_TLS_SESSION tls_session; in ntest_0_entry() local 103 status = nx_secure_tls_session_delete(&tls_session); in ntest_0_entry() 106 …status = nx_secure_tls_session_create(&tls_session, &nx_crypto_tls_ciphers, NX_NULL, sizeof(crypto… in ntest_0_entry() 109 …status = nx_secure_tls_session_create(&tls_session, &nx_crypto_tls_ciphers, crypto_metadata, sizeo… in ntest_0_entry() 113 …status = nx_secure_tls_session_create(&tls_session, &nx_crypto_tls_ciphers, crypto_metadata, sizeo… in ntest_0_entry() 121 status = nx_secure_tls_active_certificate_set(&tls_session, &certificate); in ntest_0_entry() 124 status = nx_secure_tls_local_certificate_add(&tls_session, &certificate); in ntest_0_entry() 127 …status = nx_secure_tls_local_certificate_find(&tls_session, (NX_SECURE_X509_CERT **)&certificate, … in ntest_0_entry() [all …]
|
D | nx_secure_tls_session_renegotiate_coverage_test.c | 10 static NX_SECURE_TLS_SESSION tls_session; variable 49 static NX_SECURE_TLS_SESSION tls_session; variable 77 tls_session.nx_secure_tls_packet_pool = &pool_0; in TEST() 80 tls_session.nx_secure_tls_remote_session_active = NX_FALSE; in TEST() 81 tls_session.nx_secure_tls_local_session_active = NX_FALSE; in TEST() 82 status = _nx_secure_tls_session_renegotiate(&tls_session, NX_NO_WAIT); in TEST() 85 tls_session.nx_secure_tls_remote_session_active = NX_TRUE; in TEST() 86 tls_session.nx_secure_tls_local_session_active = NX_FALSE; in TEST() 87 status = _nx_secure_tls_session_renegotiate(&tls_session, NX_NO_WAIT); in TEST() 90 tls_session.nx_secure_tls_remote_session_active = NX_FALSE; in TEST() [all …]
|