Commit Graph

4938 Commits

Author SHA1 Message Date
Peter Marschall 69e9861ddd OpenPGP: first go at openpgp-tool 2012-05-20 00:00:14 +02:00
Viktor Tarasov 4b745f51af openpgp: 'ushort' type not defined for WIN32
Change-Id: Ifb28730af2d39440721be9d1e38ea1c6106167a2
2012-05-16 23:14:42 +02:00
Diego Elio Pettenò e88c08d138 build: allow cross-compilation build by reordering libraries' order.
If the system libraries are set before the locally built libraries,
libtool will pick the system copy of OpenSC instead of the local one,
and that can make cross-builds fail badly.

This patch is already applied in Gentoo for proper building.
2012-05-16 17:18:38 +02:00
Diego Elio Pettenò 3c324b8b73 build: fix parallel install by creating directory in the rule
Relying on the rule that creates the directory is a bad idea to be
parallel safe.
2012-05-16 17:18:38 +02:00
Peter Marschall 07d51bea36 OpenPGP: get PKCS#15 token info from preparsed card data
Determine data for sc_pkcs15_card's tokeninfo structure
from sc_pkcs15_card's card structure.
This makes sure the two stay consistent as much as possible.
2012-05-16 17:01:09 +02:00
Peter Marschall 7b4532736e OpenPGP: set version for PKCS#15 2012-05-16 17:01:09 +02:00
Peter Marschall bc0949140d OpenPGP: format paths more nicely 2012-05-16 17:01:09 +02:00
Peter Marschall 0283a6f24e OpenPGP: only add keys with legal algorithm identifier 2012-05-16 17:01:09 +02:00
Peter Marschall 671ac54b71 OpenPGP: more data driven logic
Tie together in a struct what belongs together instead of relying
on the ordering of multiple unrelated arrays.
2012-05-16 17:01:09 +02:00
Peter Marschall 076a4ed2dc OpenPGP: slight cleanup
Use typedef'd types instead of their underlying structs,
use helper functions instead of reinventing the wheel,
and fix typos.
2012-05-16 17:01:09 +02:00
Peter Marschall 4c09e290e1 OpenPGP: make logic more data driven
Instead of doing lots of special-cases in code, create data structures
decide once which variant of the data to use, and then use it.
2012-05-16 17:01:09 +02:00
Martin Paljak 7535f30738 OpenPGP: add the v1.0 spec URL as well to source code comments.
Even though it is obsolete, it makes it more complete;)
2012-05-16 17:01:09 +02:00
Martin Paljak 5f84400ef7 OpenPGP: more support for CryptoStick/OpenPGP v2.0
Using CryptoStick v1.2 with 4096bit keys now allows to authenticate to SSH  with all three keys.
2012-05-16 17:01:09 +02:00
Martin Paljak fb772cccf8 OpenPGP: use actual references in PKCS#15 emulation code for PIN codes. Only v1.1 has 3 PIN codes. 2012-05-16 17:01:09 +02:00
Martin Paljak 63b08786a0 OpenPGP: do not hardcode key sizes to 1024 but fetch actual values from the card.
OpenPGP 2.0 (especially CryptoStick v1.2) supports key sizes up to 4096
2012-05-16 17:01:09 +02:00
Frank Morgner 750d2e9121 cherry-picked from Frank Morgner OpenSC.git and rebased
opensc-explorer: documented `find`
opensc-explorer: documented `pace`
2012-05-16 15:45:08 +02:00
viktorTarasov fb1aa8ed11 Merge pull request #32 from frankmorgner/4d9ea43ab24a2e36fc36d1be81b3414cc003786f
new commands for opensc-explorer and bugfix for iso7816 driver

-  opensc-explorer: new find command:
   tested; nice, useful feature.
- opensc-explorer: pace:
   no means to test -- accepted.
- iso driver:
  really bug, thanks.
2012-05-16 06:17:37 -07:00
Viktor Tarasov 20bf3f5484 pkcs11: use short form of log messages
Change-Id: Ice298552238da9eeb0b646fc1ddfaf4d7a8ee4bb
2012-05-13 00:27:38 +02:00
Viktor Tarasov 5d1feb3051 pkcs15: throw an error if there is no valid public key data
Thanks to Nguyen Hong Quan.
http://www.opensc-project.org/pipermail/opensc-devel/2012-May/017997.html

Change-Id: I48bc6664909ca324ef71a2a10d9fddb9096ae598
2012-05-05 14:49:21 +02:00
Frank Morgner 4d9ea43ab2 iso driver: select with p2=0x0c when le is missing 2012-05-03 12:58:45 +02:00
Frank Morgner 59b214ec23 opensc-explorer: implemented `pace` 2012-05-03 12:58:45 +02:00
Frank Morgner 7b630962c1 opensc-explorer: `find [<start fid> [<end fid>]]` 2012-05-03 12:58:34 +02:00
Viktor Tarasov 66aa2b3896 pkcs15: throw an error when trying to read from DF
Change-Id: Ifac6777436f889393e3d3981d98a78149fd6cb17
2012-04-09 11:07:15 +02:00
Viktor Tarasov cb13633634 remove trailing whitespaces
inspired by
http://www.opensc-project.org/pipermail/opensc-devel/2012-March/017883.html

Change-Id: If170e830d8d9587a31742feffb6fff54cfdf75b4
2012-04-03 00:00:56 +02:00
Viktor Tarasov e57d443e86 pkcd15init: remove trailing whitespaces
inspired by
http://www.opensc-project.org/pipermail/opensc-devel/2012-March/017883.html

Change-Id: I817f903e67965942d9cc0c30931dbaea0c5f736e
2012-04-02 23:40:05 +02:00
Alon Bar-Lev df8715849d Remove libltdl: Remove ltld references
http://www.opensc-project.org/pipermail/opensc-devel/2011-December/017490.html
cherry-picked from 'libtool' branch of Alon Barlev's github project git://github.com/alonbl/OpenSC.git
and rebased

Remove libltdl: Remove ltld references
(cherry picked from commit a350326c520c5b0cb185f90946648633f4d0e456)

Remove libltdl: Detect libdl
(cherry picked from commit 51e7de45c11823460e776492dcbd40e60583a7eb)

Remove libltdl: Use libscdl
(cherry picked from commit 09f3eadb8a1a47407c011dcd3d5ce461516f3b87)

Remove libltdl: Cleanup libscdl
(cherry picked from commit 52d5f1be01146079e3a6fad1c88ebb0f577d0a94)

Remove libltdl: Cleanup libscdl usage at Microsoft VC build

Untested, I don't have the environment, Martin, please test.
(cherry picked from commit 7fb18f8d0b0bae6d181981a0c71190440e917c2c)

Change-Id: I73c98ccb9365584b12f4b0b97b69316a190b6e45
2012-03-17 20:55:05 +01:00
Ludovic Rousseau 594427e516 Merge pull request #26 from viktorTarasov/staging
merge 'master' into 'staging'
2012-02-22 09:38:37 -08:00
Viktor Tarasov af559fbffd Merge branch 'master' into staging 2012-02-22 11:20:17 +01:00
viktorTarasov fa6c1a1aa6 Merge pull request #25 from viktorTarasov/master
pkcs15-init tool: fix for pin auth_type comparison (thanks to 'joelhockey')
2012-02-22 00:51:21 -08:00
Viktor Tarasov 2b63213e0a pkcs15-init tool: fix for pin auth_type comparison
partial merge of pull request
https://github.com/OpenSC/OpenSC/pull/8

Thanks to 'joelhockey'.
2012-02-22 09:42:30 +01:00
viktorTarasov 63eb4a4b4b Merge pull request #4 from marschap/iso7816-for-staging
iso7816 cleanups for staging
2012-02-22 00:28:07 -08:00
viktorTarasov e6c501f3de Merge pull request #13 from mjrider/master
2 small fixes for storing a private key
2012-02-22 00:20:49 -08:00
viktorTarasov bc8e320f84 Merge pull request #16 from mjrider/for-opensc-accessflags-fix
Agree,
it's better to fix the key access flags at the general pkcs15init level.
2012-02-22 00:13:57 -08:00
Ludovic Rousseau 318408ee46 Merge pull request #24 from LudovicRousseau/staging
Staging
2012-02-21 12:25:58 -08:00
Ludovic Rousseau 006a97b8c8 Use the short form sc_log() instead of sc_debug()
Replace sc_debug(ctx, SC_LOG_DEBUG_NORMAL, ...) by sc_log(ctx, ...) as
suggested by Viktor Tarasov
2012-02-21 21:22:54 +01:00
Ludovic Rousseau 1049bca092 Merge pull request #23 from LudovicRousseau/staging
Fix for Windows compilation
2012-02-21 12:16:36 -08:00
Ludovic Rousseau 27c6652a1d Remove extra spaces and tabs at end of lines 2012-02-21 21:10:20 +01:00
Ludovic Rousseau af9dada86c Fix compilation error on Windows
SC_READER_CAP_PACE has been renamed to SC_READER_CAP_PACE_GENERIC during
patch discussion.
Thanks to Viktor Tarasov for the bug report
2012-02-21 21:10:20 +01:00
Ludovic Rousseau 7a9b9f81b9 Merge remote branch 'upstream/staging' 2012-02-21 21:09:46 +01:00
Ludovic Rousseau 97e6ac6ecb Merge pull request #22 from frankmorgner/1141ae520201c91b9859b0cd6cbb59f4ebfbd577
Add possibility to execute PACE on the reader (tested with Reiner SCT RFID standard/komfort)
2012-02-21 05:39:26 -08:00
Frank Morgner 1141ae5202 Add support for PACE-enabled readers
Implements PC/SC interface to PACE-enabled readers defined in PC/SC
pt. 10 AMD 1 and BSI TR-03119.

PACE can be started using `sc_perform_pace`. This function currently
calls the new `perform_pace` from `struct sc_reader_operations`, if the
reader has the needed capabilities. `sc_perform_pace` could also be
extended with a stand-alone implementation of PACE (code could be
imported from here http://vsmartcard.sourceforge.net/npa/README.html).

Note that the reader's PACE capabilities are correctly determined by
calling GetReaderPACECapabilities.

OpenSC's new PACE capabilities can be tested using the `npa-tool` from
the Virtual Smart Card Architecture (see link above).
2012-02-21 14:10:47 +01:00
Ludovic Rousseau c20cd12809 Fix lookup_enum_spec() prototype
A change introduced in c0072d16dd made the
compilation fail:
pkcs11-display.c:738:1: error: conflicting types for 'lookup_enum_spec'
pkcs11-display.h:64:13: note: previous declaration of 'lookup_enum_spec' was here
2012-02-20 14:01:53 +01:00
Ludovic Rousseau e485e3a32f Merge pull request #21 from viktorTarasov/staging
Staging
2012-02-20 04:50:05 -08:00
Viktor Tarasov c0072d16dd pkcs11: coding style
Signed-off-by: Viktor Tarasov <viktor.tarasov@gmail.com>
2012-02-20 11:54:02 +01:00
Viktor Tarasov 8f9bbbe780 pkcs11: win32 compilation error
pkcs11-display.c(139) : error C2275: 'CK_BYTE' : illegal use of this type as an expression

Signed-off-by: Viktor Tarasov <viktor.tarasov@gmail.com>
2012-02-20 11:34:22 +01:00
Ludovic Rousseau ec70ee5c4d Merge pull request #20 from LudovicRousseau/staging
Staging
2012-02-17 01:11:49 -08:00
Ludovic Rousseau 0c9717a82e Reformat: remove extra spaces and tabs 2012-02-17 10:06:57 +01:00
Stef Walter 00e02359a3 libopensc: Add 'paranoid-memory' setting for behavior when mlock() fails
* Setting paranoid-memory to true, and mlock() fails, then
   allocations which require non-pageable memory will return NULL
2012-02-17 10:02:55 +01:00
Stef Walter 6ed52a06b8 libopensc: Don't fail to allocate memory when mlock fails
* Print out warning when mlock fails, and continue.
 * The warning required a ctx to be passed in, so that means
   changing a few function signatures.

https://www.opensc-project.org/opensc/ticket/389
2012-02-17 10:02:55 +01:00
Ludovic Rousseau a3a1bf5eb8 Merge branch 'master' of github.com:LudovicRousseau/OpenSC 2012-02-17 09:44:19 +01:00