mirror of
https://github.com/obgm/libcoap.git
synced 2026-12-05 20:02:19 +03:00
This fix is in preparation for the full coap_new_client_session_psk2() and coap_context_set_psk2() functions. Structures are updated with the necessary information, as well as provide the high level support. As new sessions are now created for every genuine incoming session (#333), coap_context_t will only hold the initial information provided by coap_context_set_psk2() (server mode), but if there is any updated (triggered by SNI or Indentity), this will be kept in coap_session_t. Likewise, the client initial information will be kept in the coap_session_t, and if modified (triggered by Hint) will be kept separately in coap_session_t. This change does not include the support required in the DTLS interface modules other than changes required to make the code compilable and still run the existing examples - so it is a standalone change. Makefile.am: Make coap_dtls_context_set_cpsk, coap_dtls_context_set_spsk, coap_session_refresh_psk_key and coap_session_refresh_psk_hint hidden Remove coap_dtls_context_set_psk include/coap2/*.h: Replace call-back with callback for consistency include/coap2/coap_dtls.h: Include coap_dtls_cpsk_key_t and coap_dtls_spsk_key_t definitions Define coap_dtls_spsk_key_t for the new coap_*_psk2 functions. Include all the new call back function definitions include/coap2/coap_session.h: Update coap_session_t with the new PSK information Define coap_new_client_session_psk2(), coap_session_refresh_psk_key() and coap_session_refresh_psk_hint() functions include/coap2/net.h: Update coap_context_t with the new PSK information Define the coap_context_set_psk2() function include/coap2/str.h: Add in a new struct coap_bin_const_t Define new functions coap_new_bin_const(), coap_delete_bin_const() and coap_binary_equal(). libcoap-2.{map|sym} Expose the new coap_context_set_psk2, coap_new_client_session_psk2, coap_new_bin_const and coap_delete_bin_const functions src/coap_gnutls.c: src/coap_notls.c: src/coap_tinydtls.c: Replace coap_dtls_context_set_psk() with coap_dtls_context_set_spsk() and coap_dtls_context_set_cpsk() src/coap_openssl.c: Replace coap_dtls_context_set_psk() with coap_dtls_context_set_spsk() and coap_dtls_context_set_cpsk() Update the SSL_CTX_use* and SSL_set_* functions with the new variable locations src/coap_session.c: Free off new information on coap_session_t in coap_session_mfree() Build parameters for coap_new_client_session_psk2() in coap_new_client_session_psk() and call coap_new_client_session_psk2() instead of coap_session_create_client(). Create new coap_new_client_session_psk2(). Create new coap_session_refresh_psk_key() (will be used when DTLS interface code is updated src/net.c: Update coap_get_session_client_psk() to use the new PSK locations. Update coap_get_session_server_psk() to use the new PSK locations. Update coap_get_session_server_hint() to use the new PSK locations. Build parameters for coap_context_set_psk2() in coap_context_set_psk() and call coap_context_set_psk2(). Create new coap_context_set_psk2(). Cleanup usage of old PSK information in coap_free_context() src/str.c: Code for coap_new_bin_const() and coap_delete_bin_const() functions
205 lines
4.5 KiB
Plaintext
205 lines
4.5 KiB
Plaintext
VER_2 {
|
|
global:
|
|
coap_add_attr;
|
|
coap_add_block;
|
|
coap_add_data;
|
|
coap_add_data_after;
|
|
coap_add_data_blocked_response;
|
|
coap_add_observer;
|
|
coap_add_option;
|
|
coap_add_option_later;
|
|
coap_add_optlist_pdu;
|
|
coap_add_resource;
|
|
coap_address_equals;
|
|
coap_address_init;
|
|
coap_add_token;
|
|
coap_adjust_basetime;
|
|
coap_calc_timeout;
|
|
coap_cancel_all_messages;
|
|
coap_cancel_session_messages;
|
|
coap_can_exit;
|
|
coap_check_notify;
|
|
coap_check_option;
|
|
coap_cleanup;
|
|
coap_clear_event_handler;
|
|
coap_clock_init;
|
|
coap_clone_uri;
|
|
coap_context_get_coap_fd;
|
|
coap_context_set_keepalive;
|
|
coap_context_set_pki;
|
|
coap_context_set_pki_root_cas;
|
|
coap_context_set_psk;
|
|
coap_context_set_psk2;
|
|
coap_debug_send_packet;
|
|
coap_debug_set_packet_loss;
|
|
coap_decode_var_bytes;
|
|
coap_decode_var_bytes8;
|
|
coap_delete_all;
|
|
coap_delete_all_resources;
|
|
coap_delete_attr;
|
|
coap_delete_bin_const;
|
|
coap_delete_node;
|
|
coap_delete_observer;
|
|
coap_delete_observers;
|
|
coap_delete_optlist;
|
|
coap_delete_pdu;
|
|
coap_delete_resource;
|
|
coap_delete_str_const;
|
|
coap_delete_string;
|
|
coap_dispatch;
|
|
coap_dtls_get_log_level;
|
|
coap_dtls_is_supported;
|
|
coap_dtls_set_log_level;
|
|
coap_encode_var_safe;
|
|
coap_encode_var_safe8;
|
|
coap_endpoint_get_session;
|
|
coap_endpoint_set_default_mtu;
|
|
coap_endpoint_str;
|
|
coap_find_async;
|
|
coap_find_attr;
|
|
coap_find_observer;
|
|
coap_find_transaction;
|
|
coap_fls;
|
|
coap_flsll;
|
|
coap_free_async;
|
|
coap_free_context;
|
|
coap_free_endpoint;
|
|
coap_free_type;
|
|
coap_get_app_data;
|
|
coap_get_block;
|
|
coap_get_data;
|
|
coap_get_log_level;
|
|
coap_get_query;
|
|
coap_get_resource_from_uri_path;
|
|
coap_get_tls_library_version;
|
|
coap_get_uri_path;
|
|
coap_handle_dgram;
|
|
coap_handle_event;
|
|
coap_handle_failed_notify;
|
|
coap_hash_impl;
|
|
coap_insert_node;
|
|
coap_insert_optlist;
|
|
coap_io_prepare_epoll;
|
|
coap_is_mcast;
|
|
coap_join_mcast_group;
|
|
coap_log_impl;
|
|
coap_make_str_const;
|
|
coap_malloc_endpoint;
|
|
coap_malloc_type;
|
|
coap_memory_init;
|
|
coap_network_read;
|
|
coap_network_send;
|
|
coap_new_bin_const;
|
|
coap_new_client_session;
|
|
coap_new_client_session_pki;
|
|
coap_new_client_session_psk;
|
|
coap_new_client_session_psk2;
|
|
coap_new_context;
|
|
coap_new_endpoint;
|
|
coap_new_error_response;
|
|
coap_new_node;
|
|
coap_new_optlist;
|
|
coap_new_pdu;
|
|
coap_new_server_session;
|
|
coap_new_str_const;
|
|
coap_new_string;
|
|
coap_new_uri;
|
|
coap_opt_block_num;
|
|
coap_opt_delta;
|
|
coap_opt_encode;
|
|
coap_opt_encode_size;
|
|
coap_option_check_critical;
|
|
coap_option_filter_get;
|
|
coap_option_filter_set;
|
|
coap_option_filter_unset;
|
|
coap_option_iterator_init;
|
|
coap_option_next;
|
|
coap_opt_length;
|
|
coap_opt_parse;
|
|
coap_opt_setheader;
|
|
coap_opt_size;
|
|
coap_opt_value;
|
|
coap_package_name;
|
|
coap_package_version;
|
|
coap_packet_get_memmapped;
|
|
coap_pdu_clear;
|
|
coap_pdu_encode_header;
|
|
coap_pdu_init;
|
|
coap_pdu_parse;
|
|
coap_pdu_parse_header;
|
|
coap_pdu_parse_header_size;
|
|
coap_pdu_parse_opt;
|
|
coap_pdu_parse_size;
|
|
coap_pdu_resize;
|
|
coap_peek_next;
|
|
coap_pop_next;
|
|
coap_print_addr;
|
|
coap_print_link;
|
|
coap_print_wellknown;
|
|
coap_read;
|
|
coap_register_async;
|
|
coap_register_event_handler;
|
|
coap_register_handler;
|
|
coap_remove_async;
|
|
coap_remove_from_queue;
|
|
coap_resource_init;
|
|
coap_resource_notify_observers;
|
|
coap_resource_set_dirty;
|
|
coap_resource_unknown_init;
|
|
coap_response_phrase;
|
|
coap_retransmit;
|
|
coap_run_once;
|
|
coap_send;
|
|
coap_send_ack;
|
|
coap_send_error;
|
|
coap_send_message_type;
|
|
coap_session_connected;
|
|
coap_session_delay_pdu;
|
|
coap_session_disconnected;
|
|
coap_session_free;
|
|
coap_session_get_ack_random_factor;
|
|
coap_session_get_ack_timeout;
|
|
coap_session_get_app_data;
|
|
coap_session_get_by_peer;
|
|
coap_session_get_max_transmit;
|
|
coap_session_max_pdu_size;
|
|
coap_session_reference;
|
|
coap_session_release;
|
|
coap_session_send;
|
|
coap_session_send_csm;
|
|
coap_session_send_pdu;
|
|
coap_session_send_ping;
|
|
coap_session_set_ack_random_factor;
|
|
coap_session_set_ack_timeout;
|
|
coap_session_set_app_data;
|
|
coap_session_set_max_retransmit;
|
|
coap_session_set_mtu;
|
|
coap_session_str;
|
|
coap_session_write;
|
|
coap_set_app_data;
|
|
coap_set_event_handler;
|
|
coap_set_log_handler;
|
|
coap_set_log_level;
|
|
coap_set_show_pdu_output;
|
|
coap_show_pdu;
|
|
coap_show_tls_version;
|
|
coap_socket_strerror;
|
|
coap_split_path;
|
|
coap_split_query;
|
|
coap_split_uri;
|
|
coap_startup;
|
|
coap_string_tls_version;
|
|
coap_ticks;
|
|
coap_ticks_from_rt_us;
|
|
coap_ticks_to_rt;
|
|
coap_ticks_to_rt_us;
|
|
coap_tls_is_supported;
|
|
coap_touch_observer;
|
|
coap_wait_ack;
|
|
coap_wellknown_response;
|
|
coap_write;
|
|
coap_write_block_opt;
|
|
local:
|
|
*;
|
|
};
|