Commit Graph

7856 Commits

Author SHA1 Message Date
Jakub Jelen a46b24bacd Import new license file with correct address
From

https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
2020-01-09 15:35:11 +01:00
Frank Morgner fe44567d2b avoid redefinition of NDEBUG
fixes https://github.com/OpenSC/OpenSC/issues/1799
2020-01-07 11:27:57 +01:00
Peter Marschall 4d2b860c7f OpenPGP: add ATR for Yubikey 5 2020-01-07 11:09:00 +01:00
Peter Marschall 31b8c7a404 OpenPGP: first steps at supporting OpenPGP card spec 3.4 2020-01-07 11:09:00 +01:00
alex-nitrokey 3af3d0ecee openpgp: add nistp256 and secp251k1 curves for gnuk devices 2020-01-07 11:08:25 +01:00
carblue f14043aad6 opensc-explorer get: prevent sc_read_binary applied on record-based files 2020-01-07 10:35:39 +01:00
carblue c1fb5b130e opensc-tool print_file: fix addressing records 2020-01-07 10:24:10 +01:00
carblue 5dd9fcb25c Fix asn1.c:print_tags_recursive 2020-01-07 10:18:46 +01:00
carblue 4ad55997e0 sc_pkcs15_decode_skdf_entry: break all looping on oid match: on average better performance 2020-01-07 10:17:39 +01:00
Frank Morgner cfd5519b98 simplify PIV I/O 2020-01-07 10:06:23 +01:00
Frank Morgner 31169afb72 fixed fuzzing build
wrapping/unwrapping is hopefully correctly initialized
2020-01-06 22:34:16 +01:00
Priit Laes 0b4b7fbaf0 openssl: Drop all compatibility checks for <=openssl-1.0.0 2020-01-06 15:47:07 +01:00
Priit Laes 295cf100a8 Bump minimum required openssl version to 1.0.1
Everything older than 1.0.2 is not longer supported by the OpenSSL team.
2020-01-06 15:47:07 +01:00
Julian Strobl 6b84407c3d tcos: fix indentation and braces
Increase readability. No content-based changes.
2020-01-06 15:43:46 +01:00
Frank Morgner 45e29056cc Release 0.20.0 2019-12-29 13:42:06 +01:00
Frank Morgner a2b133ef4f Updated NEWS 2019-12-29 13:39:01 +01:00
Khem Raj 05e3f7b667 Fix misleading code indentation
Fixes
error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
         if(cipher)
         ^
../../../git/src/libopensc/card-entersafe.c:369:2: note: previous statement is here
        if(sbuf)
        ^
2019-12-28 18:18:06 +01:00
Julian Strobl e9aa163fe5 pkcs11-tool: fix output of test_decrypt
Before the output looked like this, if a public key was not found:
```
  testing key 1 (IDKey2)
    RSA-X-509: OK
    RSA-PKCS: OK
  testing key 2 (IDKey3)
couldn't find the corresponding pubkey for validation
couldn't find the corresponding pubkey for validation
    RSA-X-509:     RSA-PKCS:   testing key 3 (IDKey4)
couldn't find the corresponding pubkey for validation
couldn't find the corresponding pubkey for validation
```

Now:
```
  testing key 1 (IDKey2)
    RSA-X-509: OK
    RSA-PKCS: OK
  testing key 2 (IDKey3) -- can't find corresponding public key, skipping
  testing key 3 (IDKey4) -- can't find corresponding public key, skipping
```
2019-12-28 18:15:55 +01:00
Julian Strobl 81940e123b pkcs11-tool: align output for test_signature
Before it was a bit confusing, e.g.:
```
  testing key 1 (2048 bits, label=IDKey2) with 1 signature mechanism
    RSA-X-509: OK
couldn't find the corresponding pubkey
  testing key 2 (0 bits, label=IDKey3) with 1 signature mechanism -- can't be used to sign/verify, skipping: can't obtain modulus
```

The error message in line 3 is for IDKey3 and not for IDKey2.

With this patch the output is aligned with `test_verify`:
```
  testing key 1 (IDKey2) with 1 mechanism
    RSA-X-509: OK
  testing key 2 (IDKey3) with 1 mechanism -- can't find corresponding public key, skipping
```
2019-12-28 18:15:55 +01:00
Julian Strobl 9eed40ea31 tcos: add encryption certificate for IDKey
Fixes https://github.com/frankmorgner/OpenSCToken/issues/21
2019-12-28 18:15:55 +01:00
Frank Morgner 1cc6087126 fix buffer length for printing DFs 2019-12-19 04:44:59 +01:00
Benjamin DELPY b59456b6e4 Update card-gids.c to support 3072 & 4096 RSA key sizes 2019-12-19 04:33:14 +01:00
Julian Strobl 187d908feb tcos: allow correct input length when signing
For 2048 bit keys the padded input is 256 bytes long.

Fixes https://github.com/frankmorgner/OpenSCToken/issues/20
2019-12-19 04:30:27 +01:00
Julian Strobl 55b7a6fefd Revert "tcos: Do not advertize non-functional RSA RAW algorithms"
This reverts commit bee5c6d639.

See https://github.com/frankmorgner/OpenSCToken/issues/20#issuecomment-566455157
2019-12-19 04:30:27 +01:00
Frank Morgner 333c41c5d5 pgp: don't write beyond oid object
fixes Stack-buffer-overflow
https://oss-fuzz.com/testcase-detail/6329203163398144
2019-12-18 14:55:46 +01:00
Jakub Jelen af42a93874 tests: Add missing script to the release tarball 2019-12-17 16:09:35 +01:00
Jakub Jelen ee78b0b805 pkcs15-coolkey: Fix EC key type and fail on invalid key types
Thanks oss-fuzz

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19251
2019-12-11 09:19:45 +01:00
Jakub Jelen 708cedbdad dir: Correctly free allocated memory on error
Thanks oss-fuzz

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19265
2019-12-11 09:19:45 +01:00
dojo 17d9d8450c Enabled extended APDU support for StarCOS 3x cards 2019-12-05 16:48:11 +01:00
dojo a450b3427e Fix path unifying of StarCOS 3.5 cards 2019-12-05 16:48:11 +01:00
dojo 9f2c112ecb Add new ATR for StarCOS 3.5 2019-12-05 16:48:11 +01:00
dojo c99d62c04a Add PIN encoding detection for StarCOS 3x cards 2019-12-05 16:48:11 +01:00
Doug Engert 5fa633075d GIDS Decipher fix for TPM
GIDS decipher APDU fails with status '65 00' or '67 00' if
"Padding Indication" byte is present. Debug logs of Microsoft
certutil -v -scinfo  using Microsoft drivers show that for a
decipher, the "Padding Indication" is not present. It maybe
needed if Secure Messaging is added later.

Extended APDU is turned off as this may not be supported on
some cards. Chaining is used used instead, it works on all cards.

RAW RSA is turned off, it is supported.

Tested with pkcs11-tool on Windows 10 with a TPM 2.0 module.

 On branch gids-decipher
 Changes to be committed:
	modified:   src/libopensc/card-gids.c

 Date:      Tue Dec 3 18:08:32 2019 -0600
 interactive rebase in progress; onto 01678e87
 Last commands done (3 commands done):
    squash c968d0dd GIDS No Padding Indication Byte
    squash 0fa940fc Take 3
 No commands remaining.
 You are currently rebasing branch 'gids-decipher' on '01678e87'.
2019-12-05 16:33:27 +01:00
Raul Metsma e91853bda8 Simplify code and card detection
Signed-off-by: Raul Metsma <raul@metsma.ee>
2019-12-05 10:51:55 +01:00
AdriaoNeves 366adbd546 Fixing invalid signature with 3072 RSA bits in GemsafeV1 2019-12-05 10:46:21 +01:00
AdriaoNeves dbe932152d Fixing invalid signature with 3072 RSA bits in GemsafeV1 2019-12-05 10:46:21 +01:00
Jakub Jelen 642a3ee734 cardos: Use more appropriate RSA flags for CardOS 5
Fixes #1864
2019-12-05 10:45:34 +01:00
Jakub Jelen afe255c5b2 Remove never set constants and their handling in cardos driver 2019-12-05 10:45:34 +01:00
Jakub Jelen 2bab09ac03 tcos: Use unique IDs for certificates 2019-12-05 10:43:17 +01:00
Jakub Jelen 88e3c44f22 tcos: Drop undocumented tags from security environment data 2019-12-05 10:43:17 +01:00
Jakub Jelen bee5c6d639 tcos: Do not advertize non-functional RSA RAW algorithms 2019-12-05 10:43:17 +01:00
Jakub Jelen 424eca8bef tcos: Remove duplicate lines 2019-12-05 10:43:17 +01:00
Jakub Jelen 4c67bbf383 coolkey: Avoid addressing behind allocated buffers
Thanks oss-fuzz

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19222
2019-12-04 21:47:47 +01:00
Jakub Jelen c246f6f69a coolkey: Make sure the object ID is unique when filling list
Thanks to oss-fuzz

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19208
2019-12-04 21:47:47 +01:00
Andreas Schwier 32b49894c5 sc-hsm: Add ATR for faster token variant 2019-12-04 21:43:47 +01:00
Andreas Schwier 7858f3cd06 sc-hsm: Add support for SmartCard-HSM MicroSD card 2019-12-04 21:43:47 +01:00
Frank Morgner 78548a9394 mac: don't forget to uninstall OpenSCTokenApp
fixes https://github.com/OpenSC/OpenSC/issues/1862
2019-12-04 14:55:23 +01:00
Frank Morgner 39c1400fac opensc-notify: fixed name in plist 2019-12-04 14:55:23 +01:00
Jakub Jelen 8ab39bdec7 pkcs11-session: Explicitly reset login_user and release lock 2019-12-04 12:00:07 +01:00
Frank Morgner e9957b9a92 include build-package-from-ci in autoconfig/automake 2019-12-02 16:54:32 +01:00