Hello Steve,

Thus wrote Stephen Henson via RT (r...@openssl.org):

> I've now committed code to the development branch which includes PSS
> signature verification support.

thanks for committing this, it looks like a clean and generic approach. 

(of course, it's a pity that most of my code didn't make it into the
final version but that's life...)

> I'll look into PSS signing at some point too.

Any chance I can contribute to this, based on your approach for
verification?

A while ago, I extended my patch to support basic PSS signing. For this,
I added a -pss command line parameter to x509 which uses the default PSS
parameters and does not explicitly encode them. Instead, an empty
sequence is used to indicate default parameters.

> Let me know of any problems.

It runs ok against the sample certificates that I have here.

Do you think it makes sense to check the trailerField in
rsa_item_verify() to make sure that it is the default value?

Index: crypto/rsa/rsa_ameth.c
===================================================================
RCS file: /v/openssl/cvs/openssl/crypto/rsa/rsa_ameth.c,v
retrieving revision 1.24
diff -u -r1.24 rsa_ameth.c
--- crypto/rsa/rsa_ameth.c      8 Mar 2010 18:10:35 -0000       1.24
+++ crypto/rsa/rsa_ameth.c      9 Mar 2010 21:55:22 -0000
@@ -530,6 +530,13 @@
        else
                saltlen = 20;
 
+   /* low-level routines support only trailer field 0xbc (value 1) */
+   if (pss->trailerField && ASN1_INTEGER_get(pss->trailerField) != 1)
+                       {
+                       RSAerr(RSA_F_RSA_ITEM_VERIFY, RSA_R_INVALID_TRAILER);
+                       goto err;
+                       }
+
        /* We have all parameters now set up context */
 
        if (!EVP_DigestVerifyInit(ctx, &pkctx, md, NULL, pkey))


BTW, ticket #2131 is now obsolete ;-)

Best regards,

   Martin


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to