Commit Graph

7097 Commits

Author SHA1 Message Date
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
Frank Morgner b3e3ab61c0 avoid integer underflow 2018-06-29 17:14:55 +02:00
Frank Morgner 971dac2f78 unignore result 2018-06-29 17:14:55 +02:00
Frank Morgner 6184c1fbab avoid out of bounds read 2018-06-29 17:14:55 +02:00
Frank Morgner 03c5280626 avoid NULL dereference 2018-06-29 17:14:55 +02:00
Frank Morgner ed0d829eab removed unused check 2018-06-29 17:14:55 +02:00
Frank Morgner 259b7ec41c check return value 2018-06-29 17:14:55 +02:00
Frank Morgner c026f37677 warn about error in sc_enumerate_apps 2018-06-29 17:14:55 +02:00
Frank Morgner 6819759946 fixed memory leak 2018-06-29 17:14:55 +02:00
Frank Morgner 5f39d7ab74 use correct length of binary ATR 2018-06-29 17:14:55 +02:00
Frank Morgner 0e9565754c avoid uninitialized output after sc_file_dup 2018-06-29 17:14:55 +02:00
Alon Bar-Lev 31cbf83738 build: support >=libressl-2.7 2018-06-28 08:58:07 +02:00
Peter Marschall 0603c3b7fc iso7816: fix typo in previous commit 2018-06-24 10:34:49 +03:00
Peter Marschall 2818e0f703 iso7816: update & extend error codes
While at it, do some space policing.
2018-06-24 10:34:49 +03:00
Frank Morgner 1ca1a024df card-npa: fixed memory leak
fixes https://github.com/OpenSC/OpenSC/issues/1396
2018-06-22 09:23:00 +02:00
Frank Morgner d831076974 opensc-notify: use generic icon
fixes https://github.com/OpenSC/OpenSC/issues/1402
2018-06-22 08:52:49 +02:00