Commit Graph

5375 Commits

Author SHA1 Message Date
Frank Morgner 6707f92b38 fixed PACE reader capability flag 2013-08-02 11:41:29 +02:00
Jean-Pierre Szikora b1a2c26235 Onepin profile stopped to work after commit 10e1ad001d
Cards formatted with one-pin profile can not be used (for modification
of the data on the card with pkcs15-init -X for example) after this
commit, which prevent the reading of 5015/4946 (containing the
profile).

The part of the code was simply commented out without comment.
Maybe it was used for testing purposes, and not removed for
the commit ?
2013-07-29 11:53:18 +02:00
JP Szikora 3f8f6facf5 Merge branch 'master' of https://github.com/OpenSC/OpenSC 2013-07-29 11:37:03 +02:00
entersafe c02f30a2da Fix a bug when writing public key 2013-07-29 10:13:39 +02:00
German Blanco 140ec71d73 Formatting with spaces and returns in hex dump. 2013-07-28 23:49:41 +02:00
Frank Morgner 1a65ed1ecf use _setmode instead of _set_fmode in windows
now compiles with MinGW-w64
2013-07-10 17:05:17 +02:00
Frank Morgner 9a05414f9a let OpenSC compile without OpenSSL and without SM 2013-07-10 16:22:33 +02:00
Jean-Pierre Szikora ad91449c87 Gives the "Current Maximum Data Field Length" for CardOS card in cardos-tool -i. 2013-06-21 10:46:35 +02:00
Jean-Pierre Szikora ac96e73c8c Merge remote branch 'upstream/master' into cardos5 2013-06-21 10:35:21 +02:00
German Blanco 63ce563d76 Adding support for DNIe. 2013-06-13 17:31:56 +02:00
Andreas Schwier 962cba98db sc-hsm: Fixed bug when changing SO-PIN with opensc-explorer
sc-hsm-tool: Fixed some warnings
2013-06-11 16:55:47 +02:00
Andreas Schwier ae1b96e5b2 sc-hsm-tool: Fixed a crash on Windows when --wrap-key frees memory allocated in opensc.dll 2013-06-11 16:55:47 +02:00
Viktor Tarasov e1da77e253 md: fix length of stripped data in RSADecrypt 2013-05-27 16:25:25 +02:00
viktorTarasov 584e47a9b8 Merge pull request #158 from cbancroft/fix-piv-tool-gen_key
Fixed gen_key to expect the proper PIV Key references.
2013-05-14 00:22:22 -07:00
Martin Paljak f6b0e893b9 card-ias: fix code style to be MS C89 compliant. 2013-05-11 18:39:55 +03:00
Martin Paljak 1b265690e8 Merge pull request #156 from poupas/master
Fixes for the PTEID card
2013-05-11 08:39:26 -07:00
Charles Bancroft 62dbdfff3a Fixed gen_key to expect the proper PIV Key references.
0x9B is defined as the Card Management Key, and probably shouldn't be
regenerated.  0x9E is the Card Authentication key which is what you
should be generating keys for.  This also brings piv-tool in line with
the documentation that states 0x9A, 0x9C, 0x9D and 0x9E are the proper
keyIds to use.
2013-05-10 09:14:20 -04:00
Martin Paljak 112092f7dd Fix eidenv manual page: -n is actually -p 2013-05-08 15:22:33 +03:00
Viktor Tarasov 7cbd42a2d0 build: 'declaration-after-statement' is an error
not allowed in Windows VS, so make it also not allowed with GCC

Thanks to Martin,
https://github.com/OpenSC/OpenSC/pull/156#issuecomment-17538586
2013-05-07 15:48:07 +02:00
German Blanco 4a674b4dfc Improving logging of certificate handling. 2013-05-07 09:43:47 +02:00
João Poupino aec1cd9639 Remove redudant check 2013-05-06 21:46:15 +01:00
João Poupino 4ecbfabffe Fix for PTEID's PKCS#15 emulation breakage 2013-05-05 18:15:41 +01:00
João Poupino 9f57dd3c53 Simplify the compute signature operation and add warning 2013-05-05 18:14:39 +01:00
Dirk-Willem van Gulik b23060526c Allow for the pin to be entered on the keypad during issuing. For compliance reasons. 2013-04-28 18:56:51 +02:00
Ondrej Mikle 4c1cafed7c epass2003: key generation allows stricter privkey/pubkey ACLs 2013-04-28 18:37:29 +02:00
João Poupino 338fc3ed5f pteid: do not call the iso7816 driver get_response operation 2013-04-10 01:13:34 +01:00
Viktor Tarasov e8eb4cd7ed pkcs11-framework: do not wrap subject in a second ASN1 sequence
In a supplement to f5d53ab01783b0c37802e35f063fdbe5814bdbc7.

Subject and Issuer, returned by pkcs#15 framework, are already encoded as ASN1 sequence.
No need to wrap them in a second ASN1 sequence frame.
2013-04-07 17:09:15 +02:00
Viktor Tarasov c66278098b tools: missing names for ACL methods
thanks to fdeybach@gmail.com
https://sourceforge.net/mailarchive/message.php?msg_id=30684430
2013-04-06 22:06:52 +02:00
Martin Paljak d887083998 macosx: add new tool and SDK paths for OS X 10.8
Also:
 * Don't do a debug build
 * Don't download Tokend build pieces if already present.
 * Check the md5 of the "external binary"

See https://github.com/OpenSC/OpenSC/pull/148
2013-03-30 12:28:05 +02:00
Viktor Tarasov 98db49936a pkcs15: 'issuer' and 'subject' have to be DER encoded sequence
'issuer' and 'subject' data have been the non-encoded sequence of rDNs
2013-03-17 13:56:26 +01:00
Viktor Tarasov ea71ae7baf build: svnignore went away in previous commit 2013-03-16 20:30:13 +01:00
Martin Paljak 10718b15e0 build: remove useless svnignore file 2013-03-16 20:38:35 +02:00
Martin Paljak 11ff81367a build: check for dlopen() in a BSD-friendly way.
From http://www.flameeyes.eu/autotools-mythbuster/autoconf/finding.html
2013-03-16 00:30:11 +02:00
Martin Paljak 32ed309037 pkcs11: use calloc instead of malloc; remove obsolete malloc.h references. 2013-03-15 23:02:02 +02:00
Martin Paljak 3b4f7b9ff7 pkcs11: Don't touch readers or inserted cards in C_Initialize in 2.20 mode
This significantly speeds up calling C_Initialize.
Thanks to Nikos Mavrogiannopoulos for the tip.
2013-03-15 23:01:16 +02:00
Martin Paljak c2b6a0d500 pkcs11: report the library version based on plug-n-play feature. 2013-03-15 21:28:29 +02:00
Martin Paljak 9901682288 Normalize SC_ERROR_* API and clean up ISO7816-4 errors.
* iso7816_check_sw() emits a "informational message" (from ISO7816-4 table 6)
 * SW-s which are not known or not meaningful for internal API get translated
   to SC_ERROR_CARD_CMD_FAILED by default, so use it also in the SW table
 * Remove undefined SW-s and move generic SW-s to their sequential location.

This commit improves 8fc679bf40
2013-03-15 12:30:38 +02:00
Viktor Tarasov 6f1ae23b1e pkcs11: segfault if 'application-file' not defined
for some cards with emulated PKCS#15 'file_app' from 'application-info' is not defined
2013-03-12 10:23:35 +01:00
Viktor Tarasov 3b0ac5f8e7 pkcs15init: copy DATA object value to 'pkcs15-data-info'
When creating new DATA object, keep it's value in 'data' member of
'sc-pkcs15-data-info' data.
Used by pkcs15init emulation layer to store DATA value into a proprietary placement.
2013-03-11 18:25:22 +01:00
Viktor Tarasov c1b6575204 pkcs15init tool: throw error when invalid appliaction-id supplied
fix action labels
2013-03-11 18:25:05 +01:00
Viktor Tarasov 743ca1cedc pkcs15: new 'data' member in 'sc_pkcs15_data_info'
New member keeps the value of the PKCS#15 DATA object.

Internal pkcs15 procedure that reads DATA object is modified
to check if requested data are already vailable in 'data-info',
an only then try to read the content of dedicated on-card file.

For some emulated PKCS#15 systems value of DATA object is kept as 'direct' value
in a proprietary attribute files and so the common read procedure could not be used.

; some efforts to unify layout of code source.
2013-03-11 13:04:10 +01:00
Viktor Tarasov a24ecd0733 pkcs11-tool: ignore CRYPTOKI_ALREADY_INITIALIZED error
https://github.com/OpenSC/OpenSC/pull/118
Print warning and ignore 'Cryptoki library has already been initialized'  error
returned by C_Initialize().
2013-03-10 13:45:32 +01:00
Martin Paljak 8e95abf326 macosx: make the opensc-uninstall script better at removing all files. 2013-03-04 14:09:45 +02:00
Viktor Tarasov 8fc679bf40 libopensc: invalid usage of SC_ERROR_MEMORY_FAILURE
Initiated by discussion in https://github.com/OpenSC/OpenSC/pull/134 .

SC_ERROR_MEMORY_FAILURE has to be used as a resulting code of the card related operations,
and not as result of the memory allocation problems.

New 'warning' category of SC_ERRORs introduced -- SC_WARNING_xx .
Error text and SC_ERROR associated with return codes 6300 and 6200 has been changed.
2013-03-02 19:29:14 +01:00
Martin Paljak 717a38bcaa Merge pull request #136 from zhalas/epass2003_fix_padding
epass2003: properly disable padding when initializing OpenSSL ciphers.
2013-03-01 08:37:29 -08:00
Zbigniew Halas b1a4775310 epass2003: properly disable padding
EVP_CIPHER_CTX_set_padding needs to be called after EVP_EncryptInit_ex
and EVP_DecryptInit_ex, otherwise padding is re-enabled, which in turn
causes buffer overruns
2013-02-27 23:44:02 +00:00
Ondrej Mikle 83dc469f07 epass2003: list_files implemented 2013-02-25 19:21:52 +01:00
Viktor Tarasov 7a57fa8689 win32: build and include to MSI package 'openpgp-tool.exe' 2013-02-25 19:12:06 +01:00
Martin Paljak 53ac914ba4 Update gitignore to include files generated on OSX. 2013-02-25 12:19:17 +02:00
Martin Paljak 025d8c8caf macosx: move the binary build components from martinpaljak.net to opensc-project.org 2013-02-25 11:59:59 +02:00