Commit Graph

7469 Commits

Author SHA1 Message Date
Frank Morgner f3e6639de6 added GoID CVCA 2019-03-05 13:17:15 +01:00
Frank Morgner 20daced605 fixed special case of deletion in gnuk_write_certificate 2019-02-14 09:22:23 +01:00
Frank Morgner 1a61ae849f fixed Null pointer argument in call to memcpy 2019-02-14 09:22:23 +01:00
Frank Morgner b6fadb469f fixed sc_decompress_zlib_alloc return code 2019-02-14 09:22:23 +01:00
Frank Morgner 6e48de83c7 avoid allocation of 0 bytes 2019-02-14 09:22:23 +01:00
Frank Morgner f4fccfd94e fixed undefined bitshift 2019-02-14 09:22:23 +01:00
Frank Morgner c858d4b3d1 fixed argument checking 2019-02-14 09:22:23 +01:00
Frank Morgner 6fdb29a470 fixed use of uninitialized values 2019-02-14 09:22:23 +01:00
Frank Morgner 01d515a026 fixed use of garbage value 2019-02-14 09:22:23 +01:00
Frank Morgner 8ea77a83e0 fixed misuse of realloc 2019-02-14 09:22:23 +01:00
Frank Morgner 32e1995300 fixed dead assignment 2019-02-14 09:22:23 +01:00
Frank Morgner e4a01643a6 fixed possible NULL pointer dereference 2019-02-14 09:22:23 +01:00
Frank Morgner 53954e9ff1 fixed OpenSSL handling in PKCS#11 mapping
prevents NULL pointer dereference
2019-02-14 09:22:23 +01:00
Frank Morgner b708cab0a3 fixed assignment of garbage value 2019-02-14 09:22:23 +01:00
Frank Morgner 85485eb9b0 fixed unused assignments 2019-02-14 09:22:23 +01:00
Frank Morgner fdb0e6d581 Fixed Potential leak of memory 2019-02-14 09:22:23 +01:00
Raul Metsma c2cc83754e select_esteid_df is only used in card-mcrd.c
Signed-off-by: Raul Metsma <raul@metsma.ee>
2019-02-12 08:56:20 +01:00
Raul Metsma f37a8a5c52 is_esteid_card is only used card-mcrd.c
Signed-off-by: Raul Metsma <raul@metsma.ee>
2019-02-12 08:56:20 +01:00
Peter Marschall 4757466f27 OpenPGP: space police
remove trailing spaces & tabs
2019-02-12 08:55:59 +01:00
Alex Karabanov 04ef9dbf3b Fix build on cygwin in strict mode (#1605) 2019-02-11 20:50:12 +01:00
Frank Morgner be33e82b75 goid-tool: fixed possible memory leak
internally created context needs to be freed if TA/CA is done without
an existing SM context from PACE
2019-02-11 15:41:32 +01:00
Frank Morgner 72cdc9d82e goid-tool: fixed confusion about always/never acl 2019-02-08 15:08:03 +01:00
Frank Morgner aca9d79f6d fixed parsing SoCManager info 2019-02-07 16:56:33 +01:00
Frank Morgner 928fbf2f03 goid-tool: implented PIN/FP verification for PAccess 2019-02-04 16:01:56 +01:00
Frank Morgner 3dd0638623 initialize package suffix with branch and PR 2019-01-31 16:01:14 +01:00
Raul Metsma 36c5461c99 Make function more readable
Signed-off-by: Raul Metsma <raul@metsma.ee>
2019-01-30 22:02:14 +01:00
Hannu Honkanen ec176443e2 Fixes an issue that appeared in 6bf9685 (PR #1540). In case use_pinpad==0 && pinsize == 0, uninitialized pinbuf was passed to sc_pkcs15_verify_pin causing problems. 2019-01-30 22:01:52 +01:00
opensignature 84f0a88edb Remove postecert and infocamere support because no longer issued (#1584)
* Remove postecert and infocamere support because no longer issued

* Remove wrong changes

* reset NEWS

* EC_POINT_set_affine_coordinates_GFp and EC_POINT_get_affine_coordinates_GFp are
deprecated, use EC_POINT_set_affine_coordinates and EC_POINT_get_affine_coordinates

* If OPENSSL API version is < 3 use old functions EC_POINT_[sg]et_affine_coordinates_GFp

* Move the OpenSSL compatibility stuff to src/libopensc/sc-ossl-compat.h
2019-01-30 22:01:24 +01:00
Alexander Paetzelt 09a594d0f0 OpenPGP Card v3 ECC support (#1506)
* pgp: initialize ecc keys for OPC3

* Add supported ECC algorithms by card version

* Add tasks identified so far

* pgp: Recognize ECC set on card

* pgp: get_pubkey_pem read ECC pubkey from card

* pgp: minor code changes for ECC compatibility

* pgp: expand sc_cardctl_openpgp_keygen_info to hold ec info

* Fix segfault problem in pkcs15-pubkey.c

* pgp: enable key generation with pkcs15-init and ECC

* pgp: adapt calculate_and_store_fingerprint to accept ECC

* pgp: adapt rest of pgp_gen_key and subfunctions to accept ECC

* pgp: add kdf parameters for ECDH fingerprint calculation

* pgp: enable key import with pkcs15-init and ECC

* pkcs15-pubkey: fix_ec_parameters onlz accpets explicit data or named_curve

* Fix some mistakes during merge

* More clean up for PR

* Fix some ugly alignments

* Improve code readability

* Prevent unitialized variable by using FUNC_RETURN

* OpenPGP: add length check

* pgp: save exponent length in bits for sc_cardctl_openpgp_keystore_info_t

* pgp: length checks and reallocations

* pgp: oid init added

* OpenPGP: slightly re-factor pgp_update_new_algo_attr()

* replace loop copy with memcpy()
* use ushort2bebytes() to set RSA modulus & exponent
* use symbolic name SC_OPENPGP_KEYFORMAT_RSA_STD for the key import format

* OpenPGP: slighly re-factor pgp_parse_and_set_pubkey_output()

* check for RSA modulus & exponent lengths not being a multiple of 8
* make sure RSA modulus & exponent lengths are always set
* remove a left-over RSA setting from the EC code

* pgp: adding BYTES4BITS

* pgp: initialization of values in pgp_build_extended_header_list based on key type

* pgp: add BYTES4BITS and remove unnecessary tests

* Fix broken pgp_update_new_algo_attr

* pgp: fix the ecpoint_len variable
2019-01-30 22:00:36 +01:00
Frank Morgner 7a7ff50422 fixed memory leaks during card initialization 2019-01-30 21:57:59 +01:00
Frank Morgner f486486413 removed unused defines 2019-01-30 21:57:59 +01:00
Frank Morgner 97a58cb441 fixed https://github.com/OpenSC/OpenSC/issues/1581 2019-01-30 21:57:59 +01:00
Frank Morgner aed95b2f2b pkcs11: check inputs
prevents NULL pointer dereference
2019-01-30 21:57:59 +01:00
Frank Morgner 993f6f5cc6 Use opensc-pkcs11.so for static build of pkcs11-tool
Statically link opensc-pkcs11 into pkcs11-tool with --disable-shared
2019-01-30 21:57:59 +01:00
Frank Morgner 887340c04d Generalized fuzzing script 2019-01-30 21:57:59 +01: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 d0b499cda3 reuse previous fuzzing results if possible 2019-01-30 21:57:59 +01:00
Frank Morgner 9e5d7bc873 added minimal test script for fuzzing with AFL
Credits go to https://www.x41-dsec.de/lab/blog/smartcards/
2019-01-30 21:57:59 +01:00
Frank Morgner 2ad7453718 use const qualifier for sc_simpletlv_read/put_tag 2019-01-30 21:57:59 +01:00
Frank Morgner 893be0d9c0 fixed memory leaks 2019-01-30 21:57:59 +01:00
Frank Morgner 83c4ebe9d6 goid-tool: reset authentication status 2019-01-30 13:00:14 +01:00
Frank Morgner fc08d89247 goid-tool: differ PAccess and SoCManager usage 2019-01-30 09:35:16 +01:00
Frank Morgner a8c84d490a handle multiple verifications when changing secret 2019-01-30 09:35:11 +01:00
Raul Metsma 70d690ace7 r value is already checked on line 113 (#1582) 2019-01-24 13:15:13 +01:00
Jakub Jelen f161c3a178 Remove repeated words from manual pages 2019-01-23 20:41:01 +01:00
Frank Morgner 4916d07ff2 fixed unused check 2019-01-20 23:02:21 +01:00
Frank Morgner 1565f48084 added LGTM badge 2019-01-20 23:02:21 +01:00
Frank Morgner 79d019fc5f fixed typo
closes https://github.com/OpenSC/OpenSC/issues/1576
2019-01-20 23:02:21 +01:00
Frank Morgner 745b8cf420 added include guards to compatibility headers 2019-01-20 23:02:21 +01:00
Frank Morgner 6bf7c0d219 don't hide global variables 2019-01-20 23:02:21 +01:00