On Thu, 11 Nov 2010 10:30:24 -0600
Kent Yoder <[email protected]> wrote:

(Sorry for the loooong delay!)

>   Looks good to me, Klaus.  template_attribute_find will correctly
> return 0 when the base template passed in is NULL, so that should be
> safe.
> 
>   I noticed that the rsa_keygen test tries that validate that
> CKR_FUNCTION_FAILED is returned when an even RSA public exponent is
> passed in.  That test now fails, did that check change recently?

I'll admit it's been a while I don't run rsa_keygen, but I don't
remember having this behavior changing recently.

In fact, I have some patches in my queue that "fix" this issue, by
being aware of endianness when checking for even public exponents, and
returning "CKR_TEMPLATE_INCONSITENT" if that's the case (See PKCS#11
v2.11 section 10.1.1, item 5 - although one may interpret that the
invalidity of an even public exponent is not token dependent)

I'll sort the bunch of things I have to send as best as possible and as
soon as possible, so we can review this properly.

>   Attached is an updated rsa_keygen.c that tests the stuff in this
> patch.
> 
> Acked-by: Kent Yoder <[email protected]>

Thanks for those!

Though I'll probably hold them for now, since I'm seeing some strange
behavior on my end:

[kla...@localhost opencryptoki]$ 
PKCSLIB=/usr/local/lib/opencryptoki/libopencryptoki.so PKCS11_SO_PIN=76543210 
PKCS11_USER_PIN=01234567 testcases/rsa_keygen/rsa_keygen -slot 1
Using slot #1...

do_GenerateRSAKey...
rsa_keygen.c:180:    C_GenerateKeyPair #3 returned 0 (0x0) CKR_OK
do_GenerateRSAKey...
rsa_keygen.c:59:    C_Login #1 returned 256 (0x100) CKR_USER_ALREADY_LOGGED_IN
rsa_keygen.c:285: do_GenerateRSAKeyPair(1024) returned 256 (0x100) 
CKR_USER_ALREADY_LOGGED_IN
[kla...@localhost opencryptoki]$ 


I'll try to take a look a re-submit.

 -Klaus


-- 
Klaus Heinrich Kiwi | [email protected] | http://blog.klauskiwi.com
Open Source Security blog :     http://www.ratliff.net/blog
IBM Linux Technology Center :   http://www.ibm.com/linux/ltc

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Opencryptoki-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opencryptoki-tech

Reply via email to