Re: [opensc-devel] Patch adding support for westcos card.
Hello, Le 8 septembre 2009 16:00, François Leblancfrancois.lebl...@cev-sa.com a écrit : I've made a new patch integrating correction from Andreas, Aleksey and Alan (thank you for your remarks). Can you add WESTCOS in the constants and structures names that are Westcos specific? SC_CARDCTL_FREZZE - SC_CARDCTL_WESTCOS_FREZZE sc_autkey_t - sc_cardctl_westcos_autkey_t I think it is FREEZE and not FREZZE (2 'E' and 1 'Z'). Index: src/libopensc/cardctl.h === --- src/libopensc/cardctl.h (revision 3717) +++ src/libopensc/cardctl.h (working copy) @@ -175,6 +175,19 @@ SC_CARDCTL_RTECP_INIT, SC_CARDCTL_RTECP_INIT_END, SC_CARDCTL_RTECP_GENERATE_KEY, + + /* + * Westcos specific + */ + SC_CARDCTL_FREZZE = _CTL_PREFIX('W', 'T', 'C'), + SC_CARDCTL_CREATE_MF, + SC_CARDCTL_COMMIT, + SC_CARDCTL_ROLLBACK, + SC_CARDCTL_AUT_KEY, + SC_CARDCTL_CHANGE_KEY, + SC_CARDCTL_SET_DEFAULT_KEY, + SC_CARDCTL_LOAD_DATA, + }; enum { @@ -462,6 +475,22 @@ #define OP_TYPE_STORE 1 /* + * Westcos + */ + +typedef struct { + int key_reference; + int key_len; //8, 16 or 24 + u8 key_value[24]; +}sc_autkey_t; + +typedef struct { + sc_autkey_t master_key; + sc_autkey_t new_key; + u8 key_template[7]; +}sc_changekey_t; + +/* * RuToken types and constants */ It is a good idea NOT to use Windows types like BYTE (in src/libopensc/crc_AetB.c for example). Regarding src/tools/westcos-tool.c you should use english texts and names. For example the function debloque_pin() should be renamed unblock_pin(), print_openssl_erreur() should be print_openssl_error(). I have no problem with french myself but I can see how difficult it can be for other developpers of the OpenSC project. You can use gettext to have french texts. It would be much more easy for users than using a -DENGLISH or -DFRENCH define to switch. I think no one will object an i18n + l10n effort in OpenSC. Other tools could also follow the same way if someone is motivated. I have not tried to compile the source code. You should recompile it with at least -Wall -Wextra and correct any warning if any. Regards, -- Dr. Ludovic Rousseau ___ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel
Re: [opensc-devel] Patch adding support for westcos card.
I've started to write doc/tools/westcos-tool.xml and add a ref to tools.xml: xi:include href=westcos-tool.xml/ But I don't see westcos-tool in tree menu of html page. I have missed something? Thanks, François. ___ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel
[opensc-devel] Future of opensc.
Hello, It appears that opensc lacks of i18n support (perhaps can I help later integrating this). This support is interesting if and only if the use of opensc is large enougth, I think that isn't the case actually. Does someone know the number of opensc users in the world? It seems for me that priority is to increase user number, two way for This, make opensc more easy to use and increase application number using it. In order to increase the use of this soft I plan to make a basecsp using opensc so every windows applications using cryptographic (by CSP) become opensc compatible! I think about OpenOffice, Outlook, IE etc... But I can have time from my company to do this only if westcos card is integrated since they don't let me working on something that don't use company's cards it's why I try to add westcos support in opensc. What do you think about this? Do you think that opensc can become a standard in cryptographics use? Does someone have some information about the use of opensc in world? François. ___ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel
Re: [opensc-devel] Patch adding support for westcos card.
Hello, ComputeCrc / crc_AetB.* do not seem to be required as it is only used once. While at it, better rename it to static westcos_calculate_aetb_crc or something similar (no CamelCase) The whole suppress_errors thing should be removed in near future, as there should be only a single debug_log file with debug information and actual error conditions must be handled on code level and not be hidden. The fact that you can currently get garbage on the screen when there is no real error is a sad side-effect, but nor for long. To support the PC/SC handle passing, it seems to me that extending sc_context_param_t for sc_context_create() might be a better and cleaner way. Also, for niceness please put it in makefiles after the existing files, not before others. On 08.09.2009, at 17:00, François Leblanc wrote: Ok, I've made a new patch integrating correction from Andreas, Aleksey and Alan (thank you for your remarks). This patch concern only the support of westcos card. As far as concern the integration in basecsp it will come later. I hope to forget nothing... François. -- Martin Paljak http://martin.paljak.pri.ee +372.515.6495 ___ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel
Re: [opensc-devel] Future of opensc.
Hi, On 09.09.2009, at 14:18, François Leblanc wrote: It appears that opensc lacks of i18n support (perhaps can I help later integrating this). This support is interesting if and only if the use of opensc is large enougth, I think that isn't the case actually. Does someone know the number of opensc users in the world? It depends on how you define users. OpenSC, being a infrastructure library in addition to end user utilities, is somewhat like OpenSSL. The number of developer-users of OpenSSL is much lower than actual end- users who use software that makes use of OpenSSL. I guess that there are at least 10 end-users worldwide. In order to increase the use of this soft I plan to make a basecsp using opensc so every windows applications using cryptographic (by CSP) become opensc compatible! I think about OpenOffice, Outlook, IE etc... BaseCSP plugin is a great piece of news! If I can help, let me know. But I can have time from my company to do this only if westcos card is integrated since they don't let me working on something that don't use company's cards it's why I try to add westcos support in opensc. I don't think that there is anything (except minor issues) that can prevent including your patch in OpenSC trunk. What do you think about this? Do you think that opensc can become a standard in cryptographics use? To some extent it is a standard/default solution, depending on the requirements. -- Martin Paljak http://martin.paljak.pri.ee +372.515.6495 ___ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel
Re: [opensc-devel] Future of opensc.
In order to increase the use of this soft I plan to make a basecsp using opensc so every windows applications using cryptographic (by CSP) become opensc compatible! I think about OpenOffice, Outlook, IE etc... BaseCSP plugin is a great piece of news! If I can help, let me know. Yes you can help of course, and your help will be welcome. François. ___ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel