Commit Graph

21 Commits

Author SHA1 Message Date
Jakub Jelen 0b45e78e4f idprime: Fix RSA-PKCS mechanism with hashing on card 2021-05-24 10:42:08 +02:00
Georgi Kirichkov ca01d2c5e2 Code style changes 2021-05-11 11:44:39 +02:00
Georgi Kirichkov 5ae0ef4f41 Sets card->name for IDPrime v3 and v4 cards 2021-05-11 11:44:39 +02:00
Georgi Kirichkov 072c64aaed Adds Gemalto IDPrime v4 2021-05-11 11:44:39 +02:00
Jakub Jelen e1c8361ff3 idprime: Create algorithme reference based on the MGF1 flags as the HASH flags are no longer present for RSA-PSS mechanism 2021-01-26 10:53:30 +01:00
Jakub Jelen edaf921eb6 idprime: Support V3 key references 2021-01-26 10:53:30 +01:00
Jakub Jelen ac81764308 idprime: Try to use different key_reference for V3 2021-01-26 10:53:30 +01:00
Jakub Jelen a6ed34bbb5 Add support for Gemalto IDPrime OS version 3 (padded pin to 16 bytes with zeroes)
Fixes #2202
2021-01-26 10:53:30 +01:00
Jakub Jelen f015746d22 idprime: Use temporary variable instead of messing up the passed one
Thanks oss-fuzz

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28185
2020-12-04 09:30:10 +01:00
Jakub Jelen b3501ff669 idprime: Unbreak OS version 2 after key&cert renewal 2020-10-03 01:08:05 +02:00
Frank Morgner 0b40d3b999 idprime: check max. buffer length
fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=25998
2020-10-02 13:23:11 +02:00
Jakub Jelen 732ed77ad6 idprime: Unbreak reading of compressed certificates 2020-09-30 23:13:14 +02:00
Jakub Jelen 7893d2860c idprime: Fix null-dereference
Thanks oss-fuzz

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=21586
2020-04-06 17:56:28 +02:00
Jakub Jelen 34dad7f543 idprime: Add missing terminator in ATR list
Thanks oss-fuzz

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20510
2020-02-04 15:44:19 +01:00
Frank Morgner 72836fa3cb Fixed Dereference before null check
As reported by coverity scan
2020-02-04 13:56:53 +01:00
Jakub Jelen 8e8c3735bc idprime: Reflect the OS version in the card name 2020-01-07 14:16:46 +01:00
Jakub Jelen bebb5be6e0 idprime: Simplify applet selection and limit file size to sensible values 2020-01-07 14:16:46 +01:00
Jakub Jelen 5017768e5b idprime: Detect the newer version of OS using CPLC data 2020-01-07 14:16:46 +01:00
Jakub Jelen 2c9510af1e Improve parsing of the root file and store also the object length 2020-01-07 14:16:46 +01:00
Jakub Jelen fdcc843e78 idprime: Implement a way of getting token label from special card structure 2020-01-07 14:16:46 +01:00
Jakub Jelen f61d9b3b53 Implement new Gemalto IDPrime driver
The card is largely ISO 7816 compliant, but does not provide any
simple way of listing the content which is supported by current
PKCS#15 implementation therefore the PKCS#15 emulator had to be
used.

The certificates are compressed in a similar way as in DNIE
cards which complicates reading from the card and which I think
could be moved to the shared ISO (or some other file since I saw
that code already many times).

The card supports wide range of algorithms including
RSA-PSS and RSA-OAEP padding schemes in-card. On the other hand,
it does not allow raw RSA and SHA1 hashes on card anymore.

The card is manufactured by Gemalto so it has strict ATR which
can be used for detection.
2020-01-07 14:16:46 +01:00