Merge pull request #66 from cconlon/certPathValidatorFIPSFix
CertPathValidator: set PKIXParameters Signature provider if null with wolfCrypt FIPSpull/69/head
commit
0497ee767c
|
@ -653,9 +653,16 @@ public class WolfCryptPKIXCertPathValidator extends CertPathValidatorSpi {
|
||||||
/* If we are in FIPS mode, verify wolfJCE is the Signature provider
|
/* If we are in FIPS mode, verify wolfJCE is the Signature provider
|
||||||
* to help maintain FIPS compliance */
|
* to help maintain FIPS compliance */
|
||||||
if (Fips.enabled && pkixParams.getSigProvider() != "wolfJCE") {
|
if (Fips.enabled && pkixParams.getSigProvider() != "wolfJCE") {
|
||||||
throw new CertPathValidatorException(
|
if (pkixParams.getSigProvider() == null) {
|
||||||
"CertPathParameters Signature Provider must be wolfJCE " +
|
/* Preferred Signature provider not set, set to wolfJCE */
|
||||||
"when using wolfCrypt FIPS");
|
pkixParams.setSigProvider("wolfJCE");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw new CertPathValidatorException(
|
||||||
|
"CertPathParameters Signature Provider must be wolfJCE " +
|
||||||
|
"when using wolfCrypt FIPS: " +
|
||||||
|
pkixParams.getSigProvider());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Use wolfSSL CertManager to facilitate chain verification */
|
/* Use wolfSSL CertManager to facilitate chain verification */
|
||||||
|
|
Loading…
Reference in New Issue