the use case for these functions is secure code like SRTP and TLS.
memcmp() should not be used when comparing secret data
such as shared keys, because the content may affect the timing.
instead the compare function should always take the same
to execute, independently of the content.
when compiling with mingw32 and running in wine emulator,
I get this error when enumerating network interfaces:
wif: if_list: GetAdaptersAddresses ret=111
use a large buffer for IP_ADAPTER_ADDRESSES fixes the error
* ice: Added functions to get selected candidates.
Also added a function to get the type of a candidate. This can be used when
sending data to handle relay candidates, where data must be sent through the
TURN client.
* Forward-declare "ice_cand" before it is used.
* ice: export enum ice_candpair_state
this is related to the work of merging 2 ice-stacks into 1:
https://github.com/creytiv/re/wiki/ICE-Stacks-merge
* ice: remove ice session (struct ice)
* ice: remove list, cleanup
* ice: use local role instead of offerer
* main: use same PTHREAD_ONCE_INIT for all platforms
- Remove special case for SOLARIS
- Tested on Solaris 11.3 with gcc
* README: specify version of Solaris
the ep is left-shifted by 31-bits. If the size of int
is 4 bytes then the EP bit will end up in the top bit
which is also the sign bit.
it is safer and better to use an unsigned type here
Add tls_set_certificate_pem() and tls_set_certificate_der() functions for setting certificate and private key on a TLS context in respective formats. Private key may optionally be passed as a separate argument, or part of the certificate data.
* Make it possible to change the DTLS connection's remote peer address.
Add `dtls_set_peer` function
* Add `dtls_peer` getter function
Change `dtls_set_peer` signature, leave comparison of the remote address up to the user application
* Fix typo in docstring