Commit Graph

5740 Commits

Author SHA1 Message Date
vletoux 976db5cb04 card-masktech: initial commit
card-masktech.c: fix building issues on the integration platform

card-masktech.c: fix linux compilation errors

honour HAVE_CONFIG_H

card-masktech.c: take in account Frank's remark about extended APDU in masktech_decipher

remove trailing spaces
2015-05-05 10:13:26 +02:00
vletoux 1586f240f4 iso7816.c: fix SC_PIN_CMD_IMPLICIT_CHANGE with pinpad
When a pinpad is used, the old pin is asked whatever, even if a previous authentication happenened or if the card doesn't support it.
2015-05-05 09:56:39 +02:00
Andreas Schwier ed588d2443 pkcs11: fixed broken C_Decrypt
Fixed broken C_Decrypt from 643080baf9

fix #449
2015-04-30 15:57:44 +02:00
Viktor Tarasov f0189e8378 pkcs11-tool: option to 'decrypt some data' 2015-04-30 15:57:44 +02:00
Andreas Schwier 0dba2d453f sc-hsm: fix signed char for ARM platforms
char is unsigned by default on ARM

fix #450
2015-04-30 12:03:01 +02:00
viktorTarasov c754e3f197 Merge pull request #444 from frankmorgner/pkcs11-error-handling
Improved error handling for PKCS#11 module
2015-04-25 13:04:07 +02:00
Thomas Calderon 0a754b694e pkcs11-tool: pass key usage flags to created objs
* Command-line parameters were introduced to specify key usage
  (--usage-{sign,decrypt,derive}). However, those are not used when importing
  external objects using C_CreateObject function.

fix #445
2015-04-25 12:28:48 +02:00
Doug Engert ee23d28654 EC field_length changes for non-multiple of 8 bits curves
In OpenSC the EC field_length is the number of bits in the field.
Most curves have a field_length which is a multiple of 8 bits
but there are many that are not.

The X and Y points and privateD are stored in octetstrings
so there may need to be an extra byte in the octetstring.

An OpenSSL BIGNUM will drop leading zero bytes, so its size can not be used
to determine the field_length.

fix #440
fix #433
2015-04-25 12:21:39 +02:00
viktorTarasov 3b545b513a Merge pull request #446 from frankmorgner/protocol
Honour HAVE_CONFIG_H
2015-04-25 12:00:42 +02:00
Frank Morgner de5c224201 silence some shell commands in Makefile 2015-04-23 00:12:37 +02:00
Frank Morgner bcb5fc15e5 honour HAVE_CONFIG_H 2015-04-22 23:55:33 +02:00
Frank Morgner 9f318b829f remove slots of removed readers 2015-04-21 02:00:06 +02:00
Frank Morgner 02f3997632 added error handling to print_ssh_key 2015-04-21 01:32:37 +02:00
Frank Morgner e359b2a310 handle unexpected meltdown of PC/SC service 2015-04-21 01:09:21 +02:00
Frank Morgner cbc43eeb88 fixed compiler warning 2015-04-21 01:04:18 +02:00
Frank Morgner c8a7c8bc7a fixed typo 2015-04-21 01:04:18 +02:00
Frank Morgner 54f285d57a correctly handle readers that have been removed 2015-04-21 01:04:18 +02:00
Frank Morgner c45c90a337 sc_pkcs11_close_all_sessions: close all sessions even if closing one fails 2015-04-20 16:18:11 +02:00
Viktor Tarasov 17eb40e5f9 doc: add 'signature-format' option for pkcs15-crypt 2015-04-15 09:47:15 +02:00
Thomas Calderon 23ca1f101d pkcs11-tool: Add support for creating EC privkey
* This patch allows to create EC private keys. The feature re-use the GOST
  parsing function as instanciating an ECDSA key is the same as a GOST key.
2015-04-15 08:58:05 +02:00
Frank Morgner a7a903fd81 check ATRs even for forced card driver
some card drivers depend on a card type which is initialized by matching the card's ATR
2015-04-15 08:56:22 +02:00
Viktor Tarasov 96556dea7b fix #433: EC privateD octetstring may need leading zeros 2015-04-12 13:35:27 +02:00
German Blanco 6caa85f238 Issue 395. Avoiding a couple of memory leaks. 2015-04-12 11:35:09 +02:00
Frank Morgner 6e84ee0ba7 pkcs11-tool: honour unsupported signature mechs 2015-04-12 11:28:25 +02:00
Frank Morgner 643080baf9 honour key capabilities for decryption/verification
fixes #419
2015-04-12 11:28:25 +02:00
Frank Morgner d7ab0df51d export sc_pkcs15_bind_internal
allows bootstrapping an external pkcs15 driver
2015-04-12 11:28:25 +02:00
Viktor Tarasov 3e2d51e0ba iasecc: use PIN PAD with variable PIN length 2015-04-11 16:47:13 +02:00
Viktor Tarasov 5757d82cc9 libopensc: stored-length member in PIN CMD data 2015-04-11 16:45:17 +02:00
Viktor Tarasov 49598b6016 libopensc: invalid OID comparison for EC keys
Thanks to Peter Popovec <popovec.peter@gmail.com>
2015-04-09 11:49:05 +02:00
vletoux ce962c14f4 fix #425: guid computation issue
Compilation without OpenSSL - guid computation issue
This case is triggered when:
- built without OpenSSL
- called from a minidriver where id.len = 1
- card number is less than 15 bytes

(VTA: codding style slightly touched)
2015-04-08 18:41:51 +02:00
Dirk-Willem van Gulik 4000e6d5b0 Add missed option debug info
Fix misspelled key in --help output (thanks Philip Wendland).
2015-04-08 18:03:46 +02:00
vletoux 8ea328ff7f Minor code quality improvements.
Basically checks that the memory allocation succeed.

The ctbcs.c change improve the readability
because count = 0 and len > 254 does not add any value.

VTA: added few coding style changes
2015-04-05 13:15:57 +02:00
Frank Morgner db860c0d2a export sc_sm_stop 2015-04-04 22:09:22 +02:00
Philip Wendland fa045d44ec pkcs11-tool: Let the user choose the ECDSA signature format
Instead of hard-coding the format depending on whether OpenSC was compiled with
OpenSSL or not, the user should be able to choose the format himself.
The default format now is the normal concatenation of R,S both for CKM_ECDSA
and CKM_ECDSA_SHA1.
2015-04-04 22:01:22 +02:00
Philip Wendland f93835add9 Allow log functions to be called with ctx==NULL
This change allows functions to be used from places where there is no
sc_context (ctx) available.
2015-04-04 22:01:22 +02:00
Viktor Tarasov 95ad11a253 iasecc: special case for 'Gemalto GemPC Pinpad'
issue 424
VTA: this pinpad, the only available, do not accept different values
for min and max PIN lengths in P10 block.
2015-04-04 21:41:28 +02:00
Frank Morgner c0fac2a4f6 stop SM in case of SM errors 2015-04-02 09:54:41 +02:00
Frank Morgner e07c4bcfbb added sc_sm_stop
implementation taken from the ISO SM driver of
https://github.com/frankmorgner/vsmartcard/tree/master/npa
2015-04-02 09:54:41 +02:00
viktorTarasov 00b04254f7 Merge pull request #420 from frankmorgner/osx
Travis OSX integrations
2015-04-01 09:55:11 +02:00
Frank Morgner 30b24e79c0 fixed memory corruption in encode_file_structure
as suggested by Peter Popovec
2015-04-01 09:42:21 +02:00
Frank Morgner 88fa362b5b nobody likes being pedantic 2015-04-01 01:41:04 +02:00
Frank Morgner 311958e13f Travis-ci: build dmg on OS X 2015-04-01 01:41:04 +02:00
Frank Morgner a251b9335c use xcodebuild with `-target OpenSC`
patch by Dirk-Willem van Gulik
2015-03-31 23:57:19 +02:00
Dirk-Willem van Gulik 88ec461bc5 tool: RFC4716 compliant key output
Add a comment field to the ssh key output if a label is set on the key. Add RFC4716 compliant key output for the new breed of modern (mobile) SSH clients.

VTA: use short form of log call in iso7816
2015-03-31 19:09:25 +02:00
Frank Morgner 0790969b97 recognize short EF identifier 2015-03-31 18:48:57 +02:00
Frank Morgner a05e7ca84d ignore errors on `apt-get update` 2015-03-31 18:48:33 +02:00
Thomas Calderon 4a4d750e73 iasecc: Fix log output is always displayed
* iasecc_read_public_key function uses SC_SUCCESS instead of log level
  value, hence the log output is always displayed. This uses
  SC_LOG_DEBUG_NORMAL instead.

VTA: updated to use short form of LOG macro
2015-03-31 18:47:11 +02:00
Thomas Calderon 117f3a74be iasecc: Fix key usage when provisioning card
* Avoids overriding key_usage when creating objects on the card.
2015-03-31 18:25:54 +02:00
Robert Quattlebaum 548c2780d3 Add support for ACOS5-64 cards.
The ACOS5-64 cards have a different ATR than the original
ACOS5-32 cards. This change simply adds this ATR so that it
will be recognized properly.
2015-03-29 14:09:35 +02:00
vletoux 5007e9fc9f md: fix build without OPENSSL_VERSION_NUMBER
Fix the WCHAR / CHAR conversion problem in CardAuthenticateEx in case of PinPAD (vs->wzPinContext is UNICODE)
Fix UNICODE compilation problem( MessageBoxA instead of MessageBox)
2015-03-29 13:59:21 +02:00