Skip to content

Commit f571744

Browse files
[TEMP] tests/openssl: Enable PKCS_RSA_PSS_SHA256 certificate tests
Only enable PKCS_RSA_PSS_SHA256 and not the rest of the variants as the tests for that are currently failing. Use aws_lc_rs for testing as supposedly this one does support PSS keys while ring does not. * Fix a logic error in the test in which verify_cert_basic was being run when verify_cert should have been and viceversa. Signed-off-by: Tomás González <[email protected]>
1 parent c040537 commit f571744

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

rcgen/tests/openssl.rs

+9-13
Original file line numberDiff line numberDiff line change
@@ -288,25 +288,21 @@ fn test_openssl_rsa_combinations_given() {
288288
&rcgen::PKCS_RSA_SHA256,
289289
&rcgen::PKCS_RSA_SHA384,
290290
&rcgen::PKCS_RSA_SHA512,
291-
//&rcgen::PKCS_RSA_PSS_SHA256,
292-
//&rcgen::PKCS_RSA_PSS_SHA384,
293-
//&rcgen::PKCS_RSA_PSS_SHA512,
291+
#[cfg(feature = "aws_lc_rs")]
292+
&rcgen::PKCS_RSA_PSS_SHA256,
293+
// #[cfg(feature = "aws_lc_rs")]
294+
// &rcgen::PKCS_RSA_PSS_SHA384,
295+
// #[cfg(feature = "aws_lc_rs")]
296+
// &rcgen::PKCS_RSA_PSS_SHA512,
294297
];
295-
for (i, alg) in alg_list.iter().enumerate() {
298+
for (_i, alg) in alg_list.iter().enumerate() {
296299
let (params, _) = util::default_params();
297300
let key_pair =
298301
KeyPair::from_pkcs8_pem_and_sign_algo(util::RSA_TEST_KEY_PAIR_PEM, alg).unwrap();
299302
let cert = params.self_signed(&key_pair).unwrap();
300303

301-
// Now verify the certificate.
302-
if i >= 4 {
303-
verify_cert(&cert, &key_pair);
304-
verify_csr(&cert, &key_pair);
305-
} else {
306-
// The PSS key types are not fully supported.
307-
// An attempt to use them gives a handshake error.
308-
verify_cert_basic(&cert);
309-
}
304+
verify_cert(&cert, &key_pair);
305+
verify_csr(&cert, &key_pair);
310306
}
311307
}
312308

0 commit comments

Comments
 (0)