From: Alexander P. <no...@gi...> - 2019-01-30 21:00:45
|
Branch: refs/heads/master Home: https://github.com/OpenSC/OpenSC Commit: 09a594d0f074784053e54c92c3ab32a9181ba711 https://github.com/OpenSC/OpenSC/commit/09a594d0f074784053e54c92c3ab32a9181ba711 Author: Alexander Paetzelt <361...@us...> Date: 2019-01-30 (Wed, 30 Jan 2019) Changed paths: M src/libopensc/card-openpgp.c M src/libopensc/cardctl.h M src/libopensc/internal.h M src/libopensc/pkcs15-openpgp.c M src/libopensc/pkcs15-pubkey.c M src/pkcs15init/pkcs15-openpgp.c M src/tools/openpgp-tool.c Log Message: ----------- 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 |