From 6dfee97f58ab8c01bc61a5c9cbcf7224f574e5c1 Mon Sep 17 00:00:00 2001 From: Pushkar Kulkarni Date: Tue, 10 Dec 2024 23:07:14 +0530 Subject: [PATCH 1/2] Remove ED25519 and ED448 tests --- src/test/java/SignatureTest.java | 38 -------------------------- src/test/java/native/EdDSAPrivateKey.c | 35 ------------------------ src/test/java/native/EdDSAPrivateKey.h | 37 ------------------------- src/test/java/native/EdDSAPublicKey.c | 34 ----------------------- src/test/java/native/EdDSAPublicKey.h | 37 ------------------------- src/test/keys/ed25519-priv.pem | 3 -- src/test/keys/ed25519-pub.pem | 3 -- src/test/keys/ed448-priv.pem | 4 --- src/test/keys/ed448-pub.pem | 4 --- 9 files changed, 195 deletions(-) delete mode 100644 src/test/java/native/EdDSAPrivateKey.c delete mode 100644 src/test/java/native/EdDSAPrivateKey.h delete mode 100644 src/test/java/native/EdDSAPublicKey.c delete mode 100644 src/test/java/native/EdDSAPublicKey.h delete mode 100644 src/test/keys/ed25519-priv.pem delete mode 100644 src/test/keys/ed25519-pub.pem delete mode 100644 src/test/keys/ed448-priv.pem delete mode 100644 src/test/keys/ed448-pub.pem diff --git a/src/test/java/SignatureTest.java b/src/test/java/SignatureTest.java index 4da827a..285a638 100644 --- a/src/test/java/SignatureTest.java +++ b/src/test/java/SignatureTest.java @@ -60,18 +60,6 @@ public void testRSA() throws Exception { testSignature("RSA", gen.pubKey, gen.privKey); } - public void testED25519() throws Exception { - EdDSAPublicKey publicKey = new EdDSAPublicKey("src/test/keys/ed25519-pub.pem"); - EdDSAPrivateKey privateKey = new EdDSAPrivateKey("src/test/keys/ed25519-priv.pem"); - testSignature("ED25519", publicKey, privateKey); - } - - public void testED448() throws Exception { - EdDSAPublicKey publicKey = new EdDSAPublicKey("src/test/keys/ed448-pub.pem"); - EdDSAPrivateKey privateKey = new EdDSAPrivateKey("src/test/keys/ed448-priv.pem"); - testSignature("ED448", publicKey, privateKey); - } - private static void testSignature(String algo, PublicKey publicKey, PrivateKey privateKey) throws Exception { Signature signer = Signature.getInstance(algo, "OpenSSLFIPSProvider"); if (algo.equals("RSA")) { @@ -110,32 +98,6 @@ public String getAlgorithm() { return ""; } } - -class EdDSAPublicKey extends TestKey implements OpenSSLPublicKey { - long nativeKey = 0L; - public long getNativeKeyHandle() { - return nativeKey; - } - - EdDSAPublicKey(String filename) { - nativeKey = readPubKeyFromPem0(filename); - } - - native long readPubKeyFromPem0(String filename); -} - -class EdDSAPrivateKey extends TestKey implements OpenSSLPrivateKey { - long nativeKey = 0L; - public long getNativeKeyHandle() { - return nativeKey; - } - - EdDSAPrivateKey(String filename) { - nativeKey = readPrivKeyFromPem0(filename); - } - - native long readPrivKeyFromPem0(String filename); -} class RSAPublicKey extends TestKey implements OpenSSLPublicKey { long nativeKey = 0L; diff --git a/src/test/java/native/EdDSAPrivateKey.c b/src/test/java/native/EdDSAPrivateKey.c deleted file mode 100644 index 4dda747..0000000 --- a/src/test/java/native/EdDSAPrivateKey.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) Canonical, Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ -#include -#include "jssl.h" -#include -#include -#include - -/* - * Class: EdDSAPrivateKey - * Method: readPrivKeyFromPem0 - * Signature: (Ljava/lang/String;)J - */ -JNIEXPORT jlong JNICALL Java_EdDSAPrivateKey_readPrivKeyFromPem0 - (JNIEnv *env, jobject this, jstring filename) { - OSSL_LIB_CTX *libctx = load_openssl_fips_provider("/usr/local/ssl/openssl.cnf"); - char *c_filename = (char*)(*env)->GetStringUTFChars(env, filename, 0); - FILE *pemfile = fopen(c_filename, "r"); - return (jlong)PEM_read_PrivateKey_ex(pemfile, NULL, NULL, NULL, libctx, NULL); -} - diff --git a/src/test/java/native/EdDSAPrivateKey.h b/src/test/java/native/EdDSAPrivateKey.h deleted file mode 100644 index 56f25cf..0000000 --- a/src/test/java/native/EdDSAPrivateKey.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) Canonical, Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* Header for class EdDSAPrivateKey */ - -#ifndef _Included_EdDSAPrivateKey -#define _Included_EdDSAPrivateKey -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: EdDSAPrivateKey - * Method: readPrivKeyFromPem0 - * Signature: (Ljava/lang/String;)J - */ -JNIEXPORT jlong JNICALL Java_EdDSAPrivateKey_readPrivKeyFromPem0 - (JNIEnv *, jobject, jstring); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/src/test/java/native/EdDSAPublicKey.c b/src/test/java/native/EdDSAPublicKey.c deleted file mode 100644 index 280e9c8..0000000 --- a/src/test/java/native/EdDSAPublicKey.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) Canonical, Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ -#include -#include "jssl.h" -#include -#include -#include - -/* - * Class: EdDSAPublicKey - * Method: readPubKeyFromPem0 - * Signature: (Ljava/lang/String;)J - */ -JNIEXPORT jlong JNICALL Java_EdDSAPublicKey_readPubKeyFromPem0 - (JNIEnv *env, jobject this, jstring filename) { - OSSL_LIB_CTX *libctx = load_openssl_fips_provider("/usr/local/ssl/openssl.cnf"); - char *c_filename = (char*)(*env)->GetStringUTFChars(env, filename, 0); - FILE *pemfile = fopen(c_filename, "r"); - return (jlong)PEM_read_PUBKEY_ex(pemfile, NULL, NULL, NULL, libctx, NULL); -} diff --git a/src/test/java/native/EdDSAPublicKey.h b/src/test/java/native/EdDSAPublicKey.h deleted file mode 100644 index 433b9f7..0000000 --- a/src/test/java/native/EdDSAPublicKey.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) Canonical, Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* Header for class EdDSAPublicKey */ - -#ifndef _Included_EdDSAPublicKey -#define _Included_EdDSAPublicKey -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: EdDSAPublicKey - * Method: readPubKeyFromPem0 - * Signature: (Ljava/lang/String;)J - */ -JNIEXPORT jlong JNICALL Java_EdDSAPublicKey_readPubKeyFromPem0 - (JNIEnv *, jobject, jstring); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/src/test/keys/ed25519-priv.pem b/src/test/keys/ed25519-priv.pem deleted file mode 100644 index 0267945..0000000 --- a/src/test/keys/ed25519-priv.pem +++ /dev/null @@ -1,3 +0,0 @@ ------BEGIN PRIVATE KEY----- -MC4CAQAwBQYDK2VwBCIEIJZKwlAyNlUV6ecTWWPp5RrHbf2PdVyvtBV6EgDRvnKu ------END PRIVATE KEY----- diff --git a/src/test/keys/ed25519-pub.pem b/src/test/keys/ed25519-pub.pem deleted file mode 100644 index 60ea25c..0000000 --- a/src/test/keys/ed25519-pub.pem +++ /dev/null @@ -1,3 +0,0 @@ ------BEGIN PUBLIC KEY----- -MCowBQYDK2VwAyEAOm0WG1Lioi7S9E0LwkMc78qmFwyMEVLmZV085WPHBfY= ------END PUBLIC KEY----- diff --git a/src/test/keys/ed448-priv.pem b/src/test/keys/ed448-priv.pem deleted file mode 100644 index 4347639..0000000 --- a/src/test/keys/ed448-priv.pem +++ /dev/null @@ -1,4 +0,0 @@ ------BEGIN PRIVATE KEY----- -MEcCAQAwBQYDK2VxBDsEOZqxyBaO09mj2wFRf3bxs7mrha57YQHbzZuWSQ9xAJL9 -DVAI1nm8v4aLyAw5dHY1M0pyWkljLZhJsg== ------END PRIVATE KEY----- diff --git a/src/test/keys/ed448-pub.pem b/src/test/keys/ed448-pub.pem deleted file mode 100644 index 99b3790..0000000 --- a/src/test/keys/ed448-pub.pem +++ /dev/null @@ -1,4 +0,0 @@ ------BEGIN PUBLIC KEY----- -MEMwBQYDK2VxAzoANVXVsWaulD2UiwztSXhCvPbdcyh9Gvz8ahuxgGq6JOWGRkKU -i07obiXT99ZDwK5Ln36xM9VIxPaA ------END PUBLIC KEY----- From 1700f98435640fdebfae61b1880a0a3040289e4c Mon Sep 17 00:00:00 2001 From: Pushkar Kulkarni Date: Wed, 11 Dec 2024 14:58:37 +0530 Subject: [PATCH 2/2] Better unit tests for Signatures --- src/test/java/SignatureTest.java | 180 +++++++++++++++++++++++-- src/test/java/native/RSAPrivateKey.c | 35 +++++ src/test/java/native/RSAPrivateKey.h | 37 +++++ src/test/java/native/RSAPublicKey.c | 34 +++++ src/test/java/native/RSAPublicKey.h | 37 +++++ src/test/keys/rsa16384-priv.pem | 195 +++++++++++++++++++++++++++ src/test/keys/rsa16384-pub.pem | 45 +++++++ src/test/keys/rsa4096-priv.pem | 51 +++++++ src/test/keys/rsa4096-pub.pem | 13 ++ src/test/keys/rsa8192-priv.pem | 99 ++++++++++++++ src/test/keys/rsa8192-pub.pem | 24 ++++ 11 files changed, 739 insertions(+), 11 deletions(-) create mode 100644 src/test/java/native/RSAPrivateKey.c create mode 100644 src/test/java/native/RSAPrivateKey.h create mode 100644 src/test/java/native/RSAPublicKey.c create mode 100644 src/test/java/native/RSAPublicKey.h create mode 100644 src/test/keys/rsa16384-priv.pem create mode 100644 src/test/keys/rsa16384-pub.pem create mode 100644 src/test/keys/rsa4096-priv.pem create mode 100644 src/test/keys/rsa4096-pub.pem create mode 100644 src/test/keys/rsa8192-priv.pem create mode 100644 src/test/keys/rsa8192-pub.pem diff --git a/src/test/java/SignatureTest.java b/src/test/java/SignatureTest.java index 285a638..6c33453 100644 --- a/src/test/java/SignatureTest.java +++ b/src/test/java/SignatureTest.java @@ -36,6 +36,7 @@ import org.junit.Test; import org.junit.BeforeClass; import static org.junit.Assert.assertTrue; +import static org.junit.Assert.assertFalse; public class SignatureTest { static { @@ -54,29 +55,174 @@ public class SignatureTest { + "Etruscan mythology as Apulu."; @Test - public void testRSA() throws Exception { + public void testRSABasic() throws Exception { RSAKeyPairGenerator gen = new RSAKeyPairGenerator(); gen.generateKeyPair(); - testSignature("RSA", gen.pubKey, gen.privKey); + + PublicKey publicKey = gen.pubKey; + PrivateKey privateKey = gen.privKey; + + Signature signer = Signature.getInstance("RSA", "OpenSSLFIPSProvider"); + signer.setParameter("digest", "SHA-256"); // TODO: why does this work only with SHA-256? + signer.initSign(privateKey); + byte[] bytes = message.getBytes(); + signer.update(bytes, 0, bytes.length); + byte[] sigBytes = signer.sign(); + + Signature verifier = Signature.getInstance("RSA", "OpenSSLFIPSProvider"); + verifier.setParameter("digest", "SHA-256"); + verifier.initVerify(publicKey); + verifier.update(bytes, 0, bytes.length); + + assertTrue("SignatureTest for RSA failed.", verifier.verify(sigBytes)); } - private static void testSignature(String algo, PublicKey publicKey, PrivateKey privateKey) throws Exception { - Signature signer = Signature.getInstance(algo, "OpenSSLFIPSProvider"); - if (algo.equals("RSA")) { - signer.setParameter("digest", "SHA-256"); // TODO: why does this work only with SHA-256? - } + @Test + public void testRSAwithMultipleUpdates() throws Exception { + PublicKey publicKey = new RSAPublicKey("src/test/keys/rsa16384-pub.pem"); + PrivateKey privateKey = new RSAPrivateKey("src/test/keys/rsa16384-priv.pem"); + + Signature signer = Signature.getInstance("RSA", "OpenSSLFIPSProvider"); + signer.setParameter("digest", "SHA-256"); signer.initSign(privateKey); byte[] bytes = message.getBytes(); signer.update(bytes, 0, bytes.length); + signer.update(bytes, 2, bytes.length-2); + signer.update(bytes, 3, bytes.length-3); byte[] sigBytes = signer.sign(); - Signature verifier = Signature.getInstance(algo, "OpenSSLFIPSProvider"); - if (algo.equals("RSA")) { - verifier.setParameter("digest", "SHA-256"); + Signature verifier = Signature.getInstance("RSA", "OpenSSLFIPSProvider"); + verifier.setParameter("digest", "SHA-256"); + verifier.initVerify(publicKey); + verifier.update(bytes, 0, bytes.length); + verifier.update(bytes, 2, bytes.length-2); + verifier.update(bytes, 3, bytes.length-3); + + assertTrue("SignatureTest with multiple updates for RSA failed.", verifier.verify(sigBytes)); + } + + @Test + public void testRSAsingleByteUpdates() throws Exception { + RSAKeyPairGenerator gen = new RSAKeyPairGenerator(); + gen.generateKeyPair(); + + PublicKey publicKey = gen.pubKey; + PrivateKey privateKey = gen.privKey; + + Signature signer = Signature.getInstance("RSA", "OpenSSLFIPSProvider"); + signer.setParameter("digest", "SHA-256"); + signer.initSign(privateKey); + byte[] bytes = message.getBytes(); + + for (var b : bytes) { + signer.update(b); } + byte[] sigBytes = signer.sign(); + + Signature verifier = Signature.getInstance("RSA", "OpenSSLFIPSProvider"); + verifier.setParameter("digest", "SHA-256"); + verifier.initVerify(publicKey); + verifier.update(bytes, 0, bytes.length); + + assertTrue("RSA SignatureTest with byte updates failed.", verifier.verify(sigBytes)); + } + + @Test + public void testRSAmultipleByteBufferUpdates() throws Exception { + PublicKey publicKey = new RSAPublicKey("src/test/keys/rsa8192-pub.pem"); + PrivateKey privateKey = new RSAPrivateKey("src/test/keys/rsa8192-priv.pem"); + + Signature signer = Signature.getInstance("RSA", "OpenSSLFIPSProvider"); + signer.setParameter("digest", "SHA-256"); + signer.initSign(privateKey); + byte[] bytes = message.getBytes(); + signer.update(ByteBuffer.wrap(message.getBytes())); + byte[] sigBytes = signer.sign(); + + Signature verifier = Signature.getInstance("RSA", "OpenSSLFIPSProvider"); + verifier.setParameter("digest", "SHA-256"); verifier.initVerify(publicKey); verifier.update(bytes, 0, bytes.length); - assertTrue("SignatureTest for " + algo + " failed.", verifier.verify(sigBytes)); + + assertTrue("RSA SignatureTest with ByteBuffer updates failed.", verifier.verify(sigBytes)); + } + + @Test + public void testRSAsignNonzeroOffset() throws Exception { + PublicKey publicKey = new RSAPublicKey("src/test/keys/rsa4096-pub.pem"); + PrivateKey privateKey = new RSAPrivateKey("src/test/keys/rsa4096-priv.pem"); + + byte[] sigBytes = new byte[612]; + Signature signer = Signature.getInstance("RSA", "OpenSSLFIPSProvider"); + signer.setParameter("digest", "SHA-256"); + signer.initSign(privateKey); + byte[] bytes = message.getBytes(); + signer.update(ByteBuffer.wrap(message.getBytes())); + signer.sign(sigBytes, 100, 512); + + Signature verifier = Signature.getInstance("RSA", "OpenSSLFIPSProvider"); + verifier.setParameter("digest", "SHA-256"); + verifier.initVerify(publicKey); + verifier.update(bytes, 0, bytes.length); + + assertTrue("RSA SignatureTest with non-zero offset failed.", verifier.verify(sigBytes, 100, 512)); + } + + @Test + public void testRSAtamperedSignature() throws Exception { + RSAKeyPairGenerator gen = new RSAKeyPairGenerator(); + gen.generateKeyPair(); + + PublicKey publicKey = gen.pubKey; + PrivateKey privateKey = gen.privKey; + + Signature signer = Signature.getInstance("RSA", "OpenSSLFIPSProvider"); + signer.setParameter("digest", "SHA-256"); + signer.initSign(privateKey); + byte[] bytes = message.getBytes(); + + for (var b : bytes) { + signer.update(b); + } + byte[] sigBytes = signer.sign(); + + Signature verifier = Signature.getInstance("RSA", "OpenSSLFIPSProvider"); + verifier.setParameter("digest", "SHA-256"); + verifier.initVerify(publicKey); + verifier.update(bytes, 0, bytes.length); + + // tamper signature + sigBytes[0] += 1; + + assertFalse("RSA SignatureTest with tampered signature failed.", verifier.verify(sigBytes)); + } + + @Test + public void testRSAtamperedContent() throws Exception { + RSAKeyPairGenerator gen = new RSAKeyPairGenerator(); + gen.generateKeyPair(); + + PublicKey publicKey = gen.pubKey; + PrivateKey privateKey = gen.privKey; + + Signature signer = Signature.getInstance("RSA", "OpenSSLFIPSProvider"); + signer.setParameter("digest", "SHA-256"); + signer.initSign(privateKey); + byte[] bytes = message.getBytes(); + + for (var b : bytes) { + signer.update(b); + } + byte[] sigBytes = signer.sign(); + + // tamper content + bytes[0] += 1; + Signature verifier = Signature.getInstance("RSA", "OpenSSLFIPSProvider"); + verifier.setParameter("digest", "SHA-256"); + verifier.initVerify(publicKey); + verifier.update(bytes, 0, bytes.length); + + assertFalse("RSA SignatureTest with tampered content failed.", verifier.verify(sigBytes)); } @BeforeClass @@ -106,9 +252,15 @@ public RSAPublicKey(long nativeKey) { this.nativeKey = nativeKey; } + public RSAPublicKey(String filename) { + this.nativeKey = readPubKeyFromPem0(filename); + } + public long getNativeKeyHandle() { return nativeKey; } + + native long readPubKeyFromPem0(String filename); } class RSAPrivateKey extends TestKey implements OpenSSLPrivateKey { @@ -118,9 +270,15 @@ public RSAPrivateKey(long nativeKey) { this.nativeKey = nativeKey; } + public RSAPrivateKey(String filename) { + this.nativeKey = readPrivKeyFromPem0(filename); + } + public long getNativeKeyHandle() { return nativeKey; } + + native long readPrivKeyFromPem0(String filename); } class RSAKeyPairGenerator { diff --git a/src/test/java/native/RSAPrivateKey.c b/src/test/java/native/RSAPrivateKey.c new file mode 100644 index 0000000..8f1656f --- /dev/null +++ b/src/test/java/native/RSAPrivateKey.c @@ -0,0 +1,35 @@ +/* + * Copyright (C) Canonical, Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 3. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#include +#include "jssl.h" +#include +#include +#include + +/* + * Class: RSAPrivateKey + * Method: readPrivKeyFromPem0 + * Signature: (Ljava/lang/String;)J + */ +JNIEXPORT jlong JNICALL Java_RSAPrivateKey_readPrivKeyFromPem0 + (JNIEnv *env, jobject this, jstring filename) { + OSSL_LIB_CTX *libctx = load_openssl_fips_provider("/usr/local/ssl/openssl.cnf"); + char *c_filename = (char*)(*env)->GetStringUTFChars(env, filename, 0); + FILE *pemfile = fopen(c_filename, "r"); + return (jlong)PEM_read_PrivateKey_ex(pemfile, NULL, NULL, NULL, libctx, NULL); +} + diff --git a/src/test/java/native/RSAPrivateKey.h b/src/test/java/native/RSAPrivateKey.h new file mode 100644 index 0000000..b72d41d --- /dev/null +++ b/src/test/java/native/RSAPrivateKey.h @@ -0,0 +1,37 @@ +/* + * Copyright (C) Canonical, Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 3. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class RSAPrivateKey */ + +#ifndef _Included_RSAPrivateKey +#define _Included_RSAPrivateKey +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: RSAPrivateKey + * Method: readPrivKeyFromPem0 + * Signature: (Ljava/lang/String;)J + */ +JNIEXPORT jlong JNICALL Java_RSAPrivateKey_readPrivKeyFromPem0 + (JNIEnv *, jobject, jstring); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/test/java/native/RSAPublicKey.c b/src/test/java/native/RSAPublicKey.c new file mode 100644 index 0000000..0cb52e3 --- /dev/null +++ b/src/test/java/native/RSAPublicKey.c @@ -0,0 +1,34 @@ +/* + * Copyright (C) Canonical, Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 3. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#include +#include "jssl.h" +#include +#include +#include + +/* + * Class: RSAPublicKey + * Method: readPubKeyFromPem0 + * Signature: (Ljava/lang/String;)J + */ +JNIEXPORT jlong JNICALL Java_RSAPublicKey_readPubKeyFromPem0 + (JNIEnv *env, jobject this, jstring filename) { + OSSL_LIB_CTX *libctx = load_openssl_fips_provider("/usr/local/ssl/openssl.cnf"); + char *c_filename = (char*)(*env)->GetStringUTFChars(env, filename, 0); + FILE *pemfile = fopen(c_filename, "r"); + return (jlong)PEM_read_PUBKEY_ex(pemfile, NULL, NULL, NULL, libctx, NULL); +} diff --git a/src/test/java/native/RSAPublicKey.h b/src/test/java/native/RSAPublicKey.h new file mode 100644 index 0000000..6363d5d --- /dev/null +++ b/src/test/java/native/RSAPublicKey.h @@ -0,0 +1,37 @@ +/* + * Copyright (C) Canonical, Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 3. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class RSAPublicKey */ + +#ifndef _Included_RSAPublicKey +#define _Included_RSAPublicKey +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: RSAPublicKey + * Method: readPubKeyFromPem0 + * Signature: (Ljava/lang/String;)J + */ +JNIEXPORT jlong JNICALL Java_RSAPublicKey_readPubKeyFromPem0 + (JNIEnv *, jobject, jstring); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/test/keys/rsa16384-priv.pem b/src/test/keys/rsa16384-priv.pem new file mode 100644 index 0000000..07b26bc --- /dev/null +++ b/src/test/keys/rsa16384-priv.pem @@ -0,0 +1,195 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIkJwIBAAKCCAEAt76aq11plFKjZwy6FFA1iop/t8HxdEjQ+1J94WYRjRjVRk3B +iv2cBaOitebzGxl7EWSZWrZYJEXpLTQo5237BTEbmuGTPOEF4z7L/5wY0a5XDChj +4BcnM3IPdfOCHMHTDuGz9wruznzyN3pH7l+2ZZ8BFy4bmxQhXq+hZTVCljbeE8b5 +5M7kLfICTSlFaCTS49E6CToa5yYMGkg+BguZjxTX/ePsPHIfZE6nA8UhGvoiLb9Z +/aYIhEAct5Ms7ZI7PETd6PieDd2QqGjpICP2YTebPmFF7QPIIeEnsDmYsJv1CAwL +fZFUX+kuzlD2do5fYkML0+YdxjFvFRwW2BAM/MpOeRUgDB/hJCsUYnK5qiBH0tkB +sTRq2xR/Lg57cRkGblDqlUbtK4V2ucPt1+Zr8RzpTa8ovpNb79KibPabDGekK19t +6/jAhk/pvK/he8TTF/pF6pkYHHKQPMRGZ2Us/Dr8jbNuNQpEIwJHvyJPk+wvkFPr +NbIqqiUMbciKTKYEKExoBjhmteTFJh9xGCCpgyroQJimnDnob67/r1/m2TlbGCWE +ff7RdiDfwKVVtt09ukHVfQWpY0yW9n1cLTbbNNtWkeDdLvmyiTaDKD1xmCUA5Map +cuYXfWHwKoGIf2YMgvUuBSqR44jzbZQNBz/lYeRhjicw2Ik9ZAHlpfNnhHsav6s/ +ZQmF/ye2D4gmApY3JovYuGAkQicBO5hFN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nW2qnAF+SP0WMzRRPsQ== +-----END RSA PRIVATE KEY----- diff --git a/src/test/keys/rsa16384-pub.pem b/src/test/keys/rsa16384-pub.pem new file mode 100644 index 0000000..0861ea8 --- /dev/null +++ b/src/test/keys/rsa16384-pub.pem @@ -0,0 +1,45 @@ +-----BEGIN RSA PUBLIC KEY----- +MIIICgKCCAEAt76aq11plFKjZwy6FFA1iop/t8HxdEjQ+1J94WYRjRjVRk3Biv2c +BaOitebzGxl7EWSZWrZYJEXpLTQo5237BTEbmuGTPOEF4z7L/5wY0a5XDChj4Bcn +M3IPdfOCHMHTDuGz9wruznzyN3pH7l+2ZZ8BFy4bmxQhXq+hZTVCljbeE8b55M7k +LfICTSlFaCTS49E6CToa5yYMGkg+BguZjxTX/ePsPHIfZE6nA8UhGvoiLb9Z/aYI +hEAct5Ms7ZI7PETd6PieDd2QqGjpICP2YTebPmFF7QPIIeEnsDmYsJv1CAwLfZFU +X+kuzlD2do5fYkML0+YdxjFvFRwW2BAM/MpOeRUgDB/hJCsUYnK5qiBH0tkBsTRq +2xR/Lg57cRkGblDqlUbtK4V2ucPt1+Zr8RzpTa8ovpNb79KibPabDGekK19t6/jA +hk/pvK/he8TTF/pF6pkYHHKQPMRGZ2Us/Dr8jbNuNQpEIwJHvyJPk+wvkFPrNbIq +qiUMbciKTKYEKExoBjhmteTFJh9xGCCpgyroQJimnDnob67/r1/m2TlbGCWEff7R +diDfwKVVtt09ukHVfQWpY0yW9n1cLTbbNNtWkeDdLvmyiTaDKD1xmCUA5MapcuYX +fWHwKoGIf2YMgvUuBSqR44jzbZQNBz/lYeRhjicw2Ik9ZAHlpfNnhHsav6s/ZQmF +/ye2D4gmApY3JovYuGAkQicBO5hFNIb5xb6iOa21eOYqdtLz2NXNo0IU8xiY5DT8 +3m7FfQAGy+DVXAPGWC4R8FbBahcT4in7vcwchJn25AcP0uTNd7jIpsVztSoOMOUx +rGX3s01UHeErwSGw+789ZSuTWNKFEi/zSOtWqupFbNqpvQ9YVTlC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fLzj35/gYBJm9f0RCrLWKMx6thCzfa1TvVHc1xohp +rtviwR50qvjxnbWQVJ3YzHsx+7sBW8MZm6ry3xmXJhw0KIh457qsk8IF2KdwAU+h +bjODdKw1GSkGcT1xQuyeNNL/HDI+oF5eFgZfkbFdQA1g5T/EELY0iRU/uk6D/Uqy +aWOK5+IUI5ybpABbtDp3KJo07aVMJVLAfwtzYQ0APRiAuzeWYqhcBx0G0zdHxlRe +bkAdyuWcLo/7sZV3J1wQdvcym3JW2Wbw6/BS8Z8dtzH8uChw1AaVzBDewtxLmij2 +LSBSmZHw4R0C72LNUGwpI0dOMSx5llw1wEEgz3ahrRkJR8nZ0WZ+xgigp4l+5F3Y +E1D4t6YafM/NdyXuyLKSuJUKeM5ic8wTsYkmM8oOUhUmNOPzf7wtjv4odCvjd/Ys +EU2/X+p8GHAsq71+1GnbZFEk2Hdjh77RpuX88BvkK99sOHjJdW6tq1C04IJB4Pig +q7Srta2UUPi/YbRdyH00/P1NSZn6nSOMfDGZ7CnkblYB9KLbBglIUxOtV1i+PkmF +5woADCG7UIdiQVB/s6QMy2tPu0/1e1cgC1/2uP/qcngr+eLEN3Bqq/SC2y+fCdYZ +gcl+tI9pJalZWIWDNvoUVPCbaBwyobz2LvBorMpX5VkR+39gpsb4Ib4BxPdzlpF2 +Kysw3D2KpIYnNRGDHhTxZ418svxm6yisrLxZEj6P0e8RafoCeJDMRnkhSIrDHU0P +Ew0j+mvpMP/X0MqnN6Tt8OB9ol8cmLcFKrA1gNG21N20N9ODVnf4YZsCAwEAAQ== +-----END RSA PUBLIC KEY----- diff --git a/src/test/keys/rsa4096-priv.pem b/src/test/keys/rsa4096-priv.pem new file mode 100644 index 0000000..bf61ff9 --- /dev/null +++ b/src/test/keys/rsa4096-priv.pem @@ -0,0 +1,51 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIJKgIBAAKCAgEAyffCsCX+I6ZLEgTI1kg18BF1kxEPiB1XY5Iv3ifPzSkOtObU +YVAEDIaYnwJN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+udNbl4mxqNDJLv3jCevl0yx9e4QMpFgPlvE2wp6AZ8oFv+blaUgqiNEYtifPXkVH +TsCk5Q2nXXV/rHEUGBZhdVCOUCMvTNWkPeRgFDXUhzYP8u+RV4+uBRwTx6c2oPxV +w73Z+ISbS0odhvapEgwqOk9P4aeILGtkRk0NnuR9kZ4hCQR7ys8PgYHIuu+gNp7k +lpwNDgMWK2KhkO5Lm9BlVoRVlu9q7Lp/xiNj24P+CuyPyNnM30x2dT+pdeAqpqs+ +uV9w2QKCAQEAkms/rJaeo32mEqQWksnQwWGwjGbZ+xzNv8dYngdT/XbTaHmu1S1/ +3DyfCWR2sF/VlROOC72lDxFcL/ZmCbg9O3LcZCf1JmGvv0aObDwWhnPf2inICa2Y +vLHQ1PhNmXyLxrRcG0ejo8XdIQvVVhC4rN1rDvSj8aFHwN7alt0Wp+ORH8rH7rtH +8w8qN8sIZJBjrgSQdE3I7M0+7MdX1iDZ/gFVGhk5uiXYURctI0bjR7W4nZdonYZf +U4biGtBB+YUecKs+hppRpYm34h9ZWo+qNVoC9QAZIN78znkrOJp/loVKaYkXVS5K +HJCD6Y4YeVA3fNbWlHhywYz8OP4R77hpHwKCAQEA7NPrvoOnABtnHqs9pjJZaEb+ +VQCYTNltHkOGUIB7oDoUv+m5FnnGZDJ2GT+kCWsga9fdvqx9pECPsc8UpTMgj/JI +1nO218es4khOtodB/QZN7sJk6C7Am2weziSKAA8p9OhRRmbCy9FWYO6hmTQlrNrU +5Ihtz6D2vo/naCqL4lP29O1zJNo5eBF+Wje+SW0HXNUmRQD8I0D12viX8jeDPQ6j +b0nQSr7b6adBAhReSmGQpAYREogtLUdVM4ys0dpmy/4QyrvjuVPy8SKam2+3OzPk +dwZM04ZcZBhHGZHEw2TRJELmOpTGZUu981JRhvQfG/Gmv/zry9HbyvZoYAcnsg== +-----END RSA PRIVATE KEY----- diff --git a/src/test/keys/rsa4096-pub.pem b/src/test/keys/rsa4096-pub.pem new file mode 100644 index 0000000..890b5a4 --- /dev/null +++ b/src/test/keys/rsa4096-pub.pem @@ -0,0 +1,13 @@ +-----BEGIN RSA PUBLIC KEY----- +MIICCgKCAgEAyffCsCX+I6ZLEgTI1kg18BF1kxEPiB1XY5Iv3ifPzSkOtObUYVAE +DIaYnwJNW/GPqmpo0N2Xh4c3GjdhMuE0jdK3qNoUXpbd4trO7l1GkXZfaw2XE1z1 +xclfF3ayYoPpzI4LI5vQ0FiZemWnozxb2n6+MnavDf/t2kxIbp6o1m9D1VQU2dY+ +fUFBx6QkCRtZvHPSRy6RIlpgmFh86EE7eQnp7sMoeoqn6MfzHJ170G3CldXD1pIB +yvJQ9UxRh8zfqRTP8t/mn4bcrKgCd6ubXs22BKKc9GgQCwzc5WpMxB6CXJyaYlJp +mc+M96hB0hfHR3UfSffGFANSIvbuTAQwK84vZ5XQKuCzi6PCZ3r8tLmH8ILBnIe0 +9wCjxpR26AXHvZHzLzfuU82ISO1oxeCHzHvVZaBqqPDFJR0QBRDiqDpp0Uc5ChuS +HewT1XoOULNNE5y60ygIneg7F9QI9ewgbEn/u+NnwImbqEkRq8+3dvyYJT59z1ZK +RwjE9vYbqUvzJDHJFauzB2TbjMjE17fQDZyda2QWUedU5SpxXYmSgS2+yOWqFPwl +1DNxfK7yeZ0W4s84TL02UwLX/nP88+IfF+uvbUG/3znmGb00ijAGgZKzoTQw/E/8 +qzA0xBGfZ0lSbsDrYDf+PmSLmNb9WKGiMPiXdgRkFQVEATKBMYNGDZMCAwEAAQ== +-----END RSA PUBLIC KEY----- diff --git a/src/test/keys/rsa8192-priv.pem b/src/test/keys/rsa8192-priv.pem new file mode 100644 index 0000000..f05d15d --- /dev/null +++ b/src/test/keys/rsa8192-priv.pem @@ -0,0 +1,99 @@ +-----BEGIN RSA PRIVATE KEY----- +MIISKAIBAAKCBAEA4pOMJstHRdtF7xhKYcLqf3+AeXepvFduP5doKMC8fPQmiTkT +gBxkWh4CRlc9Y/QyQHj5kWDBrSyC1/PrQUuamwR2xpAS/FEmHpYdtQ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NaRi1k +dSciNodsj1K5g+lWsBQQuHj6kwEDuJPICSiXAXgl/wqj3Dn2IU+JQpBcgShzuxvj +4InRnIZyK8C7b1XyOMuG/7niaA+jV0KoyiR5eiiUHstJzsaP0PwkBcCOtzAHrN/c +/93b8JU/q10CggIATvXOiApgXYjkGOq7xCQRKpE6tZVSHlL0OSS0MVADzXqWPkEC +fcgQAC17WJ+1gs9H/XFDfs42YzcjgZJ27Vcrc1GeopQohBhjXBRI5HDBkuHnNupy +EMnsOxu5I1lFPng7pnGiD94gei9Q2LS68OKZpoLJJhlxDerr3f57cECSl4rhbsmx +8o9Iezx42TpF3uX/ZBiQPLkDNY2ZzqmL5I3RPG92QVC/YfofBhLuzVe/EIqdzhUC +dJqe4QtppDyRvMSrNyYBeLjJyBHAYdmpYFbI1DS8Wc00OGzdoCG7aAWMkMxQf2ea +MOjmf2PxWbjjpKiSPeP29OFzluhEvfv+4brRSIMoDec8rre90oGvCygdMqJ6n8DB +k8qPJQ/pgwKtsnlD0OAzDKRiwx1LMCDBC8t0uHrOM0RM6xHAvWCsuGzlECDQ412q +iRY860vVSHImmsz78DiHjElsYEtFIfj9aWVe9atRRKtwb1x7ET4TZ5tmc9e8unD0 +p3RZT5hRiO6QqQ2hzpCZiHBVYerPnGFyIht62t2jkKPXTvGH/rj8VsM98YIlhZIx +21sUNgB0xC0b97YEAAlzhOjVvtHs/qizRxCWvj2A6Kss33k6BUIAE9eq2yrnDLMY +KjZmL2YU8Zxk5n8WmSLiCMufs4HyHux2fjzVO/ZCB45ilqHpXp3Mq5w4HII= +-----END RSA PRIVATE KEY----- diff --git a/src/test/keys/rsa8192-pub.pem b/src/test/keys/rsa8192-pub.pem new file mode 100644 index 0000000..69a42a0 --- /dev/null +++ b/src/test/keys/rsa8192-pub.pem @@ -0,0 +1,24 @@ +-----BEGIN RSA PUBLIC KEY----- +MIIECgKCBAEA4pOMJstHRdtF7xhKYcLqf3+AeXepvFduP5doKMC8fPQmiTkTgBxk +Wh4CRlc9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