Integrate our deterministic OpenJDK fork with Avian (#117)

* Remove non-deterministic classes from Avian (wip).
* Complete integration between Avian and our local OpenJDK fork.
* Revert accidental Avian modification.
* Implements a "blacklist filter" for Avian's system classloader.
* Remove .DSA, .RSA, .SF and .MF files when creating a fat jar.
* Revert more accidental Avian changes.
* Fix breakage with dependencies, and retain Kryo instance.
* Apply blacklisting per thread rather than globally.
* Blacklist java.lang.ClassLoader and all java.lang.Thread* classes.
* Add comment explaining class blacklisting.
* Fix Avian when building without OpenJDK.
* Configure ProGuard to keep more classes for deserialisation.
* Retain explicit return type for secure random function.
* Add sources of random numbers to the class blacklist.
* Blacklist the threading classes more precisely.
* Make SystemClassLoader.isForbidden() static.
* Prevent ProGuard from removing SerializedLambda.readResolve().
* Remove Avian tests involving direct buffers.
This commit is contained in:
Chris Rankin
2017-11-21 17:06:18 +00:00
committed by GitHub
parent 6a631ec626
commit 4dbd404f64
78 changed files with 238 additions and 5088 deletions

View File

@ -219,7 +219,7 @@ private val _newSecureRandom: () -> SecureRandom by lazy {
* which should never happen and suggests an unusual JVM or non-standard Java library.
*/
@Throws(NoSuchAlgorithmException::class)
fun newSecureRandom() = _newSecureRandom()
fun newSecureRandom(): SecureRandom = _newSecureRandom()
/**
* Returns a random positive non-zero long generated using a secure RNG. This function sacrifies a bit of entropy in order

View File

@ -1,7 +1,8 @@
package net.corda.core.utilities
object SgxSupport {
@JvmStatic
val isInsideEnclave: Boolean by lazy {
System.getProperty("os.name") == "Linux" && (System.getProperty("java.vm.name") == "Avian")
(System.getProperty("os.name") == "Linux") && (System.getProperty("java.vm.name") == "Avian (Corda)")
}
}
}