Commit Graph

7180 Commits

Author SHA1 Message Date
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
Peter Popovec 5dcea4440e pkcs15-tool: added support for reading NIST ssh keys
'pkcs15-tool --read-ssh-key' is now able to read NIST ECC keys from card.
Only 256, 384 and 521 field lengths are supported (same as allowed in
ssh-keygen -t ecdsa). Issue #803 is partialy fixed by this patch.
Openssh PKCS11 interface patches for ECC are now available, please check
https://bugzilla.mindrot.org/show_bug.cgi?id=2474
2018-06-21 15:26:15 +02:00
Jakub Jelen 1f352d4c6d muscle: Properly clean up the applet memory footprint 2018-06-21 12:48:57 +02:00
Jakub Jelen 5b3da5d462 cac: Missing memory cleanup 2018-06-21 12:48:57 +02:00
Jakub Jelen 2682741293 cac: Avoid segfaults from get_challenge() 2018-06-21 12:48:57 +02:00
Jakub Jelen f392d7426f Utilize autoconf variables for cmocka usage 2018-06-21 12:48:57 +02:00
Jakub Jelen f9f3bc3ae0 configure: Check for cmocka header file 2018-06-21 12:48:57 +02:00
Jakub Jelen 3998fffbdc configure: Use correct variables for testsuite 2018-06-21 12:48:57 +02:00
Jakub Jelen 0789961320 Add a badge about card status 2018-06-21 12:48:57 +02:00
Frank Morgner 9c2afad417 fixed copy/paste error 2018-06-20 00:56:01 +02:00
Frank Morgner 8b3f5b7d97 epass2003: fixed logical error 2018-06-19 23:24:36 +02:00
Frank Morgner 9150d92447 fixed out of bounds access 2018-06-19 23:22:00 +02:00
Frank Morgner d8cdf66d3d fixed memory leak 2018-06-19 23:15:29 +02:00
ytoku 63ed8d7368 gids: file selection via gids_select_file 2018-06-19 08:00:01 +02:00
ytoku 46c0bbd803 gids: use file id instead of path in gids_delete_key_file 2018-06-19 08:00:01 +02:00
ytoku ab16228e26 gids: fix gids_delete_cert 2018-06-14 14:05:45 +02:00
asc 31941bc3d9 sc-hsm: Ensure that applet returns version information (Fix #1377) 2018-06-11 22:51:45 +02:00
Peter Marschall 7c99adaaa6 PIV: limit scope of some variables 2018-06-11 22:37:42 +02:00