Commit Graph

6719 Commits

Author SHA1 Message Date
Jakub Jelen
60dbebf511 Parse the ECC parameters from TokenInfo (CHOICE in AlgorithmInfo)
Fixes #1134
2017-09-02 00:19:35 +02:00
Jakub Jelen
eee4964d7f The cardos driver supports also CardOS 5
CardOS M4 is confusing since it refers to the old card versions
2017-09-02 00:19:35 +02:00
Jakub Jelen
804f47b298 Do not add non-informative PIN to the token label 2017-09-02 00:17:15 +02:00
Jakub Jelen
d018855b9f Get cardholder name from the first certificate 2017-09-02 00:17:15 +02:00
Jakub Jelen
56c8f59b25 Use shorter PIN name for default PIN to accomodate Card Holder name in future 2017-09-02 00:17:15 +02:00
Mouse
f0e703be49 Fix bug in pkcs11-tool (did not ASN.1-encode ECDSA-SHA-2 signature) 2017-08-29 12:05:16 +02:00
Mouse
1efc73fa2f Fix typo in ECDSA-SHA384 for pkcs11-tool 2017-08-28 21:17:03 +02:00
Frank Morgner
555671b54d sc_read_binary may return less bytes than requested
Note, that there are a number of card drivers that still use
`sc_read_binary` in the wrong way. Unfortunately, I don't have the time
to go through all of them.

Fixes https://github.com/OpenSC/OpenSC/issues/1112
2017-08-27 21:21:00 +02:00
Frank Morgner
172f320c9a win32: Dedicated md/pkcs11 installation folders
Don't install non-permanent files (md/pkcs11) to system folder anymore.
2017-08-22 23:41:29 +02:00
Arnaud Fontaine
2765b7b1a0 Support for new MinInt agent card (#1092)
* Support for new MinInt agent card

This card uses the same ATR as the existing card, but the applet installed
does not have the same AID. This card actually works exactly as the
IASECC_SAGEM.

Unify iasecc_init for AMOS/SAGEM and MI cards
2017-08-22 01:13:18 +02:00
Jakub Jelen
41796ff0ed [pkcs11-tool] Add SHA2 HMAC mechanisms 2017-08-17 12:02:28 +03:00
Jakub Jelen
d5647fe53d [pkcs11-tool] Properly define RSA-PSS mechanisms 2017-08-17 12:02:28 +03:00
Frank Morgner
a1466f7395 sc-hsm: better error messages for optional files 2017-08-11 23:07:25 +02:00
Frank Morgner
a007ab7820 sc-hsm: New PIN commands for GoID 1.0 2017-08-11 23:07:25 +02:00
Jakub Jelen
e0eb5bf888 Do not call list_init() twice (amend 6bfb39454) 2017-08-11 23:06:21 +02:00
Jakub Jelen
0dcf673296 CAC issues (#1120)
* cac: Make the retransmitted APDU valid by restoring the resplen

* cac: Check SWs for all the APDUs and report the errors to underlying layers

* cac: Fallback from CACv1 to CACv2 when CACv1 instruction is not recognized

for the lack of other pointers how to recongnize them

* avoid goto
2017-08-04 08:48:24 +02:00
Frank Morgner
9b772ebdc4 win32: switch back to OpenSSL 1.0.2 as default
AppVeyor changed the default version back to 1.0.2, see
https://github.com/appveyor/ci/issues/1671
2017-08-04 08:44:41 +02:00
HAMANO Tsukasa
3d187d9ac4 documentation for ignore_private_certificate parameter. 2017-08-02 11:23:43 +02:00
HAMANO Tsukasa
e25565d851 add public keys 2017-08-02 10:27:06 +02:00
HAMANO Tsukasa
da9484bd6b fix trivial leak 2017-08-02 10:27:06 +02:00
HAMANO Tsukasa
977728a5bf jpki: set user_consent flag 2017-08-02 10:27:06 +02:00
Frank Morgner
29589e8a92 AppVeyor: Drop VS2010 build
The pre-compiled OpenSSL binaries on AppVeyor are incompatible with
VS2010
2017-07-24 21:39:01 +02:00
Frank Morgner
78100508a8 AppVeyor: cache cngsdk.msi 2017-07-24 21:39:01 +02:00
Frank Morgner
7a39d6d058 build against OpenSSL 1.1.0 on Windows, by default
- build with AppVeyor's OpenSSL 1.1.0
- updates AppVeyor version of OpenPACE

Fixes https://github.com/OpenSC/OpenSC/issues/1108
2017-07-24 21:39:01 +02:00
Frank Morgner
1c7ef66ce7 fixed date of 0.17.0 in NEWS
Fixes https://github.com/OpenSC/OpenSC/issues/1105

https://github.com/OpenSC/OpenSC/releases/download/0.17.0/opensc-0.17.0.tar.gz
has been updated to include this fix.
2017-07-19 09:31:54 +02:00
Frank Morgner
def06389bf sc-hsm: fixed building with --disable-sm
Closes https://github.com/OpenSC/OpenSC/pull/1103
2017-07-19 09:27:24 +02:00
Jakub Jelen
e2fe24d56a clang static analyzer reports
tools/pkcs15-tool.c:
	Dead assignment: Value stored to 'c' is never read
tools/pkcs11-tool.c:
	Dead assignment: Value stored to 'n' is never read
	Dead assignment: Value stored to 'rv' is never read
libopensc/card-cac.c:
	Dead assignemnt: Value stored to 'tl_head_len' is never read
	Dead increment: Value stored to 'outp' is never read
common/libpkcs11.c:
	Memory leak in case of C_UnloadModule() fails
libopensc/pkcs15-pubkey.c:
	Potential memory leaks
pkcs11/mechanism.c:
	Potential memory leak
pkcs11/framework-pkcs15.c:
	Potential memory leaks
	Dereference of null pointer
	Dead assignments
tools/sc-hsm-tool.c:
	Function call argument is an uninitialized value
	Dead assignment: Value stored to 'r' is never read
libopensc/card-openpgp.c:
	Dead assignment: ignoring the errors in case of sc_pkcs15_encode_pubkey() failed
libopensc/pkcs15-cac.c:
	Dead assignments: ignoring return values
libopensc/pkcs15-coolkey.c:
	Dead assignments: ignoring return values
libopensc/card-sc-hsm.c:
	Dereference of undefined pointer value: Properly check the file allocation
pkcs11/slot.c:
	Dead assignment
pkcs15init/pkcs15-cflex.c:
	Dereference of null pointer
	Uninitialized argument values
2017-07-18 22:40:20 +02:00
Frank Morgner
93fa520bc9 Cope with incomplete ASN.1 data in sc_asn1_read_tag 2017-07-18 22:35:23 +02:00
Peter Popovec
deab9cce73 MyEID support for RAW RSA signature for 2048 bit keys
MyEID does not support RAW RSA signature for 2048 bit key.
(Source:  MyEID reference manual 2.1.4)
This hack uses decipher operation for calculating
RAW 2048 bit signature.
2017-07-18 22:34:41 +02:00
Jakub Jelen
e069654f3b [coolkey] Copy labels from certificate objects to the keys 2017-07-18 22:33:17 +02:00
Frank Morgner
9fe9b9266b use a better issue template
removes CONTRIBUTING.md
2017-07-18 22:32:10 +02:00
Frank Morgner
3a59ca3718 added pull request template
moves github specific files into .github
2017-07-18 22:32:10 +02:00
Frank Morgner
43951252f5 adapted date in NEWS 2017-07-18 16:29:50 +02:00
asc
78f15062f8 Fix memory leak #1050 2017-07-18 16:27:56 +02:00
Frank Morgner
df5fbc40bc 0.17.0: updated NEWS file 2017-07-17 15:28:02 +02:00
Frank Morgner
cf9b8dd6ea sc-hsm: removed UTSRCACC100001 2017-07-14 07:23:17 +02:00
Jakub Jelen
12fe5b5e67 [pkcs11-tool] Do not use modLenBytes before validating 2017-07-11 12:55:38 +02:00
Frank Morgner
206b2cec28 Added npa-tool.1 to distribution
fixes https://github.com/OpenSC/OpenSC/issues/1093
2017-07-11 10:22:14 +02:00
Frank Morgner
805c6b5a30 PIV: workaround for reading public key
closes https://github.com/OpenSC/OpenSC/pull/1069
2017-07-11 10:08:50 +02:00
Jakub Jelen
9d813c075b Simplify differences between CardOS 5 versions and unbreak 5.3 signatures (#1080)
* Simplify CardOS 5.0 support (removing explicit 5.3 marker since the behavior should be the same)

* Restore RSA_PKCS signatures functionality

Closes https://github.com/OpenSC/OpenSC/pull/1079
2017-07-06 22:51:45 +02:00
Peter Popovec
a197ba1a99 MyEID - T0 protocol fail for derive operation
apdu.le  must be set minimally to shared key length (pubkey_len / 2),
otherwise sc_get_response() does not read derived shared key from card.
2017-07-06 22:45:49 +02:00
Frank Morgner
4ea2828246 card-piv: Fix Thunderbird and SC_PIN_CMD_GET_INFO
Fixes https://github.com/OpenSC/OpenSC/issues/1071
Closes https://github.com/OpenSC/OpenSC/pull/1072
2017-07-04 10:16:41 +02:00
Jakub Jelen
7e28c1b4e0 [cac] Correctly select APDU CASE to unbreak get_challenge 2017-06-30 22:20:00 +02:00
asc
abb45fb9d3 Fix change PIN failure (#1076) 2017-06-24 15:26:04 +02:00
asc
0e8aca8557 Fix maximum CHR length 2017-06-24 15:26:04 +02:00
Frank Morgner
1258aa87a7 fixed library name of smm-local 2017-06-22 10:36:08 +02:00
Frank Morgner
828de113e8 pkcs11-tool: respect CKA_ALWAYS_AUTHENTICATE
Quoting from PKCS#11:

The CKA_ALWAYS_AUTHENTICATE attribute can be used to force re-authentication (i.e. force the user to provide a PIN) for each use of a private key. “Use” in this case means a cryptographic operation such as sign or decrypt. This attribute may only be set to CK_TRUE when CKA_PRIVATE is also CK_TRUE.

Re-authentication occurs by calling C_Login with userType set to CKU_CONTEXT_SPECIFIC immediately after a cryptographic operation using the key has been initiated (e.g. after C_SignInit).

Closes https://github.com/OpenSC/OpenSC/pull/1066
2017-06-15 23:43:37 +02:00
Frank Morgner
91ed248e6f updated required PCSC-Lite version
Fixes https://github.com/OpenSC/OpenSC/issues/1065
2017-06-15 23:38:57 +02:00
Frank Morgner
3a299eb2bf 0.17.0 version bump 2017-06-13 13:23:53 +02:00
Frank Morgner
4c654606ea fixed Coverity issues
Fixes https://github.com/OpenSC/OpenSC/issues/1057
2017-06-13 13:07:52 +02:00