VDR Plugin 'sc' Revision History
--------------------------------

..2009: Version 1.0.0
- Forked development branch.
- Now operating like a real CAM. All necessary information are derieved from the
  CAM messages send by VDR (i.e. no more GetCaDescriptors).
- Added a real CCcam network client (experimental). CCcam doesn't need to run on
  localhost. The client name is cccam2, see cardclient.conf.example file.
- Reworked CA message buffer handling. Removed fixed size buffers and fixed
  several buffer overflows.
- Added a copy of opensasc-ng to the contrib directory. In place compile with
  current vdr-sc/FFdecsa code supported.
- Support for VDR 1.4.7 is declared deprecated.

------------------------------------------------------------

07.10.2009: Version 0.9.3
- Ported from Emunation:
    * Improve msg handling in cardclient newcamd
    * Add support for seca provider 64 (spain)
    * A bunch of Nagra updates, mainly map related
    * fix CAID range in smartcard Nagra
- Ported from oscam (R127):
    * Add pin handling in smartcard Conax
    * Update ECM handling in smartcard Seca
    * Update ECM/EMM handling in smartcard Viaccess
- Fix large file options for TSplay patch
- Various bugfixes and translation updates.
- The 0.9.x branch is now frozen, only bugfixes will be applied.
- For a detailed list of changes, refer to the HG changelog.

04.07.2009: Version 0.9.2
- Restructure of smartcard code. Configuration has been moved to cardslot.conf.
  See cardslot.conf.example file.
- A bunch of updates to cardclient code.
- Added temporariy NA Nagra fixes from opensasc-ng.
- Added override configuration. See override.conf.example file.
- SCAPI version of sub-libraries is checked during load.
- Various bugfixes and translation updates.
- For a detailed list of changes, refer to the HG changelog.

22.12.2008: Version 0.9.1
- Added support for Irdeto2.
- Added support for IRD based NDS decryption (FakeNDS).
- Added CCcam cardclient.
- Added support for Full-TS modded cards.
- Update Viaccess for modified tps.bin format.
- Countless changes to Nagra code.
- Various bugfixes and translation updates.
- For a detailed list of changes, refer to the HG changelog.

09.02.2008: Version 0.9.0
- NOTE: the versioning scheme has been changed. All releases (regardless if even
  or odd minor) are considered stable. Unstable development is in HG only.
- Updated keys are now written back to the SoftCAM.Key file. If the keyfile is
  modified externaly it will be re-read. Introduce new cache files ecm.cache &
  tps.cache. ca.cache is obsolete now.
- All config files are expected to be located in the "sc" subdir of the plugin
  config directory now. Removed commandline option -c.
- A bunch of changes to the Nagra2 code, including 0501 maprom, 0101 map 29, 97W
  hack, fixed HW_SECURITY and map timings.
- Fixed Viaccess TPS AU.
- Added dedicated housekeeping thread.
- Display (important) user messages on the OSD (if enabled in setup).
- Various updates to testing code.
- Fixed Makefile default target.
- Fixed gcc 4.x warnings.
- Added patch for DVB multiproto driver.
- Updated finnish and french translations.

------------------------------------------------------------

18.01.2008: Version 0.8.7
- Several changes to the Nagra2 code including HW reg mapper, map cycle counts,
  0501 AU, 0101 auxed map57, tableless map3e and new build system.
- Increased smartcard info buffer size.
- Fixed memcpy in Seca ECM/EMM processing.
- Fixed ExtAU to trigger on wrong key. Don't trigger on EMM keys.
- Fixed RotateBytes to be robust against bad input.
- Updated Makefile for HG.
- Updated italian, russian, finnish translations.
- The 0.8.x branch is now frozen, only bugfixes will be applied.

21.12.2007: Version 0.8.6
- Added Nagra2 0501 dyn. AU execution fix.
- Added Nagra2 4101 map58 AU (though already outdated). Using unified ECC code
  for map57 & map58.
- Added instruction cycle counter to Nagra ST7/19 cpu emulation.
- Added support for recent Nagra2 0101/0901 ECM (including map4e/22/3e cycle
  calculation, timer/CRC hardware simulation, DES map, EEPROM updates, dynamic
  ECM code, auxserver V2 call).
- Added Nagra2 config option to drop EMM-S packets.
- Added Nagra1 UK reg05 fix (i.e. moved it from N2 to N1).
- Added TPS AU fix.
- Added SVDR commands to inject keys and to configure logging to file.
- Removed some gcc'isims (case ranges, named variadic macros, variable length
  arrays).
- Updated finnish translations.

10.11.2007: Version 0.8.5
- Added new Nagra2 0501 AU sheme.
- Added Nagra2 NA 'temporarily' fixes.
- For simplicity the high provider id is used always now, when loading an EEP
  file in Nagra2 emu. e.g. for provider 0901 you have to rename the file to
  EEP09_102.bin.
- Added an option to start AutoUpdate even if no audio/video pids are set (e.g.
  EPG scan). Has to be enabled from the plugin setup menu.
- Fixed cardclient camd35 EMM request length check.
- Fixed smartcard Viaccess ATR check and transcription errors in smartcard NDS
  camcrypt. Thanks to dr.aus.
- Fixed saving ScCaps to config if all cards are disabled.
- Fixed sasc-ng compile (FFdecsa dir).
- Obmit error messages about (optional) config files (e.g. *.KID).
- Added some glue for gcc 2.95 compile.
- Added Hungarian translations.

30.09.2007: Version 0.8.4
- Added Nagra2 4101 Bx support.
- Added smartcard NDS Videoguard2 code (untested). Needs NDS seed and boxid in
  smartcard.conf (later only for newer card revisions). This is based on code
  from sasc-ng changeset r155.
- Fixed Nagra cpu emu SetPc and ReadHandler call.
- Fixed crash on TPS ECM when no TPS encryption is used and no TPS AU keys are
  available (null pointer dereference).
- Updated russian and finnish translations.

15.09.2007: Version 0.8.3
- Added Nagra2 3101 MECM (same as 0501).
- Added Nagra2 0901 new 0x40 MECM and rev248 morph (from sasc-ng).
- Changed TPS AU instruction limit for st20 emulation. Fixed callback pointer
  search and decryption in case super encryption is disabled temporarily.
- Added a setup option to limit the size of the logfile.
- Fixed Makefile for Debian compile.
- Some fixes for sasc-ng compile/operation.
- Now autogenerating i18n.c file with po2i18n.pl from po files on VDR < 1.5.7.
  Note that after changes to the *.c files the po files have to be recreated, so
  you should have gettext package installed.
- Fixed plugin .mo filename for VDR 1.5.7.
- Updated finnish translations.

02.09.2007: Version 0.8.2
- Reworked Nagra2 EMM nano handling, key updates and map core (the latter is
  partly based on Emunation 2.0.0 code).
- Added Nagra2 0101 register 0x05,0x16 fix (not well tested).
- Added Nagra2 0511,1101 MECM (same as 0501).
- Added compatibility option for sasc-ng.
- Added commandline option -c to select a config subdirectory.
- Fixed FFdecsa to prevent CW change while key in use. Based on racepatch from
  DVBN.
- Fixed cardclient camd35 packet ID compare (short vs. int).
- Fixed Nagra2 skipping expiry date in ECM.
- Added support for VDR 1.5.7+ gettext sheme (most po-files need to be revised
  by translators).

06.07.2007: Version 0.8.1
- Added Nagra2 7101 3DES support.
- Added a setup option to force transfermode with digital audio. Another common
  used patched for the vdr-core is made unnecessary by this option.
- Fixed camd33 EMM packet processing.
- Fixed recording device allocation (1.4.x). You have to update the VDR core
  patch. Thanks to dingo35.
- Fixed compiling with VDR 1.5.0.

22.06.2007: Version 0.8.0
- Added Nagra2 0501 MECM support.
- Added support for Nagra smartcards. Code is not well tested. Volunteers
  welcome. Timing is tricky, so you have to get cardreader clock AND -C
  parameter right.
- Added debug description to CI adapter ringbuffers.
- Added a note to README that the plugin have to be put first on VDR
  commandline. Loading certain plugins (e.g. softdevice) in front of SC leads to
  mismatched device numbering in VDR which causes some strange effects.
- Added sanity check for device numbering.
- Fixed Nagra2 nano processing.
- Fixed Seca EMM signature check.
- Never ending story: fixed cardclient reconnecting on read timeout again.
- Fixed cardclient camd35 sending Nagra provider in ECM request.
- Added russian translations (core only).

------------------------------------------------------------

13.05.2007: Version 0.7.5
- Fixed memcpy race in OpenTV decompress.
- Fixed endless loop with evil EMM data in Nagra2 0101 B1 code.
- Fixed access to disabled DVB cards (1.4.x).
- Fixed budget card problem in VDR core patch (1.4.x).

06.05.2007: Version 0.7.4
- Added compatibility for VDR 1.4.6 (VDR core has to be patched). Note that this
  is experimental code.
- Added support for new TPS AU sheme.
- Added some Map handling to DN/BEV B1 processing code.
- Added version information to hello message in cardclient radegast.
- Added logic to Makefile to copy max. number of CAIDs from VDR.
- Extended ConstCW key to handle cable/terrestrial sources.
- Fixed race in camslot reset code.
- Fixed zero-cw-index handling for CI update messages.
- Fixed handling of same SID on different transponders in lru-caid-cache.
- Fixed menu processing on ECM cache flush abort.

06.04.2007: Version 0.7.3
- This is a beta release. As the code seems pretty stable, we would like to
  encourage everybody to try this release. Nevertheless it should be used under
  controlled conditions only.
- Further improved camslot reset behaviour. Toggling concurrent flag takes
  effect at runtime now too.
- Removed obsolete D+ AU code.
- Fixed unexpect side effect of cardclient reconnecting on read timeout.
- Fixed CAID allocation (CheckIgnore).

31.03.2007: Version 0.7.2
- Now creating the devices nodes after loading setup.conf. Should solve problems
  with SourceCaps patch and remove the "nextCardIndex to big" error. But this
  requires some ugly hacking which may not work with every gcc/vdr version.
- Added DarkAvengers FFdecsa optimizations for mmx, sse and sse2 modes.
- Added SVDR command to display all message classes.
- Added new D+ AU. You need an additional NN 52 RSA key (and optional NN 53
  verify key).
- Added autodetection of pid where TPS broadcasts AU data. You still have to
  switch to transponder 10873 for AU.
- Changed the plugin shutdown sequence to fix the hang-on-exit problem. It seems
  to be fixed now, although the reason for the problem is still unknown.
- Fixed Nagra2 0101 map 4d input.
- Fixed logging Nagra cpu emu messages to general.unknown.
- Fixed reseting module options to default.
- Fixed a mismatched Lock/Unlock in smartcard code (in error path).
- Fixed off-by-one error in CI adapter read.
- Fixed camslot reset logic.
- Fixed some 'valgrind' problems and properly unload all sub-libraries on plugin
  exit too.
- Updated README documentation, removed README.0.7.x.
- Updated finnish translations.

09.03.2007: Version 0.7.1
- Reduced the number of used camslots to 1 per device. Multiply camslots cause
  all kinds of problems. Reworked CAID allocation algorithm. This should make
  operation much more reliable.
- Improved operation with hardware CAM.
- Introducing a completely new message logging system. All messages classes can
  be enabled/disabled at runtime (via setup menu and SVDR) and can be written to
  console, file and/or syslog (configurable from setup menu).
- Added Nagra2 provider 0101 Map57 call.
- Added TPS AU code. Note that you have to add 8 TPS master keys to your
  keyfile. Update seems to work only on transponder 10873, e.g. switch to
  Equidia.
- Fixed FF concurrent streams if sc.ConcurrentFF is set to a value >1.
- Fixed CI adapter TPDU length decoding.
- Fixed processing stale ECM packets after a channel switch.
- Fixed long standing bug in Nagra1 RSA key update (which was a problem in a
  key base class, introduced in 0.5.10).
- Fixed paged long indirect and paged long indirect indexed adressing modes in
  Nagra cpu emu (HILOS macro).
- Fixed cardclient reconnecting on read timeout.
- Fixed clobbering the name of the sc shared library in the shared objects
  table.
- Fixed compiling if openssl lacks IDEA support.

17.02.2007: Version 0.7.0
- Forked development branch.
- This is an alpha release. Using it in a production enviroment is not
  recommended. You are strongly advised to read the file README.0.7.x. 
- Requires VDR version 1.5.0 or newer and openssl package 0.9.7 or newer.
- Now operates without any patches to the VDR core.
- Integrated FFdecsa functionality.
- Using a openssl package without IDEA & AES support is deprecated. Included
  support code will be removed in the future.
- Added commandline option to force budget mode on a DVB device.
- Added setup menu item to flush ECM cache (from ca.cache).
- Added support for Nagra2 3DES encrypted key updates. Tweaked EMM caid and RSA
  key selection for D+ AU.
- Added fix for Nagra2 BEV B1 updates.
- Added pre-crypted camkey challenges for Irdeto ACS 384. This is a last resort
  convenience mode and usage is strongly deprecated! Don't relay on this!
- Added NewCS client identification in cardclient newcamd.
- Fixed include path order.
- Added swedish translations.

------------------------------------------------------------

06.04.2007: Version 0.6.2
- Backported from 0.7.2:
    * Mismatched Lock/Unlock in smartcard code.
    * Autodetection of pid with TPS AU data.
    * Finnish translations.
- Backported from 0.7.1:
    * Nagra2 provider 0101 Map57 call.
    * Nagra1 RSA key update.
    * Paged adressing modes in Nagra cpu emu.
    * TPS AU.
    * Cardclient reconnecting on read timeout.
    * Processing stale ECM packets after a channel switch.
    * Clobbering shared library name in shared objects table.
    * Compiling if openssl lacks IDEA support.

17.02.2007: Version 0.6.1
- Backported from 0.7.0:
    * Nagra2 3DES encrypted key updates (D+ AU).
    * Nagra2 BEV B1 updates.
    * Pre-crypted camkey challenges for Irdeto ACS 384.
    * NewCS client identification in cardclient newcamd.
    * Include path order.
    * Swedish translations.

13.01.2007: Version 0.6.0
- Stable release. Minimum supported VDR version is 1.4.0. Note that the stable
  branch doesn't support and probably will not support VDR 1.5.x series. This is
  left to the upcomming unstable branch.
- Added support for new TPS algo. You need a current tps.bin (mostly changing
  daily) file in plugins/viaccess/.
- Fixed CW swap for Nagra2 providers 0501/1101/1102.
- Fixed BEV inadvertently using Nagra1 ECM decoding only.
- Fixed Nagra1 ROM10 updates (broken by ROM3 changes in 0.5.12).
- Fixed compiling issue with missing "asm/unaligned.h".
- Added Makefile option for static build (sasc-ng).

------------------------------------------------------------

15.12.2006: Version 0.5.12
- Major restructure of Nagra code. Added basic ST19 features to Nagra cpu
  emulation (Nano B1 processing). Added provider 0101/0901 map 3b. Fixed long
  standing bug in ROM3 key update.
- Updated Viaccess AU to new parsing code. Fixed signature check in shared
  updates (introduced in 0.5.11).
- Changed the order in which ECM pids/systems are tried to a more consistent way
  regarding the system priority.
- Fixed cardclient newcamd using wrong SA for Seca provider.
- Fixed ignoring CAIDs when used together with a hardware CAM.
- Fixed writing garbage to setup.conf if CAID ignore list is empty.
- Fixed AutoUpdate switch. Turning it off had no effect. ExternalAU honors the
  AutoUpdate switch now too.
- Added russian translations.

04.10.2006: Version 0.5.11
- Added Nagra2 MECM handling, support for AUX server (version 0.9.3 or newer
  only) and DN EMM hacks.
- Added smartcard Cryptoworks camcrypt. You must have a valid IPK or UCPK in
  your smartcard.conf to make it actually work. If you have a PIN for your card
  in smartcard.conf, parental rating can be disabled even if the PIN cannot be
  read from the card. See example smartcard.conf for format.
- Added additional checks to Viaccess AU code to prevent segfault on bad input
  data (e.g. short EMM).
- Added V4 server capability check in cardclient radegast. EMM processing would
  be possible, if the server would send UA/SA to the client.
- Added cardclient gbox. GBOX must be running on the local machine and you have
  to make sure that there is no /var/tmp/pmt.tmp file. Based on morfsta's
  version but rewritten nearly from scratch.
- Added a configurable list of CAIDs which are ignore by the plugin. See plugin
  setup menu.
- Fixed triggering external AU too often.
- Fixed stupid Viacess key length error.
- Fixed parsing CA descriptors for all SIDs if a handler has attached several.
  Thanks to Aroureos for testing.

21.07.2006: Version 0.5.10
- Added external key updates via shell script. See README for details.
- Now checking for duplicate serial ports in smartcard config.
- Fixed supersede for Viaccess TPS keys.
- Fixed re-adding DEFAULT_PORT on config-file reload.
- Fixed design bug in key comparison.

05.06.2006: Version 0.5.9
- Smartcard code now supports setting the cardreader clock (see commandline
  switch -C/--clock), custom baudrates (if your UART supports that), PTS
  specific mode and PTS 1-stopbit mode. Note: due to the new clock parameter,
  the format of DEFAULT_PORT has changed!
- Added a filter for unused chid's in Irdeto ECM stream.
- Fixed cardclient camd33 checking for unsuccessfull ECM answer (causing 5s
  delay). Thanks to Aroureos for all the testing.
- Fixed cardclient camd35 parsing provider information in EMM request.
- Fixed a side effect in main cam loop.
- Various fixes to Makefile (unsupported cp options, sublibrary naming scheme,
  honour DVBDIR in Makefile.system, libcrypto linkage).
- Fixed libvdr-sc overloading a global VDR symbol (translations).
- Fixed compiling with VDR < 1.3.47.
- Corrected information about min. required VDR version (currently 1.3.31).

26.05.2006: Version 0.5.8
- Completely new build system. Now using shared libraries for individual
  encryption systems, which are loaded at runtime. Copy all wanted libsc-* to
  your VDR plugin lib directory. Encryption systems might be provided in binary
  form only. See README for details.
- Added Cryptoworks emulation. See example keyfile for key format.
- Added Nagra2 EMM nano E0 (DN) handling.
- Don't try failed ECMs too often (by caching them).
- Fixed Nagra2 PW inverse CW.
- Fixed handling of channels which share the same PIDs.
- Fixed ConstCW key handling (broken in 0.5.7).
- Fixed Cardclient ECM caching.
- Fixed Newcamd EMM Viaccess provider ID matching.
- Fixed Viaccess EMM assembling.
- Fixed dvb-cwidx patch for undefined LINUX_VERSION_CODE. There seems to be
  compatibility problems with certain kernel/driver version (e.g. kernel driver
  vs HG): gcc complains mutex_lock() is called with incompatible pointer type.
  Therefore the old dvb-cwidx patch has been re-added as dvb-cwidx-old in case
  someone has problems with the new version.
- Fixed odd compiler error for a struct member with the same name as the struct
  itself (probably some ancient gcc version).
- Added frensh translations.

06.05.2006: Version 0.5.7
- Disable keyfile stuff if no system uses keys, prevent loader error messages
  about unknown sections, prevent ca.cache trashing, fixed key saving. 
- If smartcard PTS request fails, reset card again and continue without PTS.
- Now reading entitlements from Conax smartcard.
- Added a workaround for providers which seem to broadcast fake ECM.
- Added warning about channels which share the same PID.
- Fixed Nagra2 crash with EMM-S keys.
- Fixed compile problem when disabling certain modules.
- Updated dvb-cwidx patch for kernel >= 2.6.16.
- Changed Makefile to take APIVERSION into account.
- Added polish translations.

30.03.2006: Version 0.5.6
- Added Nagra2 ECM DES decryption code.
- Nagra signature check is now skipped, if your keyfile lacks verify keys. Don't
  put fake verify keys in there!
- Now reading entitlements from Cryptoworks smartcard.
- Smartcard engine now supports ISO7816 PTS protocol i.e. baudrate changes.
- Improved OSD display of smartcard information/entitlements.
- Fixed exit condition in Nagra2 ECM/EMM nano parse loop.
- Prevent frequent relaunch of the logger thread.
- Fixed CW-index allocation for idle ECM handler.
- Fixed missing initialisation in ECM handler.
- Fixed ECM handler selection in special cases where a recording starts and
  used-FF-streams == allowed-FF-streams but one of the stream is used for live
  viewing. Involves changes to vdr-sc patch too.
- Fixed concurrent check in vdr-sc patch. A bad comparison broke the check if
  the first CAID in channel entry was 0x100.
- Fixed cardclient radegast to handle NULL-cw.
- Added dutch translations and updated finnish translations.
- NOTE: you have to upgrade the VDR core with the supplied vdr-sc patch. Older
  versions will refuse to work.

16.02.2006: Version 0.5.5
- Complete restructure of Nagra code (e.g. separating Nagra1 & Nagra2). Added
  signature check, verify keys are mandatory now.
  As a consequence Nagra2 key format has changed (as announced). See example
  keyfile. A quick upgrade guide:
  N xxxx 10   ->   N xxxx 01
  N xxxx 02   ->   N xxxx NN 02
  N xxxx N2   ->   N xxxx NN 12
  verify keys ->   N xxxx V
              ->   N xxxx NN 03
- Restructured AutoUpdate code. EMM data is now passed to all systems which can
  handle it, concurrent recordings doesn't cause multiple processing of the same
  date and it's possible to log on all available CAIDs concurrently (though this
  may cause high CPU load). See plugin setup menu. Option LoggerActive has been
  renamed to AutoUpdate. Option LoggerTimeout has been removed. Check your
  config.
- Added some statistics about EMM packet load.
- Now using non-RSA (i.e. plain) camkey challenge for Irdeto smartcards if the
  word PLAIN is given in smartcard.conf instead of a certificate. See example
  smartcard.conf. For ACS 0383/0384 cards the challenge type is autodetected. If
  anybody knows a generic way to detect the challenge type, please let us know.
- Fixed several crypto classes to be reentrant (fixing possible race in
  multi-threaded ECM/EMM handling).
- Fixed access to (possibly) deleted filter class in section filter handling. 
- Fixed complaining about erroneous entries in smartcard.conf if compiled
  without SC_IRDETO.
- Fixed endless loop in SimpleList handling.
- Fixed vdr-1.3.38-sc patch (one hunk was lost).

08.01.2006: Version 0.5.4
- Added a plugin SVDR interface. The only command is RELOAD for now (triggers a
  reload of the configuration files).
- Added support for multiple TPS keys (key is selected based on Viaccess hash).
- Added premiliary support for Nagra2 AU. See example keyfile for format of
  needed keys. Key format is subject to change in next releases.
- Complete rewrite of the Seca2 provider specific code.
- Added generic RSA & IDEA crypto classes.
- Added better checking of CW decryption status in smartcard Cryptoworks.
- General code review (eliminated duplicate code, replaced VDR base classes by
  own shorter ones, beautified code).
- Now generating smartcard Irdeto info string for OSD card menu.
- If the DVB driver doesn't support the CA_SET_PID ioctl call (i.e. unpatched
  driver), auto adjust the FF concurrent limit to 1.
- Fixed checking card status in smartcard Irdeto camkey exchange.
- Fixed detaching a PID from a handler if VDR has removed this PID from the
  channels.conf entry meanwhile.
- Fixed ECM table handling in ca.cache.
- Fixed Nagra2 CW order for D+.
- Fixed a gcc4.1 compiling issue.
- Added additional debug output in cardclient camd35 to snoop for AU problems.
  You may comment DEBUG_EXTRA to disable verbose log.
- Updated FFdecsa patch to 0.1.3 (fixing a race condition).
- Note: this release was forced by the release of VDR 1.3.38 and not all of the
  changes above are tested as well as they should be.

09.12.2005: Version 0.5.3
- Added Nagra2 EMM support and EMM caching to cardclient newcamd.
- Added Cryptoworks EMM support and EMM caching to cardclient camd35.
- You may now add multiple CAID fields to cardclient.conf. A valid line would be
  e.g. camd35:192.168.0.1:20248:1/1702/FF00,0604,0d0c/FF00:hero:itsme
- Added support for systems which broadcast ECM on tables other than 0x80/0x81.
- Added support for Nagra2 BEV & dual IDEA opkeys (00/10).
- Now reading CAID from Cryptoworks smartcard.
- Added sanity check to nano sorting to prevent memory trashing.
- Added new CAID nano to cardclient Radegast ECM request.
- Fixed Cryptoworks shared EMM parsing. Added additional checks to reduced EMM
  load too.
- Fixed smartcard Irdeto camkey challenge for Premiere S01 and other non-Z
  cards. As these cards don't support the RSA challenge, you don't need a
  certificate for them.
- Fixed matching Irdeto certificates which are given with ACS version only.
- Fixed misleading error messages in smartcard.conf parser.
- Fixed ECM-EMM caid mismatch and segfault due to leftover debug statements in
  cardclient camd35.
- Fixed (i.e. removed) global cardclient EMM cache as it corrupts EMM merging
  for systems which broadcast shared updates on different tables.
- Fixed cardclient newcamd segfault on bad config data.

12.11.2005: Version 0.5.2
- Introducing a new config file for smartcard specific data e.g. RSA certificate
  or box keys. The file is called smartcard.conf. See the example file.
- Added support for full camkey challenge in smartcard Irdeto. You need a RSA
  certificate matching your card (either Irdeto default or card specific one) in
  smartcard.conf or your card won't work!
- Added an abstract layer to parse and assemble EMM messages. This touches
  several systems e.g. Viaccess, Cryptoworks & NDS. A bug here may break them
  all.
- Added Cryptoworks & Viaccess EMM handling to newcamd cardclient (via new
  assemble code).
- Added some more MAP math calls to Nagra emulation to fix Rom10 AU.
- Several fixes to NDS EMM parsing/assembling.
- Fixed ConstCW key lookup (was broken due to Nagra1/2 key handling changes).
- Fixed cardclient camd3 to include SID in ECM request.
- Fixed cardclient newcamd to handle NULL-cw which are send by newcs.
- Removed logger option 'non-recording on' from the config. In 0.5.x it is
  without function anyways.
- Added a message to hint the user about unusual values in ScCaps. Changed the
  default values to something more reasonable too.
- Updated FFdecsa patch to 0.1.2 (fixing a segfault).

13.10.2005: Version 0.5.1
- Added smartcard Cryptoworks EMM handling. There is a setup option to disable
  the parental rating on the card too (experimental). Thanks to scotty for the
  sample code.
- Added smartcard Viaccess EMM handling (experimental).
- Added FFdecsa-0.1.1 patch.
- Don't count a live stream on a FF card when deciding about allowed
  concurrency. A live stream doesn't use bandwidth on the bus.
- Apply min. ECM processing time to Nagra2 too.
- Fixed segfault for Seca1.
- Fixed Irdeto key updates. Somehow/sometime the code was broken.
- Fixed cardclient newcamd NDS EMM (still experimental).
- Now considering the key size when superseding keys.
- Forgot to mention that you need additional table files for Seca 6a (s2_sse.bin
  5120; s2_sse_006a.bin 336; s2_cw_006a.bin 512 (Numbers are the filesize)).
- Updated finnish translations.

15.09.2005: Version 0.5.0
- Forked development branch.
- Added concurrent recording feature i.e. record/view multiple encrypted
  channels on a single DVB card. This also works on a full-featured DVB card!
  To make this feature work you NEED:
  on a BUDGET card:
    * SoftCSA version 0.1.0 or greater
  on a FULL-FEATURED card:
    * a DVB driver patched with dvb-cwidx.diff
    * a specialy patched firmware. The "normal" patched firmware doesn't work!
  See further details in the README.
- vdr-sc patch has been updated. This plugin version ONLY works with this patch!
  Older plugin versions doesn't work with this patch, although they may compile
  fine!
- Dropped compatibility for older VDR versions. Requires VDR version 1.3.29 or
  newer.
- Changed card & provider handling in cardclient camd35 (experimental).
- Added NDS support to newcamd cardclient (experimental).
- Added limited Seca 6a support.
- Fixed mismatching Nagra1 & Nagra2 keys.

------------------------------------------------------------

17.12.2005: Version 0.4.12
- Backported from 0.5.3:
   * Fixed cardclient newcamd segfault on bad config data.
   * Fixed ECM-EMM caid mismatch and segfault in cardclient camd35.
   * Added new CAID nano to cardclient Radegast ECM request.
- Backported from 0.5.2:
   * Fixed ConstCW key lookup.
   * Fixed cardclient camd3 to include SID in ECM request.
   * Fixed cardclient newcamd to handle NULL-cw.
   * Changed plugin default conf values to something more reasonable.
- This is the final release for the 0.4.x branch. The 0.5.x branch is already
  pretty stable. Please consider upgrading.

31.10.2005: Version 0.4.11
- Backported from 0.5.1:
   * Fixed segfault for Seca1.
   * Fixed Irdeto key updates.
   * Now considering the key size when superseding keys.
   * Updated finnish translations.

24.09.2005: Version 0.4.10
- Apply min. ECM processing time to Nagra2 too.
- Backported from 0.5.0:
   * Fixed mismatching Nagra1 & Nagra2 keys.
   * Limited Seca 6a support.

10.09.2005: Version 0.4.9
- Fixed cardclient camd35 to include provider ID in ECM request.
- Fixed Nagra2 padding 2nd RSA and CW swap for NA.
- Fixed compiling issue in Nagra code on older VDR versions.
- Fixed compiling issue in IDEA code if a recent openssl but without IDEA is
  installed.

04.09.2005: Version 0.4.8
- Added Nagra2 code. See example keyfile for key format.
- Fixed coredump in ECM delay feature.
- Fixed buffer overflow in cardclient camd35.
- Fixed setting serial IO speed for smartcard access.
- Now truncating all key printouts in the debug log.

18.08.2005: Version 0.4.7
- Fixed compatibility issue with camd 3.7x.
- Fixed switching to FTA while card is replaying.
- Changed decoding, so that if the decoding fails consecutively, further
  processing is delayed until the next parity change.
- Fixed ECM card response parsing in smartcard Conax.
- Added some generic ECM/EMM parsing.
- Updated finnish translations.

20.06.2005: Version 0.4.6
- Added EMM support for smartcard Conax.
- Added EMM support to Newcamd client.
- Fixed EMM card command in smartcard Seca.
- Fixed Camd Cmd05/Cmd06 offsets.
- Now really fixed canceling netwatcher thread.

25.05.2005: Version 0.4.5
- Fixed Nagra key update issues.
- Added support for the new Camd Cmd05/Cmd06. Thanks to Dukat for the example.
- Added support for broadcasts without ECM data (only if system delivers
  constant CW). Based on Ragnos patch.
- Fixed ca.cache handling if ECM PID changed since entry was created.
- Fixed Radegast client to work with shared Seca cards.
- Fixed netwatcher cancel timeout.
- Now using unaligned.h in cDes to prevent unaligned memory accesses on
  architectures which doesn't support them (e.g. Alpha).

07.02.2005: Version 0.4.4
- Now caching CA descriptor data to speed up intial sync for systems which
  depend on this data (e.g. Seca).
- Fixed Nagra EMM code to handle additional nanos in front of cpu updates.
- Fixed Seca RSA for short decrypt results.
- Fixed Viaccess EMM assemble buffer size.

21.01.2005: Version 0.4.3
- Added Seca2 nano 5109 handling. You need special RSA keys for this. See
  example keyfile.
- Increased wait timeout for ECM extra data.
- Fixed Seca permtables. Thanks to millemila.
- Fixed Seca SHA1 signature. Thanks to BB.
- Fixed return length position in Newcamd cardclient. Thanks to cart.

10.01.2005: Version 0.4.2
- Added workarounds for changes in vdr 1.3.18.
- Fixed comparision of BIGNUM keys (Nagra, but not only Nagra).
- Fixed cCondWait calls for vdr before 1.3.13.

23.12.2004: Version 0.4.1
- Added constant-CW system, CONSTCW=1 to activate. See example keyfile for CW
  key format.
- Added support for Viaccess TPS crypt v2. You need a suitable TPS key for your
  provider. See example keyfile. 
- Added support for v5.25 protocol in Newcamd cardclient (with fallback to old
  protocol).
- Added support for Nagra RSA key updates (high system id only). You need a
  proper eeprom file for this to work.
- Now delaying first access to smartcards until the cards are initialised. 
- Fixed Seca code which though it has a correct decode while it hasn't.
- Fixed several minor issues in Nagra code.
- Fixed CA descriptor parsing for sc-viaccess and cardclients.
- Fixed cardd client to send network message of at least 96 bytes.
- Fixed inline asm macros to be used only on x86 CPUs.
- Replaced non-reentrant libc functions with their reentrant counter part.
- Replaced usleep() calls with proper cCondWait calls (vdr 1.3.x only).

26.10.2004: Version 0.4.0
- Versions bump, now in stable branch.
- Added Viaccess smartcard code, SC_VIACCESS=1 to activate. ECM only for now.
- Added ragnos Sc-Seca-PPV patch.
- Added zens FullX-2 patch.
- Added permtable for Seca provider 0x65.
- Added cardclient config option to trigger immediate connect to cardserver on
  startup.
- Extended smartcard code to support indirect convention, zero-byte writes and
  256-byte reads.
- Fixed Nagra plaintext AU.
- Fixed camd33 reconnecting and discard keep-alive packets.
- Removed unnecessary bind() in udp networking (allows camd35 server on same
  machine).
- Fixed disconnect timeout not working if no dial script is given.
- Updated finnish translations.

------------------------------------------------------------

26.09.2004: Version 0.3.17
- Joined "dukat" & "freezer" cardclients to new "camd33" client.
- Added cardclient "camd35", supporting camd 3.5 udp protocol.
- Added caid & mask to cardclient config. Added carddata (hexbase, hexser) to
  Aroureos cardclient config. See example cardclient.conf.
- Fixed Viaccess logger (wrong section filter mask).
- Fixed dialup networking not hanging up in case of connect error.

14.09.2004: Version 0.3.16
- Now supporting all Nagra keysets (pk0-2,typ0-1). Keyformat has changed. See
  example keyfile.
- Fixed some long standing bugs in Nagra ECM handling. Verify keys (V) are
  mandatory now, 80 keynumber is obsolete. Note: you need both keysets for a
  provider, e.g. for Polsat 7001 & 7101.
- Added support for Seca provider 0x65 (appropriate hash/mt files needed).
- Added finnish translations.
- Fixed key length mismatch on EMM update for 8/16 byte keys.
- Fixed sc-cryptoworks ATR parsing for cards with bios3mod.
- Fixed stupid typo bug in sc-Irdeto which prevented EMM updates at all
  (introduced in .13), fixed potentional buffer overflows.
- Fixed Seca to really loop through all available keys (with same key nr).
- Several compatibility fixes for 64-bit systems.

07.08.2004: Version 0.3.15
- Unified Seca, Viaccess & Nagra DES implementation.
- Added CAID parsing to dukat cardclient.
- Added support for 16-byte Seca keys.
- Added Seca2 0064 51 nano processing.
- Attempt to fix cardclient EMM update problem (appearently AES related).
- Fixed Nagra CPU emu (random generator).

23.07.2004: Version 0.3.14
- Fixed Seca2 nano processing (Thanks to Sandali for new permutation values).
- Fixed missing CAT parsing in Viaccess logger.
- Fixed logger debug output (cardNum vs. CardNum()).
- Fixed error-case memory leak in Nagra file mapper.

01.07.2004: Version 0.3.13
- Added Viaccess2 algo. Note that you need 16-byte keys for Viaccess2.
- Added extended Seca2 nano handling.
- Added provider based addressing and Irdeto2 support in common cardclient.
- Added local caching of ECM/EMM messages to reduce cardserver load.
- Major code restructure to unify system & logger code.
- Fixed reconnecting to server in newcamd client.
- Some changes for gcc 3.4.x compatibility.

06.06.2004: Version 0.3.12
- Added new Seca2 nano handling. Thanks to Nightshad.
- Added some glue for VDR 1.3.7+ compatibility.
- Major code rewrite in cardclient. Use CARDCLIENT=1 to activate. Configuration
  of cardclients has changed completely. See README.
- New network code supporting on demand dialup networking.
- Added Radegast and Newcamd client.
- Added minimum processing time to Nagra ECM code (emulates card processing time
  in case timing depends on this). Configurable from the setup menu (0=disabled).
- Fixed Nagra EMM tester code for DISH and ROM10/11 OTP size.
- Fixed some possible table overflows in Seca code.
- Fixed processing of short blocks in Conax code.
- Fixed FTA switch in case VDR shortly interrupts a recording (e.g. when
  changing PIDs).

07.04.2004: Version 0.3.11a
- Fixed Seca2 segfault on mask table access.
- Now flushing ECM filter buffers on error.

02.04.2004: Version 0.3.11
- Added Seca2 support. Openssl and mask/hash table files needed. See README.
  Seca1 compatiblility not yet tested. Thanks to Nightshad.
- Added fix for Nagra ROM11 and plain key updates.
- Using multiple threads to read from PID filters. Prevents that high-latency
  systems (like smartcards) block out other systems.
- Remember the system name in ca.cache and use this system first later on.
  Prevents delays for low-priority systems if ECM is cached.
- Fixed smartcard Seca PBM checking for cards which doesn't support the needed
  card command.
- Fixed network timeout and flushing read buffer in cardserver client.
- Fixed transponder handling for VDR 1.3.x (frequency vs. transponder).

22.02.2004: Version 0.3.10
- Added cardserver client (Streamboard client). EMM transfers are disabled at
  the moment. Contributed by S.Laurel.
- Added support for Conax smartcards. Thanks to Nightshad.
- Added provider based addressing for EMM updates in Irdeto smartcard.
- Added commandline option to support card reader with reverse reset line (-R).
- Added make option to add a smartcard default port (DEFAULT_PORT).
- Reworked plugin setup menu. Added separate status page. Added smartcard
  information page (press OK on the smartcard interface line).
- Added code to allow system specific setup options.
- Fixed off by one error and more mixed up arguments in Seca1 decryption.
- Fixed typos in Viaccess logger debug statements.

05.02.2004: Version 0.3.9
- Fixed memory initialisation in Nagra cardemu.
- Fixed filedescriptor leak in Nagra ROM mapping code.
- Fixed MECM XOR table if there are less than 64 bytes. Thanks to Vlinders.
- Fixed off by one error in (unused) smartcard Irdeto camcrypt code.
- Fixed mixed up function arguments in Seca1 decryption.
- Fixed Viaccess logger for ViaSat and TPS shared updates. Note that the format
  of the Viaccess.KID file has changed (SA added). Thanks to Nightshad.
- Changed default make options. Irdeto, Seca & Viaccess systems aren't compiled
  by default anymore. Use IRDETO=1 SECA=1 VIACCESS=1 for old behaviour.

18.01.2004: Version 0.3.8
- Several improvements to the Nagra code (Cardemu, MECM). Completely new
  layout, no more libnagra. Now you need some Eeprom files and the location for
  the ROM files has changed. See README file.
  Thanks to Nightshad, BB and their friends.
- Fixed Irdeto smartcard EMM command creation for PW. Also don't overrun the
  card with ECM requests in case of not subscribed/expired channel.
- Reworked Seca, Viaccess and Irdeto crypto code. No more libmgcam.
- Added commandline option to detect smartcards in readers with reverse CD.
- Added a SC patch for vdr 1.3.1 and some glue to the plugin. See README for
  notes about 1.3.1 support.

13.12.2003: Version 0.3.7
- Several Nagra auto-update fixes. Thanks to Nightshad.
- Fixed Irdeto smartcard EMM path. Thanks to Scotty.
- Fixed wrong behaviour in case of transfer mode.
- Added support to load Nagra ROM extentions (needs ROM?ext.bin files).
- Now checking PBM and date in Seca smartcard. Fixed card status for EMM
  updates. Thanks to Nightshad.
- Added a VDR patch to prevent SC activation during EPG scans.
  Contributed by Andy.
- Changed CICAM handling. SC activation is now more channel base.
  Note: you have to update your config! See README file.

8.11.2003: Version 0.3.6
- Added support for Irdeto smartcards (e.g. Premiere). Thanks to Scotty.
- Added smartcard insert/remove detection, card auto-initialisation and support
  for multiple card interfaces.
- Enhanced smartcard ISO functions (e.g. 0x60 handling, ATR parsing).
- Fixed smartcard Cryptoworks (V3 ATR, serial timeout).
- Fixed Nagra ROM10 emu (Cabo 4801).
- Fixed saving ECM values to ca.cache.
- Fixed removing of cached ECM entries so that only really failed entries are
  removed.

24.10.2003: Version 0.3.5
- Fixed Nagra cardemulator (MUL bug, OTP area, etc). Thanks to BB & Nightshad.
- Added handling for ROM specific Nagra keys. See examples/Softcam.Key.
- Fixed display of used Nagra key in the OSD.

18.10.2003: Version 0.3.4
- Added EMM logger in sc-Seca to auto-update card data. Works for Seca2 cards
  too. Thanks to Nightshad.
- Added cardemulator to execute ROM code for improved Nagra key updates. Thanks
  to BB & Nightshad. Probably there are still some issues with providers which
  require seperate keys for EMM processing. This will be addressed in the next
  release.
- Now removing old, failed ECM entries from the cache.
- Fixed possible race condition in Nagra rom locking.
- Fixed memory leaks in Nagra & Conax code (BIGNUM handling).

18.07.2003: Version 0.3.3
- Allow new keys to supersede/invalidate older keys (only for systems with
  unique key identifiers; for now all beside Irdeto & @SHL). This should fix
  Viaccess key updates.
- Made Viaccess loop through all available keys while decrypting.

05.07.2003: Version 0.3.2
- Added some information about @SHL to the README.
- Cleaned up @SHL code. Now supporting multiple keys in keyfile, no need to
  uncomment unused keys.
- New code for hex dumping of incoming data (see common.h for activation).
- Excluding a range of potentional "fake" ECM pids for Viaccess system. Does
  this affects any valid channel?

24.06.2003: Version 0.3.1unstable
- Completely new section filter handling.
- Restructure of the logger code (will allow EMM processing for smartcards).
- Reworked Viaccess logger. Thanks to BB & Nightshad.
- Added @SHL (SkyCrypyt) support. Thanks to Nightshad and his friends.
- Fixed writing duplicate ecm entries into cache file.
- Fixed SoftCSA activation (was broken in 0.3.0, 0.2.x is fine).
- Fixed saving Viaccess keys with odd digit count.
- Fixed leaving a locked mutex in CAM setup.
- Fixed crash in smartcard setup if no serial device was given.
- Added examples files to show file formats.
- Added system specific Makefile's (*.mk).
- Added french translations.

25.05.2003: Version 0.3.0unstable
- Forked 0.3.x unstable branch.
- Major restructure of CA system code.
- Added Viaccess logger. Requires Viaccess.KID. Thanks to BB for providing
  the sample code.
- Generalized smartcard code. Use new plugin commandline option -s to set
  serial port. Use setup menu to select card type.
- Now supporting Seca smartcards. Another big thanks to Nightshad.
- Reworked Cryptoworks smartcard code. Please report working status.

------------------------------------------------------------

29.05.2003: Version 0.2.2
- Added patch for vdr 1.1.32/33.
- Added french translations. Thanks to Piout.

14.05.2003: Version 0.2.1
- Adapted to the changes in (and now also requires) VDR 1.1.31.

05.05.2003: Version 0.2.0
- Some code cleanup.
- Fixed Nagra key saving.
- Added Greek translations. Thanks to Aroureos.
- Stable release version. A new development branch will fork soon.

27.04.2003: Version 0.2.0rc1
- Added patch for vdr 1.1.29

24.04.2003: Version 0.1.13
- Rescanning CaDescr from time to time in case that we initialy got some
  descriptors but are unable to find a valid key with them.
- Some more Cryptoworks fixes.
- Fixed BN bug in Nagra RSA code.
- Newbie protection: actively checking required VDR version and some patch
  versions.
- Adapted to the changes in (and now also requires) VDR 1.1.28. Timeshifting of
  encrypted channels works. You must use a patched LL firmware for this feature,
  the -icam firmware won't allow timeshift.

14.04.2003: Version 0.1.12
- Changed debug messages to avoid confusion between loaded keys and loaded
  cards *sigh*.
- Now using VDR internal functions to get the ECM pids. This requires VDR 1.1.27
  to work. Note also, that there is a new sc patch for VDR 1.1.27.
- Make the ECM cache take care of the fact that the SID may not be unique (now
  matching for source & transponder too).
- Cleanup of Nagra code (now in libnagra). Got rid of the miracle stuff, now
  using libcrypto (openssl) here too. Big thanks to Nightshad.
- Added (untested) Nagra BEV/DISH support.

21.03.2003: Version 0.1.11
- Fixed segmentation fault on plugin exit (stupid: static initialization of
  list members is a no-no).
- Increased timeout for reading PAT.
- Some fixes to the Cryptoworks code. Hope this works better. No testing here.

03.03.2003: Version 0.1.10
- Improved "stop logger" with transfer mode. Disabled this feature for budget
  cards. They don't crash with logger enabled.
- Fixed stopping sc processing if a transfer mode ends.
- SoftCSA now available as separate archive.

19.03.2003: Version 0.1.9
- Fixed Nagra MECM handling.
- Logger is stopped when a transfer mode is detected, too.
- Experimental SoftCSA support. See README for setup instructions. Thanks to
  emumensch for the initial version.

31.01.2003: Version 0.1.8
- Fixed Conax decoding and key handling.
- Fixed Nagra key strings which havn't been NULL terminated.
- Fixed loading SoftCam.Key with Nagra/Conax keys if one or both have been
  disabled at compile time.
- Fixed long standing bug in FastKey().
- Added Nagra logger. No need for a Nagra.KID, the keys should still be in
  SoftCam.Key if you are able to watch Nagra channels. Thanks to Nightshad.

15.01.2003: Version 0.1.7
- Switched to Conax code from mgcam_20030114 (much shorter). You must have
  installed libcrypto (part of openssl). This fixes the Conax linking problem in
  0.1.6 too.
- Nagra & Conax keys are now loaded from SoftCam.Key too. See README for format.

14.01.2003: Version 0.1.6
- Fixed Viacess code for NTV and TPS crypt (mgcam_20021123).
- Extended setup option for logger. Logger can be stopped during recordings as
  soon as a valid key is found. Is this more stable?
- Fixed a compile error in Nagra code (miracl.h).
- Switched Cryptoworks support to libcwemu. Serial line detection is now in the
  main Makefile, see ISO_TTY. CRYTOWORKS=1 to enable.
- Added Conax support, based on lincardemu0.1.9n and some adaptions to mgcam
  found on the net. Thanks to all the guys for their work. CONAX=1 to enable.
- Fixed PMK update in Irdeto logger.
- Updated card data is also written to ca.cache now. The ca.cache format has
  changed for this. The old format is converted automatically.
- Changed detection of fake channel id's.
- Improved filter settings and paket reading.

16.11.2002: Version 0.1.5
- Adapted to the changes in vdr 1.1.15. Now requires vdr >=1.1.15 and HEAD
  driver.
- Added Cryptoworks support together with original cards and a cardreader with
  Phoenix ISO interface at the serial line. Add CRYPTOWORKS=1 to enable. (see
  libmgcam/cryptoworks.c for serial line selection).
- Remove xor/firmware hacks (not needed anymore).

28.10.2002: Version 0.1.4
- Adapted to the changes up to vdr 1.1.14 and the new HEAD DVB driver.
- Added option to setup menu to reload config files.
- Added code to detect fake channel id's on primafila.
- Minor logger fixes.

28.09.2002: Version 0.1.3
- Now compiles with vdr 1.1.9+.
- Cleaned up Viaccess code.
- Added Seca logger.
- Fixed switching back to a FTA channel after recording.

09.09.2002: Version 0.1.2
- Load cardinfos/cacache even if no keyfile found.
- Fixed rescanning of PAT/PMT if temporarily no enc. system found.
- Fixed timeout handling while reading from dvb device.
- Removed usleep() loops from logger code.

29.08.2002: Version 0.1.1
- Added missing code to save the xor & firmware hack setup.

22.08.2002: Version 0.1.0
- Initial release.
