mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
OS -> ENT Merge (#757)
* Better cert path validation exception message for PartyAndCertificate.verify (#2976) * Corda Behave extensions for CTS (#2968) * Updated to Corda 3.0, added support for PostgreSQL, added STAGING_ROOT environment variable, incorporating Watch improvements (Maks), Steps Provider interface for auto-scanning of 3rd party steps providers, re-implemented StepBlocks, new ScenarioRunner executable tool, additional Steps definitions (Vault, issue/transfer cash, cordapps), other minor bug fixes and logging improvements. * Updates incorporating PR review feedback. * Reverted back to original - will re-test in ENT. * Removed all SQL Server code (to be included in ENT only) * Minor updates following second PR review. * Fixed broken scenario tests. * Final fix for PostgreSQL scenario test.
This commit is contained in:
@ -114,20 +114,7 @@ object X509Utilities {
|
||||
}
|
||||
|
||||
fun validateCertPath(trustedRoot: X509Certificate, certPath: CertPath) {
|
||||
val params = PKIXParameters(setOf(TrustAnchor(trustedRoot, null)))
|
||||
params.isRevocationEnabled = false
|
||||
try {
|
||||
CertPathValidator.getInstance("PKIX").validate(certPath, params)
|
||||
} catch (e: CertPathValidatorException) {
|
||||
throw CertPathValidatorException(
|
||||
"""Cert path failed to validate against root certificate.
|
||||
Reason: ${e.reason}
|
||||
Offending cert index: ${e.index}
|
||||
Cert path: $certPath
|
||||
|
||||
Root certificate:
|
||||
$trustedRoot""", e, certPath, e.index)
|
||||
}
|
||||
certPath.validate(TrustAnchor(trustedRoot, null))
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user