Use 0 for tbslen to perform strlen.
authorDr. Stephen Henson <steve@openssl.org>
Tue, 19 Apr 2011 11:10:54 +0000 (11:10 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 19 Apr 2011 11:10:54 +0000 (11:10 +0000)
crypto/dsa/dsa_key.c
crypto/ec/ec_key.c
crypto/rsa/rsa_gen.c

index c758987..942000e 100644 (file)
@@ -79,7 +79,7 @@ static int fips_check_dsa(DSA *dsa)
        pk.pkey.dsa = dsa;
 
        if (!fips_pkey_signature_test(FIPS_TEST_PAIRWISE,
-                                       &pk, tbs, -1, NULL, 0, NULL, 0, NULL))
+                                       &pk, tbs, 0, NULL, 0, NULL, 0, NULL))
                {
                FIPSerr(FIPS_F_FIPS_CHECK_DSA,FIPS_R_PAIRWISE_TEST_FAILED);
                fips_set_selftest_fail();
index 59bc084..ad3022f 100644 (file)
@@ -244,7 +244,7 @@ static int fips_check_ec(EC_KEY *key)
        pk.pkey.ec = key;
 
        if (!fips_pkey_signature_test(FIPS_TEST_PAIRWISE,
-                                       &pk, tbs, -1, NULL, 0, NULL, 0, NULL))
+                                       &pk, tbs, 0, NULL, 0, NULL, 0, NULL))
                {
                FIPSerr(FIPS_F_FIPS_CHECK_EC,FIPS_R_PAIRWISE_TEST_FAILED);
                fips_set_selftest_fail();
index 8f798c0..484468d 100644 (file)
@@ -86,11 +86,11 @@ int fips_check_rsa(RSA *rsa)
        pk.pkey.rsa = rsa;
 
        /* Perform pairwise consistency signature test */
-       if (!fips_pkey_signature_test(FIPS_TEST_PAIRWISE, &pk, tbs, -1,
+       if (!fips_pkey_signature_test(FIPS_TEST_PAIRWISE, &pk, tbs, 0,
                        NULL, 0, NULL, RSA_PKCS1_PADDING, NULL)
-               || !fips_pkey_signature_test(FIPS_TEST_PAIRWISE, &pk, tbs, -1,
+               || !fips_pkey_signature_test(FIPS_TEST_PAIRWISE, &pk, tbs, 0,
                        NULL, 0, NULL, RSA_X931_PADDING, NULL)
-               || !fips_pkey_signature_test(FIPS_TEST_PAIRWISE, &pk, tbs, -1,
+               || !fips_pkey_signature_test(FIPS_TEST_PAIRWISE, &pk, tbs, 0,
                        NULL, 0, NULL, RSA_PKCS1_PSS_PADDING, NULL))
                goto err;
        /* Now perform pairwise consistency encrypt/decrypt test */