Commit Graph

17 Commits

Author SHA1 Message Date
frankmorgner
35f75abe1d - Fixed error when testing pace without card
- Testing pace allows now to choose the type of the secret (mrz, pin, can, puk).
  The secret can be given as commandline option or interactively.
- Cleaned prompt for getting the password
- Fixed error when inserting an empty password
- When PACE is successfully finished, APDUs for testing can be given
  interactively


git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@73 96b47cad-a561-4643-ad3b-153ac7d7599c
2010-04-15 07:37:32 +00:00
frankmorgner
b798a6e3a2 - completed mac verification. sm with pace is now fully functional.
- made pace_test more fault tolerant.


git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@72 96b47cad-a561-4643-ad3b-153ac7d7599c
2010-04-13 21:06:17 +00:00
frankmorgner
985590c3a8 - decryption of sm apdu now working. verification of mac still missing.
git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@71 96b47cad-a561-4643-ad3b-153ac7d7599c
2010-04-12 21:22:39 +00:00
frankmorgner
535a2ea9f1 fixed various memory leaks and potential segfaults
git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@70 96b47cad-a561-4643-ad3b-153ac7d7599c
2010-04-12 19:54:43 +00:00
frankmorgner
f84d7f1752 bugfixes:
- sm.c: fixed mac data padding, when sending sm apdu without data.
- pace.c: for iv calculation ecb is used instead of cbc
- pace.c: fixed ssc incrementation


git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@68 96b47cad-a561-4643-ad3b-153ac7d7599c
2010-04-12 14:04:08 +00:00
frankmorgner
e752d51396 - reverted changes from last commit
git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@64 96b47cad-a561-4643-ad3b-153ac7d7599c
2010-04-12 07:23:13 +00:00
frankmorgner
c01c85e7ec - added more debugging
- bugfix: header of sm apdu is authenticated instead of the original apdu


git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@63 96b47cad-a561-4643-ad3b-153ac7d7599c
2010-04-12 07:18:35 +00:00
frankmorgner
b3b9ad6aea made bin_log more verbose
git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@61 96b47cad-a561-4643-ad3b-153ac7d7599c
2010-04-11 20:49:48 +00:00
frankmorgner
90efc82314 Bugfixes:
- ssc is a BIGNUM, since its size can be up to 16 bytes (not 16 bits as before)
- protected le is now encoded as octet string (not as unsigned integer anymore)
- sc_format_asn1_entry was fet with wrong pointers (lebuf instead of *lebuf
  and formatted_data instead of *formatted_data

Added some debug output.


git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@60 96b47cad-a561-4643-ad3b-153ac7d7599c
2010-04-11 20:31:28 +00:00
frankmorgner
c8cd403ee9 made sm code independant from openssl
git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@59 96b47cad-a561-4643-ad3b-153ac7d7599c
2010-04-10 20:39:32 +00:00
frankmorgner
495149f265 - pace.c: removed unused variable ssc
- pace.c: bugfix: don't increment ssc when resetting it.
- sm.c/.h: wrote wrapper sm_transmit_apdu
- sm.c: removed sm error handling, should be done by sc_check_sw
- sm.c/ccid.c/pace.c: added qualifier "static" to local functions


git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@58 96b47cad-a561-4643-ad3b-153ac7d7599c
2010-04-10 18:16:09 +00:00
frankmorgner
8905bdec72 added sw checking for sm
git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@57 96b47cad-a561-4643-ad3b-153ac7d7599c
2010-04-10 17:00:00 +00:00
frankmorgner
6d0cc5e908 added missing return buffer for select of CardSecurity
git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@56 96b47cad-a561-4643-ad3b-153ac7d7599c
2010-04-10 15:12:37 +00:00
frankmorgner
cbc4dda0ed - sm.c (sm_encrypt) fixed header of sm apdu
- pace.c (EstablishPACEChannel) Fixed initialisation of authentication_ctx.
  (pace_test) Fixed usage of SC_TEST_RET and initialisation of select apdu for
  EF.CardSecurity.


git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@55 96b47cad-a561-4643-ad3b-153ac7d7599c
2010-04-10 14:53:45 +00:00
frankmorgner
62e48e2a7c - Work in progress: Almost finished (hopefully) flexible sm implementation
(untested).  struct sm_ctx needs external cipher and authentication
  implementations.  Here only routines for encryption/decryption/authentication
  with PACE are given.


git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@54 96b47cad-a561-4643-ad3b-153ac7d7599c
2010-04-09 20:36:32 +00:00
frankmorgner
ae3e7ae862 - added untested function to decrypt sm
- function cipher now always disables automatic padding


git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@52 96b47cad-a561-4643-ad3b-153ac7d7599c
2010-03-31 21:58:49 +00:00
frankmorgner
2a1afd8fd2 - Added an untested SM implementation, currently only with encryption
- Added utils from OpenPACE


git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@51 96b47cad-a561-4643-ad3b-153ac7d7599c
2010-03-29 19:53:11 +00:00