Hi,

please find my latest patches for opensc-tool & opensc-explorer on:
  https://github.com/marschap/OpenSC/commits/tools-20110603

I am not attaching them here as they may be too big for the mailing list,
and according to other posts on the mailing list, OpenSC is slowly migrating 
to git anyway. so,. I guess this form of "virtual" pull request is OK ,-)

Here's what they do:

[PATCH 01/16] opensc-explorer: convert do_info() to using tables
* use ID<->name tables instead of arrays of strings where
  the index was treated like some "magic" constant.
  With the new mapping tables, the meaning is obvious.

* fix a bug with ac_ops_df[]: before the conversion, it was a list
  of pointers to strings but was in one case treated like it was a mapping
  table.
  With the conversion to a mapping table, and the adaption of other code parts
  this bug got fixed "automagically" ;-)

* use common code to cleanly print ACLs for DFs & EFs

* harmonize EF structure names to the ones used in ISO 7816-4


[PATCH 02/16] opensc-tool: update EF structure names
Use EF structure names that are more sensible & grammatically more correct.


[PATCH 03/16] opensc-tool: no unnecessary spaces around "DF"


[PATCH 04/16] opensc-explorer: centralize usage
* extend cmds struct by a new element args for a description of the arguments
* use args in help texts
* new function usage() for centralited dispaly of usage info
* harmonize argument strings for usage / help texts
* re-sort cmd list shown in help texts
* add function "help" to cwallow asking for for help
* space-police


[PATCH 05/16] opensc-explorer: consolidate string/hexdata parsing
* add new function parse_string_or_hexdata() that parses
  a double-quoted string or a hex-data string (e.g: AA:BB:CC)
  into a buffer
* use parse_string_or_hexdata() wherever strings or hexdata
  gets parsed into a buffer


[PATCH 06/16] opensc-explorer: fix argc checks in do_update_*()
do_update_binary() and do_update_record() expect a fixed number of parameters
each: adapt the checks for argc so that they do the right thing.


[PATCH 07/16] opensc-explorer: consolidate string parsing in 
do_update_record()
Update do_update_record() to use parse_string_or_hexdata() instead of the old
hex2binary().
This change allows to use double-quoted strings in the "update_record" 
command.


[PATCH 08/16] opensc-explorer: detect AID conversion errors in arg_to_path()
Convert arg_to_path() to using the standard sc_hex_to_binary() instead of
the local hex2binary().
While at it, return errors on failed conversions.


[PATCH 09/16] opensc-explorer: remove hex2binary()
With the last users gone, there's no need to keep hex2binary().


[PATCH 10/16] opensc-explorer: remove unnecessary var's in do_update_*()
The variables "in_str" in do_update_binary() & do_update_record()
do not serve a purpose: use argv[x] directly & remove them.


[PATCH 11/16] opensc-explorer: simplify arg parsing in do_change() & 
do_unblock()
Simplify argument handling in do_change() and do_unblock(),
making the functions shorter and deasier to understand.,


[PATCH 12/16] opensc-explorer: convert all mapping tables to id2str_t
Use type id2str_t for all mapping tables mapping IDs<->names.


[PATCH 13/16] opensc-explorer: re-factor do_apdu()
* allow double-quoted strings besides hexdata in ADPU generation
* detect errors in parameter parsing
* use utility function to print bytes sent,
  fixing an error that only showed parts of the APDU wheni
  it was generated from multiple arguments


[PATCH 14/16] opensc-explorer: replace if..else with ?:
Use the easier to read & shorter expression
  path->type = (is_id) ? SC_PATH_TYPE_FILE_ID : SC_PATH_TYPE_PATH;
instead of the longer, but equivalent if () .. else construction.


[PATCH 15/16] opensc-explorer: use util_hex_dump() in do_info()
Use standard function util_hex_dump() in do_info() instead of
enumerating lists of bytes ourselves.


[PATCH 16/16] opensc-explorer: consolidate filename generation
* add new function path_to_filename() that converts a path into
  filename, and returns a static buffer to it
* convert all occurrences where file names get generated
  to using this function


Plase consider including them into OpenSC mainline
-- 
Peter Marschall
pe...@adpm.de
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to