Commit Graph

14 Commits

Author SHA1 Message Date
Frank Morgner f9b31e50dd iso-sm: fixed too short response APDU data length
one byte off error in calculation of ASN.1 length
2020-04-08 02:13:24 +02:00
Frank Morgner b7b501d0a5 fixed issues reported by clang-analyzer 2019-05-21 19:34:46 +02:00
Frank Morgner 7f7bcbff52 fixed misuse of realloc
calling it with size 0 leads to a free, which eventually may lead to a
double free corruption.
2019-01-30 21:57:59 +01:00
Frank Morgner 53dfde94a9 iso-sm: fixed allocating enough data
regression from aa940e8619
2019-01-15 07:31:20 +01:00
Frank Morgner aa940e8619 iso-sm: avoid allocation of big chunk of data
Use unencrypted APDU's resplen to estimate the size of the required SM
response buffer
2019-01-04 00:43:48 +01:00
Frank Morgner 6f0f42c506 fixed use of uninitialized data
When card->sm_ctx.ops.free_sm_apdu gets called in sc_sm_single_transmit
with a prior transmission error, then `sm_encrypt` still tries to
decrypt the response and hence, accesses the previously uninitialized
`resp`.
2019-01-04 00:43:48 +01:00
Frank Morgner a899a46b09 replaced SC_TEST_RET with LOG_TEST_RET 2018-12-06 09:26:42 +01:00
Frank Morgner 907c9479e2 replace sc_debug_hex with sc_log_hex 2018-12-06 09:26:42 +01:00
Frank Morgner 24b50a4277 replace sc_debug with sc_log 2018-12-06 09:26:42 +01:00
Mounir IDRASSI 1ab93312cd SM: fix crash if nested GET RESPONSE issued during sm session fails or returns invalid MAC. 2018-11-21 15:35:53 +01:00
Frank Morgner 04a7075290 fixed compiler warnings 2017-11-09 12:42:29 +01:00
Frank Morgner 9d15326de1 fixed more coverity issues 2017-04-20 10:58:54 +02:00
Frank Morgner 0a254dc2bb fixed compiler warnings 2017-03-28 12:51:24 +02:00
Frank Morgner a4f64d9439 Added (external) card driver for German ID card
(Imported libcardnpa from https://github.com/frankmorgner/vsmartcard)

- Added generic SM implementation of ISO/IEC 7816-8
- Added implementation of extended access control as defined by
  - BSI TR-03110
  - ICAO Doc 9303
  - ISO/IEC 7501
- Added tool for German ID card (and other EAC tokens)
- renamed folder libsm to sm
2017-03-20 21:28:48 +01:00