Jakub Jelen
fa719b301f
tcos: Prevent buffer underflow
...
Thanks oss-fuzz
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=22995
2020-06-09 13:02:27 +02:00
Jakub Jelen
d141b35596
tcos: Rewrite assert to explicit check
2020-06-09 13:02:27 +02:00
Jakub Jelen
1819ca33d6
tcos_decipher: Reformat to improve readability
2020-06-09 13:02:27 +02:00
Jakub Jelen
53395f4075
tcos: Replace assert with explicit check
...
Thanks oss-fuzz
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=22999
2020-06-09 13:02:27 +02:00
Jakub Jelen
8940ed5d85
tcos: Avoid memory leak on invalid inputs
...
(make sure the pointer is initialized)
Thanks oss-fuzz
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=22765#c2
2020-06-09 13:02:27 +02:00
Jakub Jelen
b418601942
pkcs11-spy: Dump slot id for C_WaitForSlotEvent
2020-06-09 13:02:27 +02:00
Frank Morgner
36247d85b0
pkcs11: fixed notifying twice in case of an attached reader
...
before 14e396273
sc_wait_for_event() only notified in case of a new
reader, but didn't add it to the internal list of readers. That's why
PKCS#11 needed to bail out early in this case (and the application had
to call C_WaitForSlotEvent a second time to actually get the related
slot). Since sc_wait_for_event() can now handle insertion correctly, we
can now immediately check (and reset) the events on the slots.
2020-06-09 12:07:04 +02:00
Frank Morgner
1c7b311289
pcsc: immediately exit on hotplug events
...
fixes delayed notification for removed readers
closes https://github.com/OpenSC/OpenSC/issues/2021
2020-06-09 12:07:04 +02:00
Frank Morgner
8f6e5dc2b0
Unbreak wait for events
...
By Jabuk Jelen
Fixes https://github.com/OpenSC/OpenSC/issues/2021
2020-06-09 12:07:04 +02:00
Frank Morgner
1bb2547abc
respect PKCS#11 allowed return values
2020-06-08 14:18:23 +02:00
Luka Logar
fc296b5488
IsoApplet: Add some more Travis tests
2020-06-08 14:18:23 +02:00
Frank Morgner
6a6b3e4b62
prevent memory leak
2020-06-08 14:18:23 +02:00
Frank Morgner
58b03b68dd
check for unbound cards
...
closes https://github.com/OpenSC/OpenSC/pull/2045
2020-06-08 14:18:23 +02:00
Luka Logar
a10b661f99
IsoApplet: Fix uninitialized public key oid during key generation
2020-06-05 14:48:50 +02:00
Peter Marschall
ca5f5c8844
explorer: set stdout to O_BINARY in Windows where needed
2020-06-05 14:48:08 +02:00
Peter Marschall
5714dbfa08
opensc-explorer: add function 'get_record'
2020-06-05 14:48:08 +02:00
Peter Marschall
f55c4e5c93
opensc-explorer: extend path_to_filename()
...
Expect a record number as 3rd parameter:
if this record number is greater than 0, indicating a single record,
then append the record number to the file name being constructed.
2020-06-05 14:48:08 +02:00
Frank Morgner
180c57fd15
fixed compiler warning
2020-06-05 09:43:38 +02:00
Frank Morgner
0f0e0b2e30
prevent out of bounds read
...
fixes https://oss-fuzz.com/testcase-detail/5769298181357568
2020-06-05 08:31:19 +02:00
Frank Morgner
9d294de90d
prevent out of bounds write
...
fixes https://oss-fuzz.com/testcase-detail/5226571123392512
2020-06-04 10:04:10 +02:00
Frank Morgner
55fd3db2b5
prevent integer underflow and subsequent heap overflow
...
fixes https://oss-fuzz.com/testcase-detail/5666689944649728
2020-06-04 09:47:22 +02:00
Frank Morgner
4bc03cb55d
fixed memory leak
...
fixes https://oss-fuzz.com/testcase-detail/5113223765557248
2020-06-04 00:13:57 +02:00
Frank Morgner
1125e37738
macOS: include static OpenSSL
...
fixes https://github.com/OpenSC/OpenSC/issues/1986
2020-06-03 21:52:03 +02:00
Feitian Technologies
f334f3eabe
Bug fixed ( #1859 )
...
* Bug fixed
1. It solves the problem that can be signed without input PIN, and new code will check the state that the PIN value
2. The algorithm fails to verify sha256, cause signature failure
3. The format of distinguishing ECC and RSA key pair is added - after the key pair is generated successfully, ECC and RSA need to be distinguished when reading the public key. The return format of ECC is different from the RSA
4. Fix ECC information display bug - The problem is using pkcs15-tool -D to print ECC key pair information no display correctly
5. Modify the module attribute of generating ECC key pair, and add 0x04 flag according to pkcs11 standard
2020-06-03 14:54:39 +02:00
Frank Morgner
e98f6733d9
workaround for unfinished installer
...
OpenSCToken currently doesn't install correctly, which is why the
installer script can't register the token plugin. Temporarily disable
this until we can properly install each sub package.
2020-06-02 13:49:40 +02:00
Frank Morgner
141a83029f
ignore errors when running pkgutil --forget
2020-06-02 13:49:23 +02:00
Frank Morgner
d756be1f48
macOS: renew code signing certificate
2020-05-30 16:03:30 +02:00
Frank Morgner
2a1a952fe7
fixed non-origin builds
...
in clones or local builds, CODE_SIGN_IDENTITY should only be set if
signing with it is possible. If it is not, no signing is performed by
default.
2020-05-30 16:03:30 +02:00
Frank Morgner
ceb3448e06
Revert "travis-ci: Do not pass sign arguments if we do not have the secret params in PRs"
...
This reverts commit 57f538810e
.
2020-05-30 16:03:30 +02:00
Jakub Jelen
16456922e2
pkcs11: Return CKR_TOKEN_NOT_RECOGNIZED for not recognized cards
...
Fixes #2030
2020-05-30 16:00:04 +02:00
Jakub Jelen
e8a2644435
Remove duplicate condition
...
Thanks coverity
2020-05-29 09:57:39 +02:00
Jakub Jelen
38474739b3
card-cardos: Fix NULL dereference
...
Thanks coverity
2020-05-29 09:57:39 +02:00
Jakub Jelen
b02da8348b
configure: Do not check for strlcpy and strlcat in Linux.
...
The check is broken with clang and standard glibc does not have these anyway
And unbreak fuzzer build failure
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=22192
2020-05-26 10:03:23 +02:00
Jakub Jelen
741091b3c6
travis-ci: Add clang linux target
2020-05-26 10:03:23 +02:00
Frank Morgner
0a17188710
fixed out of bounds read
...
fixes https://oss-fuzz.com/testcase-detail/5769032858075136
2020-05-24 23:47:29 +02:00
Piotr Majkrzak
d4a9405bf4
Initial support for Polish eID card (e-dowód, eDO) ( #2023 )
2020-05-19 14:05:13 +02:00
Frank Morgner
ed55fcd299
fixed invalid read
...
fixes https://oss-fuzz.com/testcase-detail/5765246676631552
2020-05-18 17:25:32 +02:00
Frank Morgner
96a7eca99a
fixed memory leak
...
fixes https://oss-fuzz.com/testcase-detail/5633315576217600
2020-05-18 17:13:48 +02:00
Frank Morgner
4cb9788b99
fixed invalid read
...
fixes https://oss-fuzz.com/testcase-detail/5726023753924608
2020-05-18 16:45:24 +02:00
Frank Morgner
7e1679b2db
fixed memory leak
...
fixes https://oss-fuzz.com/testcase-detail/5675417580339200
2020-05-18 16:38:43 +02:00
Torin Carey
93bed892a8
tests: Fix card present check
...
Check SC_READER_CARD_PRESENT flag rather than == 1.
Having no card present on the first loop and then inserting a card will
return rc = CARD_PRESENT | CARD_CHANGED (= 3). SEGFAULT ensures when we mistake
the unset opt_reader as having a present card.
2020-05-18 16:30:15 +02:00
Jakub Jelen
57f538810e
travis-ci: Do not pass sign arguments if we do not have the secret params in PRs
2020-05-18 16:28:59 +02:00
Jakub Jelen
8175df0e47
Make sure pcscd is started when using emulation
...
Running from systemd has --auto-exit, which does not guaranee us that
the process is running when we start emulators
2020-05-18 16:28:59 +02:00
Jakub Jelen
e1830ea6d2
Install OpenJDK 8 to build jcardsim (it does not work with Java 11)
2020-05-18 16:28:59 +02:00
Jakub Jelen
47a36efa7c
travis: Update to something with sensible openssl version to make yubico-piv-tool build
2020-05-18 16:28:59 +02:00
Jakub Jelen
66bcce8a8d
travis-ci: Use newer JavaCard SDK to unbreak PivApplet build to enable ECDSA support
2020-05-18 16:28:59 +02:00
Jakub Jelen
687f52233e
travis-ci: Fail if any applet or tool needed for tests fails to build
...
(in our case, it was yubico-piv-tool and PivApplet for some time)
2020-05-18 16:28:59 +02:00
Jakub Jelen
3b3aecbf8c
travis: Kill particular pid instead of killall to avoid killing unrelated processes
2020-05-18 16:28:59 +02:00
Jakub Jelen
27a819baa7
framework-pkcs15: Do not leak memory (CID 139147)
2020-05-13 21:54:16 +02:00
Jakub Jelen
19791f63d5
piv: Avoid cast ignoring errors (CID 357984)
...
Thanks coverity
2020-05-13 21:54:16 +02:00