Commit graph

372 commits

Author SHA1 Message Date
Christian Spielberger
38e17f9087 jbuf: zero out jbuf_stat on jbuf flush (#147)
When a jitter buffer is flushed also the statistic data should be cleared. That
means set back to zero. This fixes ugly warnings like
"jbuf: get: seq=32373 too late"
when the stream is resumed.
2018-06-19 09:13:00 +02:00
Alfred E. Heggestad
4ded6cbcc9 sip: get local TCP address in establish handler (#146)
After calling tcp_connect(), the address returned by
tcp_conn_local_get() is 0.0.0.0 on some platforms (Windows).

The local address of the TCP-connection is not available
until the TCP connection is fully established, so fetch the
address again in the established handler.

Reference: https://github.com/alfredh/baresip/issues/431
2018-06-19 08:51:58 +02:00
Alfred E. Heggestad
7263d107c8 Update if.c (#144) 2018-05-31 08:43:15 +02:00
Alfred E. Heggestad
09e3e5256a tls: add AES-GCM to DTLS-SRTP (#141) 2018-05-23 11:10:19 +02:00
Richard Aas
13d9d72e03 json/utf8: fix unescaping of unicode code points (#127) 2018-04-06 14:47:16 +02:00
Alfred E. Heggestad
72e89eeeae minor doxygen updates (#125) 2018-04-04 19:57:14 +02:00
Richard Aas
6bbb5eb45c mqueue: set non-blocking mode for read/write file descriptors (#122) 2018-04-03 10:35:59 +02:00
Encamy
36e611a044 Update Windows project (#119) 2018-03-19 13:55:41 +01:00
Alfred E. Heggestad
25dfb8ccf7 Srtp add gcm (#111)
* srtp: add support for AES GCM cipher (RFC 7714)
2018-03-09 14:21:47 +01:00
Alfred E. Heggestad
66ae090ea6 ice: update doxygen comments (#113) 2018-03-05 07:45:26 +01:00
Alfred E. Heggestad
b42724a64b aes: add support for GCM Galois Counter Mode (#106)
* aes: add support for GCM Galois Counter Mode (AEAD)
* add tag functions
* variable length IV
* set crypt direction
* remove usage of old AES api
* aes: set IV using EVP_CipherInit_ex
2018-02-01 12:00:57 +01:00
Alfred E. Heggestad
0b1f01f452 sipreg: add from_name (Display Name) (#104) 2018-01-08 08:55:26 +01:00
Alfred E. Heggestad
83ef499562 mem: add secure memory functions (#102)
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.
2018-01-04 14:07:31 +01:00
Alfred E. Heggestad
49504cf22e net: larger buffer for net_if_list (#100)
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
2017-12-11 08:07:09 +01:00
Alfred E. Heggestad
bd9e1fe5ba remove support for Cygwin (#95) 2017-11-23 11:31:41 +01:00
Richard Aas
4156e4e93e tls: use per connection bio_method (fixes issue #92) (#93) 2017-11-08 19:21:38 +01:00
Richard Aas
5bb8c0712e http: added support for chunked transfer encoding (#90) 2017-11-04 19:22:05 +01:00
Alfred E. Heggestad
14e312f86c tls: add dtls_recv_packet() (#89) 2017-10-30 15:13:11 +01:00
Alfred E. Heggestad
f8b24b462d json: improved performance for mypower10 (#88) 2017-10-19 14:05:08 +02:00
Joachim Bauch
03841f546b Pack struct of mqueue messages. (#62) 2017-10-13 12:18:17 +02:00
Alfred E. Heggestad
5253266a68 odict: use int instead of enum to avoid vararg promotion (#81) 2017-09-23 16:44:32 +02:00
Joachim Bauch
dfe0e0176d ice: Added functions to get selected candidates. (#72)
* 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.
2017-09-06 19:47:58 +02:00
Alfred E. Heggestad
9263b81ae5 ice: move gathering to application (#68)
ref: https://github.com/creytiv/re/wiki/ICE-Stacks-merge
2017-07-15 09:12:12 +02:00
Richard Aas
b08fc20a28 Added function sipreg_laddr() (#67) 2017-06-30 09:51:31 +02:00
Alfred E. Heggestad
9ca4ebb078 mod: add accessor function to module list (#66) 2017-06-29 22:32:52 +02:00
Richard Aas
d5acb4b000 optimize rand_str() and rand_char() (#65) 2017-06-25 15:17:28 +02:00
Alfred E. Heggestad
1544a1e375 rtp: update doxygen comments after API change 2017-06-01 21:34:28 +02:00
Alfred E. Heggestad
920a41d319 rtp: add extension bit to the api 2017-06-01 20:15:31 +02:00
Jan Hoffmann
3b305e70b3 Make sampling rate for telephone events configurable (#57) 2017-05-08 13:51:21 +02:00
Alfred E. Heggestad
a1f84fe762 Remove ICE Session object (#56)
* 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
2017-04-28 08:13:00 +02:00
Mikhail Barg
dfd952d858 Update MSVS projects to vs2015 (#55) 2017-04-18 15:25:04 +02:00
Alfred E. Heggestad
0b73be50cd Solaris pthread once (#52)
* 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
2017-04-02 16:33:46 +02:00
Alfred E. Heggestad
068b9ab8b8 tls: add accessor to OpenSSL context (ref #35) (#46) 2017-03-07 08:36:14 +01:00
Alfred E. Heggestad
1fe13a9dd4 ice: make ice role type public (#43)
- add "ice/ICE" prefix to enum ice_role and values
- export enum ice_role to public API
2017-03-06 13:38:03 +01:00
Alfred E. Heggestad
cb936d9fb2 srtcp: use unsigned 32-bit for encrypted bit (#41)
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
2017-02-16 08:47:32 +01:00
Alfred E. Heggestad
f115a7418e fmt: print directly to stream using handler (#38) 2017-01-06 15:45:22 +01:00
Richard Aas
e167b2c154 HTTP client improvements (#36)
* http client connection reuse

* retry failed requests using fresh connections

* fix line length

* Handle Connection: close response header
2017-01-05 21:53:32 +01:00
Alfred E. Heggestad
6907d760f0 tls: undef X509_NAME for win32 (fixes #32) (#34) 2016-11-23 08:29:44 +01:00
Alfred E. Heggestad
5404e5630f udp: added udp_helper_find() (#28) 2016-11-08 18:48:52 +01:00
Richard Aas
718583f8a9 tls_set_certificate_pem()/tls_set_certificate_der(): minor format adjustments 2016-11-02 17:46:11 +01:00
Lennart Grahl
1ff344dbd9 Setting Certificate/Private Key Improvements (#25)
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.
2016-11-02 17:37:25 +01:00
Lennart Grahl
a627951aeb Change DTLS connection's remote peer address (#24)
* 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
2016-11-02 13:56:30 +01:00
Alfred E. Heggestad
afa2f1e21e Openssl 1.1.0 (#9)
Add support for openssl 1.1.0
2016-10-30 15:44:18 +01:00
Richard Aas
a3a44da128 dns/resolv cleanup (#11)
* dns/resolv: res_ninit()/res_nclose()

* dns/resolv: mac os x fixes

* resolv: added fix for OpenBSD

* Add support for DragonFly BSD

* Solris needs libresolv (patch by Dmitrij D. Czarkoff)
2016-10-28 10:03:15 +02:00
Dmitrij D. Czarkoff
bb2b79b44e Clean up remnants of Symbian support (#13) 2016-10-24 19:41:43 +02:00
Richard Aas
30a963b874 tls: add tls_flush_error to dump openssl errors
Based on contributions from Lennart Grahl (#1) and Alfred Heggestad (#8)
2016-09-23 14:20:22 +02:00
Alfred E. Heggestad
495f5ff51b remove symbian 2016-09-18 17:11:37 +02:00
Alfred E. Heggestad
043aa32cc2 remove support for Symbian OS 2016-09-18 17:00:57 +02:00
Alfred E. Heggestad
1859673efc patch from richard: use hash of from_uri for sort_key 2016-06-24 12:40:22 +00:00
Alfred E. Heggestad
c5b31b7c9f json: init int err to 0 2016-06-24 08:13:36 +00:00