Jakub Jelen
2190bb927c
Drop support for CAC 1
...
This removes code related to the old CAC 1 specification, while
preserving the CAC 2 functionality including CAC Alt token detection
for the tokens without CCC or ACA.
The detection based on SELECT APPLET APDU is improved to require also
the READ BUFFER APDU working, which should fail on misbehaving Java cards.
2018-08-03 01:51:44 +02:00
Jakub Jelen
f097d88b3a
coolkey: Drop bogus ;
2018-08-03 01:50:05 +02:00
Jakub Jelen
8e8193f8f5
coolkey: Unbreak get_challenge with correct instruction code
2018-08-03 01:50:05 +02:00
Raul Metsma
dfe932d00d
OMNIKEY 3x21 and 6121 Smart Card Reader are not pinpad readers
...
macOS 10.13 ships with ccid driver 1.4.27 (fixed in 1.4.29) and this version identifies these readers wrongly as pinpad readers.
Signed-off-by: Raul Metsma <raul@metsma.ee>
2018-07-28 13:42:20 +02:00
Frank Morgner
4de0d06a93
use single quotes for passing define
...
makes sure that the shell doesn't evaluate parts of the define
2018-07-17 14:49:27 +02:00
Frank Morgner
a0b6643fa7
Use hard coded default SM module (path)
...
- avoids the need to set this default in opensc.conf
- fixes loading of (unknown) local library
- removes some unused defines from config.h
2018-07-17 14:49:27 +02:00
Frank Morgner
c003f3825e
Distribute a minimal opensc.conf
...
closes https://github.com/OpenSC/OpenSC/issues/1102
2018-07-17 14:49:27 +02:00
Frank Morgner
e226ad265a
Removed unused option `hide_empty_tokens`
2018-07-17 14:49:27 +02:00
Frank Morgner
47ee3a3978
added manual page opensc.conf(5)
...
splits the HTML documentation into files.html and tools.html
2018-07-17 14:49:27 +02:00
Frank Morgner
16275c2683
fixed memory leak
2018-07-17 13:31:14 +02:00
Frank Morgner
3042a39705
removed unused variable
2018-07-17 13:16:06 +02:00
Doug Engert
fbc9ff84bc
Some cards may return short RSA signatures without leading zero bytes.
...
Add leading zeros to RSA signature so it is the size of modulus.
Return modulus length.
Changes to be committed:
modified: src/libopensc/pkcs15-sec.c
2018-07-11 22:30:50 +02:00
Frank Morgner
376de5bd4c
make bash completion directory configurable
2018-07-11 21:55:05 +02:00
Jakub Jelen
1eaae6526b
pkcs15-tool: Build with current gcc
...
The argument to strncpy is not the length of the target buffer,
but the source one (excluding the null byte, which will be
copied anyway).
2018-07-11 10:48:10 +02:00
Jakub Jelen
e9314adf4b
Testsuite also depends on openssl, use correct variables for linking
2018-07-11 10:48:10 +02:00
Jakub Jelen
7c8ed4dc03
Correct name in the automake
2018-07-11 10:48:10 +02:00
Jakub Jelen
3a7a1ba31f
Do not fail if we found unknown tag or the count does not match
...
* The HID tokens present such undocumented tags
2018-07-11 10:48:10 +02:00
Jakub Jelen
bf3382d4d9
Standardize logging and include also AID
2018-07-11 10:48:10 +02:00
Jakub Jelen
3480d9fc99
Log also information about unitialized slots with correct labels
2018-07-11 10:48:10 +02:00
Jakub Jelen
1c2a7f8dd2
HID Alt tokens have the other bunch of slots in other undocumented AID
2018-07-11 10:48:10 +02:00
Peter Marschall
1eb8391b4a
OpenPGP: slightly re-factor pgp_get_card_features()
...
* length checks where needed
* more & better comments
2018-07-11 10:47:39 +02:00
Peter Marschall
7332a37abb
OpenPGP: add serial number to card name
2018-07-11 10:47:39 +02:00
Peter Marschall
6d6efa2ded
OpenPGP: fix FIXME in pgp_new_blob()
...
Form a correct path instead ofmusising an array of 2 u8's.
Perform proper error checking.
2018-07-11 10:47:39 +02:00
Peter Marschall
215fcdad15
OpenPGP: include detailed version into card name
...
... for "standard" OpenPGP cards.
This gives more detailed information to the user on the detailed specs
the card adheres to.
In addition it fixes a long-standing annoyance that every standard 2.x
card matching the v2.0 ATR was announced as CryptoStick 1.2.
This ATR is not only used in the CryptoStick 1.2, but also also in
ZeitControl cards as well as NitroKeys, ...
2018-07-11 10:47:39 +02:00
Peter Marschall
2e1b47a79a
OpenPGP: improve get_full_pgp_aid()'s parameter checking
2018-07-11 10:47:39 +02:00
Peter Marschall
2a7a6a62fa
OpenPGP: limit scope of variable
2018-07-11 10:47:39 +02:00
Peter Marschall
15125b03ab
OpenPGP: use LOG_FUNC_CALLED & LOG_FUNC_RETURN symmetrically
...
To help debugging,
- replace plain return's after LOG_FUNC_CALLED()
has been called with LOG_FUNC_RETURN()
- use LOG_FUNC_CALLED() & LOG_FUNC_RETURN() pairs more often
2018-07-11 10:47:39 +02:00
Peter Marschall
fcecd1bdd2
OpenPGP: update comments on function use: ABI or internal
2018-07-11 10:47:39 +02:00
Peter Marschall
0d6be5db26
OpenPGP: define & set LCS (lifecycle support) as extended capability
...
Use it in pgp_erase_card() to slightly simplify the code.
2018-07-11 10:47:39 +02:00
Peter Marschall
3af54b2fe0
OpenPGP: harmonize some comments
2018-07-11 10:47:39 +02:00
Peter Marschall
3a59b0a182
OpenPGP: parse "extended length info" DO 7f66 on init
2018-07-11 10:47:39 +02:00
Peter Marschall
f73005791c
OpenPGP: improve parsing of extended capabilities
2018-07-11 10:47:39 +02:00
Peter Marschall
dea5fd9551
OpenPGP: add new DOs introduced with OpenPGP card spec v3.0 & v3.3
...
For some files spec states CONSTRUCTED, but we treat them as SIMPLE,
because we only need parts of their contents.
2018-07-11 10:47:39 +02:00
Peter Marschall
9dbdf42e9e
OpenPGP: update references to specifications
2018-07-11 10:47:39 +02:00
Peter Marschall
14cd6ee39e
OpenPGP: clarify meaning of padding byte in pgp_decipher()
2018-07-11 10:47:39 +02:00
Peter Marschall
4323a3d37c
OpenPGP: add new DO D5 introduced with OpenPGP card spec v2.1
...
... and make it accessible for v2.1+ cards
2018-07-11 10:47:39 +02:00
Peter Marschall
4ec37adea8
OpenPGP: extend manufacturer list in pkcs15-openpgp.c
2018-07-11 10:46:56 +02:00
Eugene Bright
332535c544
Workaround subject and issuer fields overflow
...
Structure `x509cert_info` fields `subject` and `issuer`
are doubled in size up to 512 bytes.
We have to use dynamic memory allocation
to completely overcome the issue.
Relates to OpenSC/OpenSC#1412 .
2018-07-11 10:13:14 +02:00
Frank Morgner
2c0d1b9ab0
reset sc_card_t during card detection
...
fixes https://github.com/OpenSC/OpenSC/issues/1417
2018-07-11 10:12:42 +02:00
asc
6f8bfc399b
Fix usage indicator for PSS
2018-07-11 10:07:28 +02:00
asc
6e0689638c
Add checking for supported CKM_RSA_PKCS_PSS combinations
2018-07-11 10:07:28 +02:00
Leif Erik Wagner
e2f0e367b1
Implement RSA PSS for GoID / SmartCard-HSM
2018-07-11 10:07:28 +02:00
Peter Marschall
99fa4f4a57
pkcs15-tool: harmonize non-short output for -C, -D,
...
Make sure to have an empty line between information printed for individual
objects, but not in short mode.
This makes output of -D and -C more consistent.
2018-07-11 10:05:30 +02:00
Sean Enck
0ceef8778b
Fixes #1421 , when a tool has no OPTSWITHARGS it will produce invalid bash (completion) output syntax
2018-07-11 10:03:50 +02:00
Gianfranco Costamagna
a6b4605b86
card-piv.c: initialize variable to fix a ppc64el build failure
...
This fixes a build failure with optimized ppc64el and new gcc builds
card-piv.c: In function ‘piv_validate_general_authentication.isra.3’:
card-piv.c:2390:9: error: ‘rbuflen’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
body = sc_asn1_find_tag(card->ctx, rbuf, rbuflen, 0x7c, &bodylen);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2018-07-11 09:54:51 +02:00
Frank Morgner
88de66bb13
fixed `make distcheck`
2018-07-04 18:12:58 +02:00
Stanislav Brabec
4db9db7403
Add GenericName to the desktop file
...
Add optional GenericName to org.opensc.notify.desktop. GenericName is
recently widely used for menu rendering in desktop environments.
2018-07-04 09:50:07 +02:00
Stanislav Brabec
b0a20fa7ca
Use correct bash-completion path
...
Recent versions of bash is leaving /etc/bash_completion.d. The correct
directory is specified by pkg-config --variable completionsdir
bash-completion.
Fixes https://github.com/OpenSC/OpenSC/issues/1403
2018-07-04 09:50:07 +02:00
Jakub Jelen
155ecc11f3
Adjust the p11test readme after merge
...
Resolves : #1415
2018-07-04 09:46:43 +02:00
Frank Morgner
452e1d3b96
fixed used of uninitialized return value
2018-06-30 01:17:57 +02:00