Commit Graph

7355 Commits

Author SHA1 Message Date
Frank Morgner
94f9fdf145 ias/ecc: fixed card detection
regression of 439a95f2d
2018-08-24 13:51:15 +02:00
Frank Morgner
5daec17e32 ias/ecc: ignore missing serial on card initialization
fixes problem in card detection introduced in
50b000047c
2018-08-24 13:50:53 +02:00
Frank Morgner
5a25bd33cc macos: use HFS+ for backward compatibility
fixes https://github.com/OpenSC/OpenSC/issues/1398
2018-08-24 09:27:13 +02:00
Frank Morgner
5b428e4323 upload CI build artifacts to OpenSC/Nightly
builds are uploaded as seperate branches to
https://github.com/OpenSC/Nightly If the repository gets too big,
branches can easily be removed. The repository is written via Travis CI
and AppVeyor with a secure token from user https://github.com/OpenSC-CI
2018-08-24 09:23:58 +02:00
Raul Metsma
336b282324 Reuse gp_select_aid
Signed-off-by: Raul Metsma <raul@metsma.ee>
2018-08-23 20:37:38 +02:00
Doug Engert
719ec39b3e Use sc_asn1_read_tag to read first tag of partially block (#1454)
Sc_asn1_read_tag can return SC_ERROR_ASN1_END_OF_CONTENTS
which indicates the tag and length are OK, but any value
is not completely contained in the buffer supplied. card-piv.c
can use this when reading just the beginning of a object to
determine the size of a buffer needed to hold the object.
2018-08-23 20:35:24 +02:00
Frank Morgner
97f0a341b0 fixed typo 2018-08-23 10:14:25 +02:00
Frank Morgner
70c4813f30 fixed Dereference before null check 2018-08-23 09:59:45 +02:00
Frank Morgner
67fbf15741 fixed NULL dereference 2018-08-23 09:51:04 +02:00
Priit Laes
45f407c021 Mark driver-specific global sc_atr_table structures as const
As most of the drivers do not modify these, we can mark them as const.
Two drivers that we cannot convert are dnie and masktech.

section                 size
.data                  35232 ->   25472
.data.rel.ro           36928 ->   46688
2018-08-22 22:50:30 +02:00
Priit Laes
2eae5e70f5 Mark atr table argument as const in match_atr_table and _sc_match_atr functions
This allows us to mark driver-specific atr tables as constants.
2018-08-22 22:50:30 +02:00
Frank Morgner
fcd719d30f
Merge pull request #1447 from Jakuje/x41sec-merge
Security issues idefnitifed by fuzzing. For more information, see the blog post:

https://www.x41-dsec.de/lab/blog/smartcards/
2018-08-20 15:11:51 +02:00
Frank Morgner
ff8ec86f26 avoid looping forever in GET CHALLENGE
fixes https://github.com/OpenSC/OpenSC/issues/1440
2018-08-20 14:37:20 +02:00
Frank Morgner
fcf00e66cd Starcos: added ATR for 2nd gen. eGK
fixes https://github.com/OpenSC/OpenSC/issues/1451
2018-08-20 14:27:02 +02:00
Frank Morgner
59d634e9e8 fixed low privilege make distcheck
regression of b0a20fa7ca
2018-08-20 12:03:44 +02:00
Frank Morgner
48d30ac7da Don't overwrite existing opensc.conf
fixes https://github.com/OpenSC/OpenSC/issues/1449
partially reverts c003f3825e
2018-08-20 12:03:44 +02:00
Jakub Jelen
5ec26573da coolkey: Do not overflow allocated buffer 2018-08-14 16:13:22 +02:00
Jakub Jelen
79c0dbaa4e cac: Avoid OOB reads for inconsistent TLV structures 2018-08-14 16:13:22 +02:00
Frank Morgner
50b000047c ias/ecc: disable iccsn parsing
if someone wants to implement this with memory bounds checking, please
raise your hands
2018-08-14 16:13:22 +02:00
Frank Morgner
0b44793900 tcos: use ISO7816 fci parser 2018-08-14 16:13:22 +02:00
Frank Morgner
30fe0ad453 pgp: fixed integer underflow 2018-08-14 16:13:22 +02:00
Frank Morgner
92a98cb3bb mcrd: converted assert to proper error handling 2018-08-14 16:13:22 +02:00
Frank Morgner
78f0055338 fixed uninitialized use of variable 2018-08-14 16:13:22 +02:00
Frank Morgner
03628449b7 iasecc: fixed unbound recursion 2018-08-14 16:13:22 +02:00
Frank Morgner
5807368ed4 fixed bad memory access 2018-08-14 16:13:22 +02:00
Doug Engert
384626533e PIV Security Changes
Add return code if "out" is smaller then received data.

Remove extra blanks.
2018-08-14 16:13:22 +02:00
Doug Engert
3e5a9a42c3 Remove in PIV driver need for aid_file
Remove aid_file and aidfile variables in card-piv.c. These are not needed
as piv_select_aid parses the returned data from a SELECT AID command.

In response to e-mail from X41 group on 6/11/2018.

 On branch x41-piv-2
 Changes to be committed:
	modified:   card-piv.c
2018-08-14 16:13:22 +02:00
Jakub Jelen
d5d15105dd cac: Ignore end of content errors (#7)
The CAC buffers are split to separate TL and V buffers so we need to ignore this error
2018-08-14 15:50:13 +02:00
Frank Morgner
83f45cda2a Added bounds checking to sc_simpletlv_read_tag()
- Logic is identical to sc_asn1_read_tag()
- Fixes out of bounds access e.g. in cac_parse_CCC
2018-08-14 15:50:13 +02:00
Frank Morgner
ffe38fd87f sc_asn1_read_tag: fixed tracking of consumed bytes
fixes return buffers that are outside the allocated memory space
2018-08-14 15:50:13 +02:00
Frank Morgner
360e95d45a fixed out of bounds writes
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting the problems.
2018-08-14 15:50:13 +02:00
Frank Morgner
8fe377e93b fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes.
2018-08-14 15:50:13 +02:00
Frank Morgner
f66ceab4bb fixed typo
fixes https://github.com/OpenSC/OpenSC/issues/1443
2018-08-09 15:50:51 +02:00
Frank Morgner
849c9785e3 added missing rule for opensc.conf.5.xml 2018-08-09 15:46:53 +02:00
Frank Morgner
80d44a5b99 use proper prefix in documentation 2018-08-05 12:28:50 +02:00
Frank Morgner
9294058d5c fixed requesting DWORD with sc_ctx_win32_get_config_value
the length of the value is not determined by strlen()
2018-08-05 11:35:12 +02:00
Frank Morgner
cd557df54d md: change semantics of cancelling the PIN pad prompt
md_pinpad_dlg_allow_cancel now defines whether or not the user is asked
before verifying the PIN on the PIN pad. This can be denied without
interaction with the PIN pad. A checkbox in the dialog allows the user
to change this setting, which is saved in the registry by the path of
the process.

This change fixes the progress bar to match the actual configured
timout. The progressbar now fills instead of running empty, which seemed
less frightening for most users.

This change also fixes some copy/paste errors in the documentation of
opensc.conf(5).
2018-08-05 11:35:12 +02:00
Frank Morgner
da40c61d13 npa/sc-hsm: don't call EAC_cleanup()
In Minidriver, when the DLL is called in multiple threads, this can
lead to a deinitialization of OpenSSL's OIDs in one thread making them
unavailable from other threads of the same process. As result, CVCs
cannot be veriefied anymore during chip authentication.
2018-08-05 11:35:12 +02:00
Frank Morgner
0f9c7d126a win32 installer: automatically start SCardSvr 2018-08-05 11:35:12 +02:00
Frank Morgner
79fb808adf opensc-notify: localize exit menu entry 2018-08-05 11:35:12 +02:00
Frank Morgner
0f1fdb7872 opensc-notify: add Exit button to tray icon 2018-08-05 11:35:12 +02:00
Frank Morgner
4a3a3e5df2 opensc-notify: implement win32 message dispatching 2018-08-05 11:35:12 +02:00
Frank Morgner
11aaf15776 removed outdated solaris files 2018-08-05 11:33:21 +02:00
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