Skip to content

Commit b94f30b

Browse files
authored
Merge pull request #131 from cconlon/rsaPss
Add RSA-PSS support to JNI wrapper and JCE Signature class
2 parents 3a3f0c7 + 5a4e76e commit b94f30b

17 files changed

+3633
-99
lines changed

README_JCE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@ The JCE provider currently supports the following algorithms:
139139
SHA3-256withRSA
140140
SHA3-384withRSA
141141
SHA3-512withRSA
142+
RSASSA-PSS
143+
SHA224withRSA/PSS
144+
SHA256withRSA/PSS
145+
SHA384withRSA/PSS
146+
SHA512withRSA/PSS
142147
SHA1withECDSA
143148
SHA224withECDSA
144149
SHA256withECDSA
@@ -164,6 +169,7 @@ The JCE provider currently supports the following algorithms:
164169

165170
KeyPairGenerator Class
166171
RSA
172+
RSASSA-PSS
167173
EC
168174
DH
169175

@@ -184,6 +190,9 @@ The JCE provider currently supports the following algorithms:
184190
KeyStore
185191
WKS
186192

193+
AlgorithmParameters
194+
RSASSA-PSS
195+
187196
### SecureRandom.getInstanceStrong()
188197

189198
When registered as the highest priority security provider, wolfJCE will provide

jni/include/com_wolfssl_wolfcrypt_FeatureDetect.h

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jni/include/com_wolfssl_wolfcrypt_Rsa.h

Lines changed: 60 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jni/jni_feature_detect.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,18 @@ JNIEXPORT jboolean JNICALL Java_com_wolfssl_wolfcrypt_FeatureDetect_RsaKeyGenEna
496496
#endif
497497
}
498498

499+
JNIEXPORT jboolean JNICALL Java_com_wolfssl_wolfcrypt_FeatureDetect_RsaPssEnabled
500+
(JNIEnv* env, jclass jcl)
501+
{
502+
(void)env;
503+
(void)jcl;
504+
#if !defined(NO_RSA) && defined(WC_RSA_PSS)
505+
return JNI_TRUE;
506+
#else
507+
return JNI_FALSE;
508+
#endif
509+
}
510+
499511
JNIEXPORT jboolean JNICALL Java_com_wolfssl_wolfcrypt_FeatureDetect_DhEnabled
500512
(JNIEnv* env, jclass jcl)
501513
{

0 commit comments

Comments
 (0)