From 00ad70b3bd7f8859c710039857aa7da17a29b3d7 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 3 Apr 2019 06:04:52 +0200 Subject: Bug 1369: Source Certification Contract (SCC): Initial SHA256 fingerprint & runtime validation This change implements a strong SHA256 signature over: 1) source tree inclusive make recipe (SHA256-Source) 2) all class files (SHA256-Classes) 3) all native libraries (SHA256-Natives) 4) the class files as deployed in the jar (SHA256-Classes-this) 5) the native libraries as deployed in the jar (SHA256-Natives-this) and drops all of these in the deployed Jar file. This allows SHA256 validation of (4) + (5) at runtime and further complete validation (1), (2) and (3) offline. Full SCC would now required (1) - (3) to be placed on a server for further validation. Optionally we may use GPG or PGP to validate the build entity to implement the chain of trust The SHA256 runtime validation is tested via: com.jogamp.common.util.TestVersionInfo --- make/Manifest | 5 + make/Manifest-android-launcher | 5 + make/Manifest-rt | 5 + make/Manifest-rt-alt | 5 + make/Manifest-rt-android | 5 + make/Manifest-rt-natives | 5 + make/Manifest-rt.cdc | 5 + make/build.xml | 268 ++++++++++++++++++++++++++++++++--------- make/scripts/runtest.sh | 2 +- 9 files changed, 249 insertions(+), 56 deletions(-) (limited to 'make') diff --git a/make/Manifest b/make/Manifest index cab8805..27a9acc 100755 --- a/make/Manifest +++ b/make/Manifest @@ -8,6 +8,11 @@ Implementation-Version: @VERSION@ Implementation-Build: @BUILD_VERSION@ Implementation-Branch: @SCM_BRANCH@ Implementation-Commit: @SCM_COMMIT@ +Implementation-SHA256-Sources: @SHA256_SOURCES@ +Implementation-SHA256-Classes: @SHA256_CLASSES@ +Implementation-SHA256-Classes-this: @SHA256_CLASSES_THIS@ +Implementation-SHA256-Natives: @SHA256_NATIVES@ +Implementation-SHA256-Natives-this: @SHA256_NATIVES_THIS@ Implementation-Vendor: JogAmp Community Implementation-Vendor-Id: com.jogamp Implementation-URL: http://jogamp.org/ diff --git a/make/Manifest-android-launcher b/make/Manifest-android-launcher index 0da49d3..4754474 100755 --- a/make/Manifest-android-launcher +++ b/make/Manifest-android-launcher @@ -8,6 +8,11 @@ Implementation-Version: @VERSION@ Implementation-Build: @BUILD_VERSION@ Implementation-Branch: @SCM_BRANCH@ Implementation-Commit: @SCM_COMMIT@ +Implementation-SHA256-Sources: @SHA256_SOURCES@ +Implementation-SHA256-Classes: @SHA256_CLASSES@ +Implementation-SHA256-Classes-this: @SHA256_CLASSES_THIS@ +Implementation-SHA256-Natives: @SHA256_NATIVES@ +Implementation-SHA256-Natives-this: @SHA256_NATIVES_THIS@ Implementation-Vendor: JogAmp Community Implementation-Vendor-Id: com.jogamp Implementation-URL: http://jogamp.org/ diff --git a/make/Manifest-rt b/make/Manifest-rt index 4a76c0c..98f0e3f 100755 --- a/make/Manifest-rt +++ b/make/Manifest-rt @@ -8,6 +8,11 @@ Implementation-Version: @VERSION@ Implementation-Build: @BUILD_VERSION@ Implementation-Branch: @SCM_BRANCH@ Implementation-Commit: @SCM_COMMIT@ +Implementation-SHA256-Sources: @SHA256_SOURCES@ +Implementation-SHA256-Classes: @SHA256_CLASSES@ +Implementation-SHA256-Classes-this: @SHA256_CLASSES_THIS@ +Implementation-SHA256-Natives: @SHA256_NATIVES@ +Implementation-SHA256-Natives-this: @SHA256_NATIVES_THIS@ Implementation-Vendor: JogAmp Community Implementation-Vendor-Id: com.jogamp Implementation-URL: http://jogamp.org/ diff --git a/make/Manifest-rt-alt b/make/Manifest-rt-alt index d95830e..f577950 100755 --- a/make/Manifest-rt-alt +++ b/make/Manifest-rt-alt @@ -8,6 +8,11 @@ Implementation-Version: @VERSION@ Implementation-Build: @BUILD_VERSION@ Implementation-Branch: @SCM_BRANCH@ Implementation-Commit: @SCM_COMMIT@ +Implementation-SHA256-Sources: @SHA256_SOURCES@ +Implementation-SHA256-Classes: @SHA256_CLASSES@ +Implementation-SHA256-Classes-this: @SHA256_CLASSES_THIS@ +Implementation-SHA256-Natives: @SHA256_NATIVES@ +Implementation-SHA256-Natives-this: @SHA256_NATIVES_THIS@ Implementation-Vendor: JogAmp Community Implementation-Vendor-Id: com.jogamp Implementation-URL: http://jogamp.org/ diff --git a/make/Manifest-rt-android b/make/Manifest-rt-android index bf5f123..16350df 100755 --- a/make/Manifest-rt-android +++ b/make/Manifest-rt-android @@ -8,6 +8,11 @@ Implementation-Version: @VERSION@ Implementation-Build: @BUILD_VERSION@ Implementation-Branch: @SCM_BRANCH@ Implementation-Commit: @SCM_COMMIT@ +Implementation-SHA256-Sources: @SHA256_SOURCES@ +Implementation-SHA256-Classes: @SHA256_CLASSES@ +Implementation-SHA256-Classes-this: @SHA256_CLASSES_THIS@ +Implementation-SHA256-Natives: @SHA256_NATIVES@ +Implementation-SHA256-Natives-this: @SHA256_NATIVES_THIS@ Implementation-Vendor: JogAmp Community Implementation-Vendor-Id: com.jogamp Implementation-URL: http://jogamp.org/ diff --git a/make/Manifest-rt-natives b/make/Manifest-rt-natives index 90c5590..480f765 100755 --- a/make/Manifest-rt-natives +++ b/make/Manifest-rt-natives @@ -8,6 +8,11 @@ Implementation-Version: @VERSION@ Implementation-Build: @BUILD_VERSION@ Implementation-Branch: @SCM_BRANCH@ Implementation-Commit: @SCM_COMMIT@ +Implementation-SHA256-Sources: @SHA256_SOURCES@ +Implementation-SHA256-Classes: @SHA256_CLASSES@ +Implementation-SHA256-Classes-this: @SHA256_CLASSES_THIS@ +Implementation-SHA256-Natives: @SHA256_NATIVES@ +Implementation-SHA256-Natives-this: @SHA256_NATIVES_THIS@ Implementation-Vendor: JogAmp Community Implementation-Vendor-Id: com.jogamp Implementation-URL: http://jogamp.org/ diff --git a/make/Manifest-rt.cdc b/make/Manifest-rt.cdc index 70c4f92..93a62ae 100755 --- a/make/Manifest-rt.cdc +++ b/make/Manifest-rt.cdc @@ -8,6 +8,11 @@ Implementation-Version: @VERSION@ Implementation-Build: @BUILD_VERSION@ Implementation-Branch: @SCM_BRANCH@ Implementation-Commit: @SCM_COMMIT@ +Implementation-SHA256-Sources: @SHA256_SOURCES@ +Implementation-SHA256-Classes: @SHA256_CLASSES@ +Implementation-SHA256-Classes-this: @SHA256_CLASSES_THIS@ +Implementation-SHA256-Natives: @SHA256_NATIVES@ +Implementation-SHA256-Natives-this: @SHA256_NATIVES_THIS@ Implementation-Vendor: JogAmp Community Implementation-Vendor-Id: com.jogamp Implementation-URL: http://jogamp.org/ diff --git a/make/build.xml b/make/build.xml index dc6602f..61a3880 100644 --- a/make/build.xml +++ b/make/build.xml @@ -87,6 +87,12 @@ + + + + + + @@ -96,6 +102,9 @@ + + + @@ -500,6 +509,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -774,6 +818,11 @@ + + + + + @@ -793,6 +842,27 @@ + + + + + + + + + + + + + + + + + + + @@ -801,93 +871,99 @@ + + + + + - - - - - - - - - - + + + + + + + + + + + + + + - + + + + + - + + + - + - + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -980,7 +1120,19 @@ + + + + + + + + + + @@ -989,6 +1141,11 @@ + + + + + @@ -999,9 +1156,6 @@ - - - + depends="init, android-launcher.build, gluegen.build.java, gluegen.build.c, gluegen.packaging, android-launcher.package" /> @@ -1055,6 +1209,7 @@ + @@ -1064,6 +1219,9 @@ + + + diff --git a/make/scripts/runtest.sh b/make/scripts/runtest.sh index 5ba9b73..0ce33bd 100755 --- a/make/scripts/runtest.sh +++ b/make/scripts/runtest.sh @@ -63,7 +63,7 @@ X_ARGS="-Drootrel.build=$ROOTREL_BUILD -Dgluegen.root=$GLUEGEN_ROOT" #D_ARGS="-Djogamp.debug.IOUtil -Djogamp.debug.IOUtil.Exe -Djogamp.debug.IOUtil.Exe.NoStream" #D_ARGS="-Djogamp.debug.IOUtil -Djogamp.debug.TempFileCache -Djogamp.debug.TempJarCache -Djogamp.debug.IOUtil.Exe" #D_ARGS="-Djogamp.debug.IOUtil -Djogamp.debug.TempFileCache -Djogamp.debug.TempJarCache -Djava.io.tmpdir=/run/501" -D_ARGS="-Djogamp.debug.IOUtil -Djogamp.debug.TempFileCache -Djogamp.debug.TempJarCache" +#D_ARGS="-Djogamp.debug.IOUtil -Djogamp.debug.TempFileCache -Djogamp.debug.TempJarCache" #D_ARGS="-Djogamp.debug.ByteBufferInputStream" #D_ARGS="-Djogamp.debug.Buffers" #D_ARGS="-Djogamp.debug.Bitstream" -- cgit v1.2.3