On Feb 23, 2010, at 14:18 , Viktor TARASOV wrote:
> Maybe, for the first one the specially dedicated macros should be defined.
First what? Please explain.
> In fact, by definition, the authentication method of the AUTH PKCS#15
> object cannot be SC_AC_NONE (method 'not none' is it's reason for
> existence).
> Actually, the only AUTH method fully implemented in OpenSC-PKCS#15 is
> the PIN (CHV) -- that's why by default it should be initialized with
> SC_AC_CHV (or some specially dedicated macro).
>
> Sure, we can do it in 'sc_pkcs15emu_add_pin_obj',
> but it will overwrite the (actually hypothetic) setting from the card
So the following is a safe and sane assumption as well: (until there is a
different authentication method implemented other than a PIN)
The idea of the helper objects in pkcs15-syn.c are meant to simplify the
emulation writing experience (you don't have to call the _add_pin_obj wrapper)
Index: pkcs15-syn.c
===================================================================
--- pkcs15-syn.c (revision 4063)
+++ pkcs15-syn.c (working copy)
@@ -316,6 +316,8 @@
sc_pkcs15_pin_info_t pin = *in_pin;
pin.magic = SC_PKCS15_PIN_MAGIC;
+ if (!pin.auth_method) /* or SC_AC_NONE */
+ pin.auth_method = SC_AC_CHV;
return sc_pkcs15emu_object_add(p15card, SC_PKCS15_TYPE_AUTH_PIN, obj,
&pin);
}
--
Martin Paljak
http://martin.paljak.pri.ee
+3725156495
_______________________________________________
opensc-devel mailing list
[email protected]
http://www.opensc-project.org/mailman/listinfo/opensc-devel