aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.appveyor.yml18
-rw-r--r--.github/workflows/build.yml82
-rw-r--r--.travis.yml63
-rw-r--r--README.md10
-rw-r--r--build-standalone.xml224
m---------ext/libressl0
-rw-r--r--standalone/build.gradle.kts10
-rw-r--r--standalone/src/main/java/cz/crcs/ectester/standalone/libs/NativeECLibrary.java16
8 files changed, 106 insertions, 317 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
deleted file mode 100755
index 051d974..0000000
--- a/.appveyor.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-version: '{build}'
-image: Visual Studio 2017
-
-branches:
- except:
- - gh-pages
-
-environment:
- JAVA_HOME: C:\Program Files\Java\jdk1.8.0
-
-install:
- - cinst ant
- - git submodule update --init --recursive
-
-build_script:
- - ant -f build-applet.xml build
- - ant -f build-reader.xml package
- - ant -f build-standalone.xml package \ No newline at end of file
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..73ee885
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,82 @@
+name: Build
+
+on:
+ push:
+ branches: [ "master" ]
+ pull_request:
+ branches: [ "master" ]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+
+ strategy:
+ matrix:
+ java: [ "8", "11", "17", "21" ]
+ env:
+ JAVA_VERSION: ${{ matrix.java }}
+ name: Build Java ${{ matrix.java }}
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - name: Set up JDK
+ uses: actions/setup-java@v4
+ with:
+ java-version: ${{ matrix.java }}
+ distribution: "temurin"
+
+ - name: Setup Gradle
+ uses: gradle/actions/setup-gradle@v3
+
+ - name: Setup libraries
+ run: |
+ sudo apt update
+ sudo apt install libmbedtls-dev libtomcrypt-dev libtommath-dev libssl-dev libcrypto++-dev libgcrypt20-dev nettle-dev libbotan-2-dev nasm
+
+ - name: Build applets
+ run: if [ $JAVA_VERSION != 21 ]; then ./gradlew applet:buildJavaCard; fi
+
+ - name: Build reader
+ run: ./gradlew reader:uberJar
+
+ - name: Build libs
+ run: |
+ cd ext/boringssl
+ cmake -DBUILD_SHARED_LIBS=1 -Bbuild
+ cd build
+ make -j4 crypto
+ cd ../../..
+ cd ext/libressl
+ ./autogen.sh
+ cmake -DBUILD_SHARED_LIBS=ON -Bbuild
+ cd build
+ make -j4 crypto
+ cd ../../..
+ cd ext/ipp-crypto
+ CC=clang CXX=clang++ cmake CMakeLists.txt -Bbuild -DARCH=intel64
+ cd build
+ make -j4
+ cd ../../..
+
+ - name: Build standalone
+ run: |
+ ./gradlew standalone:libs || true
+ ./gradlew standalone:uberJar
+
+ # ffs: https://github.com/adoptium/adoptium-support/issues/485 !!!
+ - name: List libraries
+ run: env LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu/" ./gradlew standalone:run --args="list-libs"
+
+ - name: Upload build artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: built-${{ matrix.java }}
+ path: |
+ applet/build/javacard/*.cap
+ reader/build/libs/ECTesterReader.jar
+ standalone/build/libs/ECTesterStandalone.jar \ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index be60ac9..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,63 +0,0 @@
-os: linux
-dist: bionic
-addons:
- apt:
- sources:
- - ubuntu-toolchain-r-test
- packages:
- - cmake
- - libmbedtls-dev
- - libtomcrypt-dev
- - libtommath-dev
- - libssl-dev
- - libcrypto++-dev
- - libgcrypt20-dev
- - nettle-dev
- - gcc-8
- - g++-8
-language: java
-jdk: openjdk8
-env:
- - CC=gcc-8 CXX=g++-8
-
-install:
- - eval "$(gimme 1.13)"
- - cd ext/boringssl
- - mkdir build
- - cd build
- - cmake -DBUILD_SHARED_LIBS=1 ..
- - make crypto
- - cd ../../..
- - cd ext/libressl
- - ./autogen.sh
- - mkdir build
- - cd build
- - cmake -DBUILD_SHARED_LIBS=ON ..
- - make crypto
- - cd ../../..
-
-script:
- - ant -f build-applet.xml build
- - ant -f build-reader.xml package
- - ant -f build-standalone.xml package
- - ./util/test.sh
-
-before_deploy:
- - zip "dist/ECTester.zip" "dist/ECTesterReader-dist.jar" "dist/ECTesterReader.jar" "applet/ectester221.cap" "applet/ectester222.cap" "dist/ECTesterStandalone-dist.jar" "dist/ECTesterStandalone.jar"
-
-deploy:
- provider: releases
- token:
- secure: q2aJvu32K+nfbMR60nFCEkn+jYCKprlCRlIoPjuRz1HySX233Ccwpx1CAdNzEjY6FDFcoReKAg6r5vdPjJ4FRPAQ23TxffIYZPkykL5K/pUZJbM5xkazJY0Fp8i6Vyl0JfeanVib1PTyOSugplhCttFk5nb9JUFV36Tre66XntOl5y80Trn94F5aTlRjfW26UH65W7Aa6WZ0N4OX/ZsX+vEOJPAu+RLfOq9oBOx/loB8ntYM/e/6bEwJp6EedRQLDsiS4NavP3svH+GXsPLs5p3soyRXYsvvGKVnVjcjZURxDDdxv5YuCWUUfl9PbNB+Mqmx/HQxl50BKoKFqwap1+TnlbuTAiWaXeh3zdXuGB+TPg8KE8h6ueDneHd3Lpivgq79IvPWIH+N4b3Pa952+rD+JKBZ807efB+97OtWrkQL7/sLZESQUdIszE724HHOiArKpNajIX+kN6NJdul5xFCiQQHG+O7iDFQBavCGM9fk63mZRyGPxZQzS06BV2vIIHg0yx3igN+OKKMFCH+P3hYR1zL6o65OlgbL1ifTZ18GDvmVRNdi53/fxQ2n/mQmI4tQpn4ZB7Ddoxx4GlpjFjzdKk/P9nKwng0M9wrp8row/vb5S+1aPwSxp9/4ASP9dkvLcNjTkWhmGPrWe+82Y9JPK47uesx0YeaVI2C7IR0=
- file:
- - "dist/ECTesterReader-dist.jar"
- - "dist/ECTesterReader.jar"
- - "applet/ectester221.cap"
- - "applet/ectester222.cap"
- - "dist/ECTesterStandalone-dist.jar"
- - "dist/ECTesterStandalone.jar"
- - "dist/ECTester.zip"
- cleanup: false
- on:
- tags: true
- repo: crocs-muni/ECTester
diff --git a/README.md b/README.md
index d8d3eac..8c1da32 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# ![](docs/full.png)
-[![Build status](https://api.travis-ci.org/crocs-muni/ECTester.svg?branch=master)](https://travis-ci.org/crocs-muni/ECTester) [![Build status](https://ci.appveyor.com/api/projects/status/02kcaf52op89910u?svg=true)](https://ci.appveyor.com/project/J08nY/ectester-cm6ng) [![GitHub release](https://img.shields.io/github/release/crocs-muni/ECTEster.svg)](https://github.com/crocs-muni/ECTester/releases) [![license](https://img.shields.io/github/license/crocs-muni/ECTester.svg)](https://github.com/crocs-muni/ECTester/blob/master/LICENSE) [![docs](https://img.shields.io/badge/docs-github.io-brightgreen.svg)](https://crocs-muni.github.io/ECTester/)
+[![Build](https://github.com/crocs-muni/ECTester/actions/workflows/build.yml/badge.svg)](https://github.com/crocs-muni/ECTester/actions/workflows/build.yml) [![GitHub release](https://img.shields.io/github/release/crocs-muni/ECTEster.svg)](https://github.com/crocs-muni/ECTester/releases) [![license](https://img.shields.io/github/license/crocs-muni/ECTester.svg)](https://github.com/crocs-muni/ECTester/blob/master/LICENSE) [![docs](https://img.shields.io/badge/docs-github.io-brightgreen.svg)](https://crocs-muni.github.io/ECTester/)
ECTester is a tool for testing and analysis of elliptic curve cryptography implementations on JavaCards and in
cryptographic libraries. It consists of four separate parts:
@@ -10,7 +10,7 @@ cryptographic libraries. It consists of four separate parts:
- The ECTesterStandalone app, which works with software libraries
- Jupyter notebooks for analysis and visualization of data from the apps
-For more information on ECC support on JavaCards see the [github page](https://crocs-muni.github.io/ECTester/), with results, tables and docs.
+For more information on ECC support on JavaCards see the [GitHub page](https://crocs-muni.github.io/ECTester/), with results, tables and docs.
This project is developed by the [Centre for Research On Cryptography and Security](https://crocs.fi.muni.cz) at Faculty of Informatics, Masaryk University.
@@ -360,9 +360,8 @@ BoringSSL, LibreSSL and ipp-crypto are included as git submodules. Make sure you
after checking out the ECTester repository to initialize them. To build BoringSSL do:
```
cd ext/boringssl
-mkdir build
+cmake -GNinja -Bbuild -DBUILD_SHARED_LIBS=1
cd build
-cmake -GNinja -DBUILD_SHARED_LIBS=1 ..
ninja
```
@@ -370,9 +369,8 @@ To build LibreSSL do:
```
cd ext/libressl
./autogen.sh
-mkdir build
+cmake -GNinja -Bbuild -DBUILD_SHARED_LIBS=1
cd build
-cmake -GNinja -DBUILD_SHARED_LIBS=1 ..
ninja
```
diff --git a/build-standalone.xml b/build-standalone.xml
deleted file mode 100644
index 731698b..0000000
--- a/build-standalone.xml
+++ /dev/null
@@ -1,224 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- You may freely edit this file. See commented blocks below for -->
-<!-- some examples of how to customize the build. -->
-<!-- (If you delete it and reopen the project it will be recreated.) -->
-<!-- By default, only the Clean and Build commands use this build script. -->
-<!-- Commands such as Run, Debug, and Test only use this build script if -->
-<!-- the Compile on Save feature is turned off for the project. -->
-<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
-<!-- in the project's Project Properties dialog box.-->
-<project name="ECTesterStandalone" default="default" basedir=".">
- <description>Builds, tests, and runs the project ECTesterStandalone.</description>
- <import file="nbproject/standalone/build-impl.xml"/>
- <import file="nbproject/dist-build.xml"/>
- <!--
-
- There exist several targets which are by default empty and which can be
- used for execution of your tasks. These targets are usually executed
- before and after some main targets. They are:
-
- -pre-init: called before initialization of project properties
- -post-init: called after initialization of project properties
- -pre-compile: called before javac compilation
- -post-compile: called after javac compilation
- -pre-compile-single: called before javac compilation of single file
- -post-compile-single: called after javac compilation of single file
- -pre-compile-test: called before javac compilation of JUnit tests
- -post-compile-test: called after javac compilation of JUnit tests
- -pre-compile-test-single: called before javac compilation of single JUnit test
- -post-compile-test-single: called after javac compilation of single JUunit test
- -pre-jar: called before JAR building
- -post-jar: called after JAR building
- -post-clean: called after cleaning build products
-
- (Targets beginning with '-' are not intended to be called on their own.)
-
- Example of inserting an obfuscator after compilation could look like this:
-
- <target name="-post-compile">
- <obfuscate>
- <fileset dir="${build.classes.dir}"/>
- </obfuscate>
- </target>
-
- For list of available properties check the imported
- nbproject/build-impl.xml file.
-
-
- Another way to customize the build is by overriding existing main targets.
- The targets of interest are:
-
- -init-macrodef-javac: defines macro for javac compilation
- -init-macrodef-junit: defines macro for junit execution
- -init-macrodef-debug: defines macro for class debugging
- -init-macrodef-java: defines macro for class execution
- -do-jar: JAR building
- run: execution of project
- -javadoc-build: Javadoc generation
- test-report: JUnit report generation
-
- An example of overriding the target for project execution could look like this:
-
- <target name="run" depends="SimpleECC-impl.jar">
- <exec dir="bin" executable="launcher.exe">
- <arg file="${dist.jar}"/>
- </exec>
- </target>
-
- Notice that the overridden target depends on the jar target and not only on
- the compile target as the regular run target does. Again, for a list of available
- properties which you can use, check the target you are overriding in the
- nbproject/build-impl.xml file.
-
- -->
- <target name="-pre-jar">
- <copy file="LICENSE" todir="${build.classes.dir}"/>
- </target>
-
- <target name="package" depends="jar">
- <property name="store.jar.name" value="ECTesterStandalone-dist"/>
- <antcall target="dist-build.package"/>
- </target>
-
- <target name="sign" depends="package">
- <signjar keystore="nbproject/keystore" alias="ectester" storepass="ectester">
- <path>
- <fileset dir="dist" includes="*.jar"/>
- </path>
- </signjar>
- </target>
-
- <target name="libs-try">
- <exec dir="src/cz/crcs/ectester/standalone/libs/jni" executable="make" osfamily="unix">
- <arg value="-k"/>
- <arg value="-B"/>
- </exec>
- <exec dir="src/cz/crcs/ectester/standalone/libs/jni" executable="cmd" osfamily="windows">
- <arg value="/c"/>
- <arg value="Makefile.bat"/>
- </exec>
- </target>
- <target name="libs">
- <exec dir="src/cz/crcs/ectester/standalone/libs/jni" failonerror="true" executable="make" osfamily="unix">
- <arg value="-k"/>
- <arg value="-B"/>
- </exec>
- <exec dir="src/cz/crcs/ectester/standalone/libs/jni" failonerror="true" executable="cmd" osfamily="windows">
- <arg value="/c"/>
- <arg value="Makefile.bat"/>
- </exec>
- </target>
- <target name="libs-debug">
- <exec dir="src/cz/crcs/ectester/standalone/libs/jni" failonerror="true" executable="make" osfamily="unix">
- <arg value="-k"/>
- <arg value="DEBUG=1"/>
- </exec>
- <exec dir="src/cz/crcs/ectester/standalone/libs/jni" failonerror="true" executable="cmd" osfamily="windows">
- <arg value="/c"/>
- <arg value="Makefile.bat"/>
- <env key="DEBUG" value="1"/>
- </exec>
- </target>
-
- <target name="-pre-compile" depends="libs-try"/>
-
- <target name="-post-clean">
- <exec dir="src/cz/crcs/ectester/standalone/libs/jni" failonerror="true" executable="make" osfamily="unix">
- <arg value="clean"/>
- </exec>
- <exec dir="src/cz/crcs/ectester/standalone/libs/jni" failonerror="true" executable="cmd" osfamily="windows">
- <arg value="/c"/>
- <arg value="Makefile.bat"/>
- <arg value="clean"/>
- </exec>
- </target>
-
- <target name="headers" depends="compile">
- <javah classpath="${build.classes.dir}" outputfile="src/cz/crcs/ectester/standalone/libs/jni/native.h">
- <class name="cz.crcs.ectester.standalone.libs.NativeECLibrary"/>
- <class name="cz.crcs.ectester.standalone.libs.TomcryptLib"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeProvider$TomCrypt"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeKeyPairGeneratorSpi$TomCrypt"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeECPublicKey$TomCrypt"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeECPrivateKey$TomCrypt"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeKeyAgreementSpi$TomCrypt"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeSignatureSpi$TomCryptRaw"/>
- <class name="cz.crcs.ectester.standalone.libs.BotanLib"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeProvider$Botan"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeKeyPairGeneratorSpi$Botan"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeECPublicKey$Botan"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeECPrivateKey$Botan"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeKeyAgreementSpi$Botan"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeSignatureSpi$Botan"/>
- <class name="cz.crcs.ectester.standalone.libs.CryptoppLib"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeProvider$Cryptopp"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeKeyPairGeneratorSpi$Cryptopp"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeECPublicKey$Cryptopp"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeECPrivateKey$Cryptopp"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeKeyAgreementSpi$Cryptopp"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeSignatureSpi$Cryptopp"/>
- <class name="cz.crcs.ectester.standalone.libs.OpensslLib"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeProvider$Openssl"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeKeyPairGeneratorSpi$Openssl"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeECPublicKey$Openssl"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeECPrivateKey$Openssl"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeKeyAgreementSpi$Openssl"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeSignatureSpi$Openssl"/>
- <class name="cz.crcs.ectester.standalone.libs.MscngLib"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeProvider$Mscng"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeKeyPairGeneratorSpi$Mscng"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeECPublicKey$Mscng"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeECPrivateKey$Mscng"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeKeyAgreementSpi$Mscng"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeSignatureSpi$Mscng"/>
- <class name="cz.crcs.ectester.standalone.libs.BoringsslLib"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeProvider$Boringssl"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeKeyPairGeneratorSpi$Boringssl"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeECPublicKey$Boringssl"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeECPrivateKey$Boringssl"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeKeyAgreementSpi$Boringssl"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeSignatureSpi$Boringssl"/>
- <class name="cz.crcs.ectester.standalone.libs.GcryptLib"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeProvider$Gcrypt"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeKeyPairGeneratorSpi$Gcrypt"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeECPublicKey$Gcrypt"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeECPrivateKey$Gcrypt"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeKeyAgreementSpi$Gcrypt"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeSignatureSpi$Gcrypt"/>
- <class name="cz.crcs.ectester.standalone.libs.MbedTLSLib"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeProvider$MbedTLS"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeKeyPairGeneratorSpi$MbedTLS"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeECPublicKey$MbedTLS"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeECPrivateKey$MbedTLS"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeKeyAgreementSpi$MbedTLS"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeSignatureSpi$MbedTLS"/>
- <class name="cz.crcs.ectester.standalone.libs.IppcpLib"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeProvider$Ippcp"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeKeyPairGeneratorSpi$Ippcp"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeECPublicKey$Ippcp"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeECPrivateKey$Ippcp"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeKeyAgreementSpi$Ippcp"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeSignatureSpi$Ippcp"/>
- <class name="cz.crcs.ectester.standalone.libs.MatrixsslLib"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeProvider$Matrixssl"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeKeyPairGeneratorSpi$Matrixssl"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeECPublicKey$Matrixssl"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeECPrivateKey$Matrixssl"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeKeyAgreementSpi$Matrixssl"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeSignatureSpi$Matrixssl"/>
- <class name="cz.crcs.ectester.standalone.libs.NettleLib"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeProvider$Nettle"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeKeyPairGeneratorSpi$Nettle"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeECPublicKey$Nettle"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeECPrivateKey$Nettle"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeSignatureSpi$Nettle"/>
- <class name="cz.crcs.ectester.standalone.libs.LibresslLib"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeProvider$Libressl"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeKeyPairGeneratorSpi$Libressl"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeECPublicKey$Libressl"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeECPrivateKey$Libressl"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeKeyAgreementSpi$Libressl"/>
- <class name="cz.crcs.ectester.standalone.libs.jni.NativeSignatureSpi$Libressl"/>
- </javah>
- </target>
-</project>
diff --git a/ext/libressl b/ext/libressl
-Subproject 5a590f8e0c1bb3b3bf7ba02ee7d3ac0c1e09a1a
+Subproject 577970ab842f7e352048d45fe930ddd21f4190f
diff --git a/standalone/build.gradle.kts b/standalone/build.gradle.kts
index 9f645fe..e1113e9 100644
--- a/standalone/build.gradle.kts
+++ b/standalone/build.gradle.kts
@@ -20,10 +20,12 @@ application {
}
tasks.withType<JavaCompile> {
- options.compilerArgs.addAll(arrayOf(
- "--add-modules", "jdk.crypto.ec",
- "--add-exports", "jdk.crypto.ec/sun.security.ec=ALL-UNNAMED"
- ))
+ if (JavaVersion.current() > JavaVersion.VERSION_1_8) {
+ options.compilerArgs.addAll(arrayOf(
+ "--add-modules", "jdk.crypto.ec",
+ "--add-exports", "jdk.crypto.ec/sun.security.ec=ALL-UNNAMED"
+ ))
+ }
}
tasks.register<Exec>("libs") {
diff --git a/standalone/src/main/java/cz/crcs/ectester/standalone/libs/NativeECLibrary.java b/standalone/src/main/java/cz/crcs/ectester/standalone/libs/NativeECLibrary.java
index db85b02..2f469aa 100644
--- a/standalone/src/main/java/cz/crcs/ectester/standalone/libs/NativeECLibrary.java
+++ b/standalone/src/main/java/cz/crcs/ectester/standalone/libs/NativeECLibrary.java
@@ -34,7 +34,11 @@ public abstract class NativeECLibrary extends ProviderECLibrary {
Path libPath = libDir.resolve(resource + "." + suffix);
/* Write the shim. */
- FileUtil.writeNewer(ECTesterStandalone.LIB_RESOURCE_DIR + resource + "." + suffix, libPath);
+ boolean found = FileUtil.writeNewer(ECTesterStandalone.LIB_RESOURCE_DIR + resource + "." + suffix, libPath);
+ if (!found) {
+ //System.err.printf("Resource %s not found.\n", resource);
+ return false;
+ }
/* Load the requirements, if they are bundled, write them in and load them. */
try {
@@ -42,13 +46,19 @@ public abstract class NativeECLibrary extends ProviderECLibrary {
if (requirement.endsWith(suffix)) {
/* The requirement is bundled, write it */
Path reqPath = libReqDir.resolve(requirement);
- FileUtil.writeNewer(ECTesterStandalone.LIB_RESOURCE_DIR + requirement, reqPath);
+ found = FileUtil.writeNewer(ECTesterStandalone.LIB_RESOURCE_DIR + requirement, reqPath);
+ if (!found) {
+ //System.err.printf("Requirement %s not found for %s.\n", requirement, resource);
+ return false;
+ }
System.load(reqPath.toString());
} else {
System.loadLibrary(requirement);
}
}
} catch (UnsatisfiedLinkError ule) {
+ System.err.println(resource);
+ ule.printStackTrace();
return false;
}
@@ -57,6 +67,8 @@ public abstract class NativeECLibrary extends ProviderECLibrary {
provider = createProvider();
return super.initialize();
} catch (IOException | UnsatisfiedLinkError ignored) {
+ System.err.println(resource);
+ ignored.printStackTrace();
}
return false;
}