Commit Graph

5035 Commits

Author SHA1 Message Date
Viktor Tarasov a305f4a99b build: increase minor version number
let's start to prepare next release
2012-06-10 14:32:46 +02:00
Peter Marschall a09f304817 OpenPGP: clean up & fix pgp_delete_file()
* use LOG_FUNC_CALLED() .. LOG_FUNC_RETURN for "symmetric" logging
* don't zero-fill the DO's contents but empty it
* get rid of unnecessary variables
* select parent DF after deletion (required by to ISO 7816-9)
* don't try to delete MF
2012-06-09 13:48:09 +02:00
Peter Marschall 2aa4cf57ed OpenPGP: simplify pgp_update_binary() even more
Fail on idx > 0 in order to avoid the requirement to read from the DO.
The DO may be read-protected, and this might either fail or produce
wrong results.
2012-06-09 13:48:09 +02:00
Peter Marschall d7f58f7ea7 OpenPGP: cleanup & fix pgp_update_binary()
* use LOG_FUNC_CALLED() .. LOG_FUNC_RETURN for "symmetric" logging
* update comment
* check that blob->data is defined
* fix writing new data to the correct offset
* use calloc() instead of malloc() & memset()
* align pgp_ops function pointer list
2012-06-09 13:48:09 +02:00
Peter Marschall c8e802eab6 OpenPGP: simplify & clean up pgp_put_data()
* make sure variables of type u8 do only get passed fitting data
* use LOG_FUNC_CALLED() .. LOG_FUNC_RETURN for "symmetric" logging
* leave most of the spcial casing in ADPU handling to sc_adpu_transmit()
* use SC_ADPU_CASE_1 for empty buffer (avoids special casing Lc=0)
* clean up log strings & comments
2012-06-09 13:48:09 +02:00
Peter Marschall 0010fcbe6b OpenPGP: make pgp_set_blob() a bit more resilient
* use calloc() instead of malloc() to have defined contents
* only copy from passed data when it is not NULL
2012-06-09 13:48:09 +02:00
Nguyễn Hồng Quân 73387d4b84 OpenPGP: Correct ACL key_ref
Correct ACL key_ref after redefining conventional OpenPGP key-ref (0x81-0x83 -> 1-3).
2012-06-09 08:04:19 +02:00
Peter Marschall 825c8578a9 tools: fix typo/thinko in util_print_usage_and_die()
Fix a typo/thinko in util_print_usage_and_die() that led to the short option
names not to be shown at all.
2012-06-08 20:32:33 +02:00
Peter Marschall a56bebd952 opensc-explorer: clean-up help text
"asn1 file" -> "ASN.1 file"
2012-06-08 20:32:33 +02:00
Peter Marschall 56affa612f pkcs15-tool: help text clean-up
"to be binded to " -> "to bind to"
2012-06-08 20:32:33 +02:00
Viktor Tarasov 67136befe8 pkcs15-tool: print content of DATA object ...
list the 'Authentication' objects instead of 'PIN' objects.
2012-06-08 20:17:36 +02:00
Viktor Tarasov 73f324010e config: ignore non 'auto-configurated' values
When getting string configuration parameter,
ignore non 'auto-configurated' in configuration file value
(ex. @SOME_VALUE_IN_OPENSC_CONF@) and return it's default value.
2012-06-08 20:17:36 +02:00
Viktor Tarasov 7c05e8ce21 win32: build debug version, updates to MSI
Build with debug options,
include profiles and SM module into MSI.
2012-06-08 20:17:36 +02:00
Viktor Tarasov da894500c9 minidriver: build dependence on opensc_a.lib and pkcs15init.lib
spelling of comments and debug messages
2012-06-08 20:17:36 +02:00
Viktor Tarasov 667949019a coverity scan: warning use non-initialized data 2012-06-08 20:17:36 +02:00
Viktor Tarasov 0410a0c9e8 build: 'auto-config' parameters
In configuration file replace the 'auto-config' parameters with the windows specific values.
2012-06-08 20:17:36 +02:00
Viktor Tarasov 78fe16654e pkcs15init: iasecc: create objects for minidriver support
- Create/delete the PKCS#15 'DATA' objects destinated to supply support of minidriver. For a while only 'Gemalto' style of such support is implemented.
- Declare epass2003 pkcs15init operations.
- include into OpenSC configuration the SM related sections
2012-06-08 20:17:36 +02:00
Viktor Tarasov 92e0c94c3b bootstrap: script argument to define the PACKAGE_SUFFIX 2012-06-08 20:17:36 +02:00
Viktor Tarasov 2249cfde72 sm: loadable 'local' secure-messaging module
With loadable secure-messaging module the SM wrapping of APDUs is performed
by entity external to the running application.
So that the SM keysets

TODO: amend detailed description
2012-06-08 20:17:36 +02:00
Viktor Tarasov 00b069a08e epass2003: support for ePass2003 card in read/write modes 2012-06-08 20:17:36 +02:00
Viktor Tarasov ea5a19e27e iasecc: SM add related procedures 2012-06-08 20:17:35 +02:00
Viktor Tarasov cfd5aaba7d SM: initial implementation of secure messaging framework 2012-06-08 20:17:35 +02:00
Viktor Tarasov 2078654d2b OpenPGP: to be compiled on windows 2012-06-08 20:17:35 +02:00
Peter Marschall 9e04ae46bb OpenPGP: implement pgp_find_blob()
Replace the "one-trick-pony" pgp_do_iswritable() with a more generic
function returning the blob matching the passed tag.

This way we can get rid of the one-line function pgp_blob_iswritable() too.
comparisons like these can be done in the caller.
2012-06-08 20:17:35 +02:00
Peter Marschall f5dc252aa9 OpenPGP: set pin references to 0x01 - 0x03
Set pin references to 0x01 - 0x03 instead of 0x81 - 0x83.
The PINs are referenced as PIN1- PIN3 (resp. PW1 - PW3) in the OpenPGP
card specification.
Technically the APDUs to verify/change the PINs contain the values OR-ed
with 0x80, but this is just a technical detail of the implementation
which the emulated file system can hide in pgp_pin_cmd().

Pros & Cons:
+ consistent PIN naming
+ no trouble entering the correct PIN names in opensc-explorer et.al.
  ("verify CHV1" is way better than "verify CHV129")
- manually entering the correct APDU for VERIFY is a bit more complex.
  (who does this anyway, when there are better functions)

While at it, change if .. elsif ... cascade to switch statement.
2012-06-08 20:17:35 +02:00
hongquan 89c1dd37e4 OpenPGP PKCS#15: Add declaration of certificate object. Allow to read
certificate via PKCS#11 (not writing yet).
2012-06-08 20:17:35 +02:00
hongquan f515ed5be3 OpenPGP: Change the criteria to use ext APDU for put data.
Saner whitespace in logs
Correct spelling
2012-06-08 20:17:35 +02:00
hongquan df39590aa4 OpenPGP: Correct adding read access to ACL. 2012-06-08 20:17:35 +02:00
hongquan e269907e1d OpenPGP: support key generation in driver. 2012-06-08 20:17:35 +02:00
Nguyễn Hồng Quân 9dd5a64d43 OpenPGP: Support another variant of PUT DATA to write to Extended Header list. 2012-06-08 20:17:35 +02:00
Nguyễn Hồng Quân fefe8bf2e6 OpenPGP: Check data size in pgp_put_data. 2012-06-08 20:17:35 +02:00
Nguyễn Hồng Quân f188a5dda3 OpenPGP: Implement pgp_update_binary() to update file content. 2012-06-08 20:17:35 +02:00
Nguyễn Hồng Quân 935a7505d7 OpenPGP: Add Access Control List for emulated files. 2012-06-08 20:17:35 +02:00
Nguyễn Hồng Quân c891544990 OpenPGP: Use command chaining to send large data if extended APDU is not supported. 2012-06-08 20:17:35 +02:00
Peter Marschall 387da4c793 opensc-explorer: document 'echo' command 2012-06-08 20:17:35 +02:00
Nguyễn Hồng Quân f3955e2475 opensc-explorer: implement put_data
opensc-explorer: use larger buffer for put_data
2012-06-08 20:17:35 +02:00
Nguyễn Hồng Quân 5673d13c15 OpenPGP: implement pgp_delete_file() 2012-06-08 20:17:35 +02:00
Nguyễn Hồng Quân 72088b6eeb OpenPGP: implement pgp_strip_path()
Strip away the non-existant DF 5015 from paths passed the driver.
2012-06-08 20:17:35 +02:00
Nguyễn Hồng Quân f7785ad1ec OpenPGP: correct use of pin_reference 2012-06-08 20:17:34 +02:00
Nguyễn Hồng Quân 3ac834e277 OpenPGP: implement pgp_put_data() 2012-06-08 20:17:34 +02:00
Nguyễn Hồng Quân a1ed22b6fd OpenPGP: implement pgp_do_iswritable() 2012-06-08 20:17:34 +02:00
Nguyễn Hồng Quân d8d6902699 OpenPGP: implement pgp_seek_blob() 2012-06-08 20:17:34 +02:00
Nguyễn Hồng Quân 7e24102f2b OpenPGP: Make DO 7F21 treated as simple DO
Make DO 7F21 treated as simple DO, to make certificate contained in it visible.
2012-06-08 20:17:34 +02:00
Ludovic Rousseau 02a2b3d887 Display the flags argument of C_Initialize()
The the pInitArgs argument of C_Initialize() is not NULL it is a pointer
to a CK_C_INITIALIZE_ARGS structure.
This structure contains a flags bitfield with possible values:
- CKF_LIBRARY_CANT_CREATE_OS_THREADS
- CKF_OS_LOCKING_OK

This flags parameter is now parsed and displayed.
2012-06-04 15:42:57 +02:00
Viktor Tarasov 2cff47d9b3 pkcs11-tool: support for secret-key objects
support of 'secret-key' objects
key conversion procedures are now in libopensc library
change name for OPENSC NON-REPUDIATION CKA attribute
2012-06-02 18:25:23 +02:00
Viktor Tarasov 53330f9f89 tools: avoid possible matching of zero length ATR 2012-06-01 16:58:47 +02:00
Viktor Tarasov c7258a6b52 pkcs15-tool: list secret keys objects ...
and print its attributes.
Print attributes of 'authentication-key' object.
2012-06-01 16:58:47 +02:00
Viktor Tarasov 525f61af73 pkcs15-init: 'erase-application', 'update-lastUpdate', ...
New operations:
- 'erase-application' -- erase on-card application indicated by it's AID;
- 'update-lastupdate' -- parse tokenInfo, set 'lastUpdate' value to the current date and write back tokenInfo content;
- 'ignore-ca-certificates' -- when importing PKCS#12 ignore all CA certificates;
2012-06-01 16:58:47 +02:00
Viktor Tarasov fbc9bb35dc opensc-explorer: when printing file content read entire file
When reading and printing file content, do not read it by small chunks,
but read an entire file.
It allows to verify how card driver reads the data of maximal size
that is allowed for one transaction ('max_recv_size').
2012-06-01 16:58:47 +02:00
Viktor Tarasov d7022d3300 ias-ecc: add tool with IAS/ECC specific query operations 2012-06-01 16:58:39 +02:00