Add CI/CD tests using Github Actions.
The tests compile and run the applet in the jcardsim Javacard simulator. ECDSA signature tests are performed using OpenPGPpy, other tests such as AES are performed using the local bin/smartpgp-cli script. TODO: add tests for RSA, asymmetric encryption, pin modifications, secure messaging (if well supported by jcardsim), etc.
This commit is contained in:
committed by
Arnaud Fontaine
parent
4fbafe513b
commit
0b43929a83
20
.github/workflows/jcardsim_patches/jcardsim_random_patch
vendored
Normal file
20
.github/workflows/jcardsim_patches/jcardsim_random_patch
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
diff --git a/src/main/java/com/licel/jcardsim/crypto/SecureRandomNullProvider.java b/src/main/java/com/licel/jcardsim/crypto/SecureRandomNullProvider.java
|
||||
index f4cca44..70d41a3 100644
|
||||
--- a/src/main/java/com/licel/jcardsim/crypto/SecureRandomNullProvider.java
|
||||
+++ b/src/main/java/com/licel/jcardsim/crypto/SecureRandomNullProvider.java
|
||||
@@ -32,7 +32,14 @@ class SecureRandomNullProvider extends SecureRandom {
|
||||
}
|
||||
@Override
|
||||
protected void engineNextBytes(byte[] arg) {
|
||||
- engine.nextBytes(arg);
|
||||
+ final String doSecureRandom = System.getProperty("com.licel.jcardsim.randomdata.secure", "0");
|
||||
+ if ("1".equals(doSecureRandom)){
|
||||
+ SecureRandom randomGenerator = new SecureRandom();
|
||||
+ randomGenerator.nextBytes(arg);
|
||||
+ }
|
||||
+ else{
|
||||
+ engine.nextBytes(arg);
|
||||
+ }
|
||||
}
|
||||
@Override
|
||||
protected byte[] engineGenerateSeed(int len) {
|
Reference in New Issue
Block a user