Add detection of encrypted output and disable encrypted output by default
With this commit if tsdecrypt detects that the stream is still
encrypted after passing it through decryption it doesn't output it.
You can enable the output of encrypted streams using --output-enc-pass
option.
Fixes problems with providers that use quite long ECMs/EMMs.
Store message len in int instead of uint8_t to fix transmission of msgs
longer than 255 bytes (size_t was not an option as some functions return
negative values).
Add msg len check to cs378x as it only allows up to 256 bytes data.
Increase how much seconds to assume the key is valid.
10 seconds is a bit low, there are services that change their key
every 15 seconds. Increase the period in which we assume the key is
valid to 30 seconds.
This patch adds two new EMM counters in the regular stats messages.
Now the counters are:
Received - How much EMMs were received from the input.
Skipped - How much EMMs were skipped because of filtering.
Sent - How much EMMs were added to the sending queue.
Processed - How much EMMs were sent to the CAMD server for processing.
Add support for IPv6 and for multiple CAMD addresses.
This patch adds support for connecting to CAMD over IPv6. Nice addition
is that now tsdecrypt tries each of the addresses returned when CAMD
hostname is resolved and connects to the one that works. Resolving
of the server address is done before each connect, which allows for
uninterupted migration of CAMD servers by just changing their DNS
record.
IPv6 functionality can be disabled by using -4/--ipv4 options or
if you fancy only IPv6 servers -6/--ipv6 can be used.
This time free the memory returned by crypt() only once. This way
the leak is avoided and also double free error is avoided also.
The patch fixes the following valgrind compaint:
43 bytes in 1 blocks are still reachable in loss record 1 of 1
at 0x4026844: malloc (vg_replace_malloc.c:263)
by 0x40268BE: realloc (vg_replace_malloc.c:632)
by 0x41EE411: __md5_crypt (in /lib/libcrypt-2.13.so)
by 0x41EDA56: crypt (in /lib/libcrypt-2.13.so)
by 0x805F702: newcamd_login (camd-newcamd.c:297)
by 0x9F0B10: ???