On Fri, 15 Mar 2013, Dr. Stephen Henson wrote:

Analysing that CSR the actual signature isn't in the correct form: it just
contains the raw SHA1 digest instead of the required DigestInfo structure.

You can check that using rsautl in a manner similar to that for certificates
mentioned in the manual page.

However:


        sign_mechanism.mechanism = CKM_SHA1_RSA_PKCS;

That mechanism *should* produce a signature in the correct format, so possibly
a problem with the PKCS#11 library?

Might be. Estonian ID-card PKCS#11 driver has exact same bug. If the hash algorithm is SHA-1 then the DigestInfo is omited. Use some other algorithm and it is correctly included. Estonian ID-card drivers share code with OpenSC drivers (or vice versa :) so this bug might be more widespread.

Best regards,
Arne
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to