mirror of
https://github.com/corda/corda.git
synced 2025-06-15 21:58:17 +00:00
CORDA-3696: JDK 11 Testing branch (#6131)
* CORDA-3696: Temporary update to enable JDK11 build and test. Will eventually be switchable. * CORDA-3696: Filter out the Nashorn warning. * CORDA-3696: Add JDK11 classifier. * CORDA-3696: Updated match string to cope with JDK11. * CORDA-3696: Filtering out SPHINCS256_SHA256 where failing due to JDK11. * CORDA-3696: Now remove SPHINCS256_SHA256 only if JDK11. * CORDA-3696: Fix test failure - switch to regex matching. * CORDA-3696: Hide the illegal access warnings. * CORDA-3696: Check for Java11 when disabling Java11 warnings. * CORDA-3696: Fix unneccessary non null check. * CORDA-3696: Reverting build env to JDK8 * CORDA-3696: Revert hiding of illegal access warnings via Unsafe class. * CORDA-3696: Remove internal access warnings and new JDK11 version checker. * CORDA-3696: Updated build file for OS * CORDA-3696: Removed typo * CORDA-3696: Fixed space typo. * CORDA-3696: Open modules to remove the illegal access warnings. Co-authored-by: Adel El-Beik <adelel-beik@19LDN-MAC108.local>
This commit is contained in:
@ -15,6 +15,7 @@ import net.corda.core.crypto.Crypto.generateKeyPair
|
||||
import net.corda.core.crypto.SignatureScheme
|
||||
import net.corda.core.crypto.newSecureRandom
|
||||
import net.corda.core.identity.CordaX500Name
|
||||
import net.corda.core.internal.JavaVersion
|
||||
import net.corda.core.internal.div
|
||||
import net.corda.core.serialization.SerializationContext
|
||||
import net.corda.core.serialization.deserialize
|
||||
@ -96,6 +97,7 @@ class X509UtilitiesTest {
|
||||
Pair(ECDSA_SECP256K1_SHA256, RSA_SHA256),
|
||||
Pair(EDDSA_ED25519_SHA512, ECDSA_SECP256K1_SHA256),
|
||||
Pair(RSA_SHA256, EDDSA_ED25519_SHA512),
|
||||
Pair(EDDSA_ED25519_SHA512, ECDSA_SECP256R1_SHA256),
|
||||
Pair(SPHINCS256_SHA256, ECDSA_SECP256R1_SHA256)
|
||||
)
|
||||
|
||||
@ -115,7 +117,8 @@ class X509UtilitiesTest {
|
||||
|
||||
@Test(timeout=300_000)
|
||||
fun `create valid self-signed CA certificate`() {
|
||||
Crypto.supportedSignatureSchemes().filter { it != COMPOSITE_KEY }.forEach { validSelfSignedCertificate(it) }
|
||||
Crypto.supportedSignatureSchemes().filter { it != COMPOSITE_KEY
|
||||
&& ( !JavaVersion.isVersionAtLeast(JavaVersion.Java_11) || it != SPHINCS256_SHA256)}.forEach { validSelfSignedCertificate(it) }
|
||||
}
|
||||
|
||||
private fun validSelfSignedCertificate(signatureScheme: SignatureScheme) {
|
||||
@ -150,7 +153,8 @@ class X509UtilitiesTest {
|
||||
|
||||
@Test(timeout=300_000)
|
||||
fun `create valid server certificate chain`() {
|
||||
certChainSchemeCombinations.forEach { createValidServerCertChain(it.first, it.second) }
|
||||
certChainSchemeCombinations.filter{ !JavaVersion.isVersionAtLeast(JavaVersion.Java_11) || it.first != SPHINCS256_SHA256 }
|
||||
.forEach { createValidServerCertChain(it.first, it.second) }
|
||||
}
|
||||
|
||||
private fun createValidServerCertChain(signatureSchemeRoot: SignatureScheme, signatureSchemeChild: SignatureScheme) {
|
||||
|
Reference in New Issue
Block a user