File tree Expand file tree Collapse file tree 3 files changed +5
-15
lines changed
tst/com/amazon/corretto/crypto/provider/test Expand file tree Collapse file tree 3 files changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ plugins {
14
14
15
15
group = ' software.amazon.cryptools'
16
16
version = ' 2.5.0'
17
- ext. awsLcMainTag = ' v1.44 .0'
17
+ ext. awsLcMainTag = ' v1.45 .0'
18
18
ext. awsLcFipsTag = ' AWS-LC-FIPS-3.0.0'
19
19
ext. isExperimentalFips = Boolean . getBoolean(' EXPERIMENTAL_FIPS' )
20
20
ext. isFips = ext. isExperimentalFips || Boolean . getBoolean(' FIPS' )
Original file line number Diff line number Diff line change @@ -236,21 +236,11 @@ public void documentBouncyCastleDifferences() throws Exception {
236
236
assertThrows (
237
237
InvalidKeyException .class , () -> bcSignature .initSign (finalNativePair .getPrivate ()));
238
238
239
- // ACCP can't use BouncyCastle private keys due to seed/expanded encoding difference
240
- Signature finalNativeSignature = Signature .getInstance ("ML-DSA" , NATIVE_PROVIDER );
241
- final KeyPair finalBcPair = bcPair ;
242
- assertThrows (
243
- InvalidKeyException .class , () -> finalNativeSignature .initSign (finalBcPair .getPrivate ()));
244
-
245
- // However, ACCP can use BouncyCastle public keys
239
+ // However, ACCP can use BouncyCastle KeyPairs with seed-encoded PrivateKeys
246
240
Signature nativeSignature = Signature .getInstance ("ML-DSA" , NATIVE_PROVIDER );
247
- nativeSignature .initSign (nativePair .getPrivate ());
241
+ nativeSignature .initSign (bcPair .getPrivate ());
248
242
byte [] sigBytes = nativeSignature .sign ();
249
- assertNotNull (sigBytes );
250
- PublicKey bcPub =
251
- KeyFactory .getInstance ("ML-DSA" , TestUtil .BC_PROVIDER )
252
- .generatePublic (new X509EncodedKeySpec (nativePair .getPublic ().getEncoded ()));
253
- nativeSignature .initVerify (bcPub );
243
+ nativeSignature .initVerify (bcPair .getPublic ());
254
244
assertTrue (nativeSignature .verify (sigBytes ));
255
245
}
256
246
You can’t perform that action at this time.
0 commit comments