Skip to content

Commit 3b0be50

Browse files
committed
moved nonce generator method to GCMFipsUtil class (avoid dup in Java 9 tree).
1 parent ed1208c commit 3b0be50

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package org.bouncycastle.tls.crypto.impl.jcajce;
2+
3+
import org.bouncycastle.tls.crypto.impl.AEADNonceGeneratorFactory;
4+
5+
class GCMFipsUtil
6+
{
7+
static AEADNonceGeneratorFactory getDefaultFipsGCMNonceGeneratorFactory()
8+
{
9+
return null;
10+
}
11+
}

tls/src/main/java/org/bouncycastle/tls/crypto/impl/jcajce/GCMUtil.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import java.security.PrivilegedExceptionAction;
77
import java.security.spec.AlgorithmParameterSpec;
88

9-
import org.bouncycastle.tls.crypto.impl.AEADNonceGeneratorFactory;
109
import org.bouncycastle.util.Integers;
1110

1211
class GCMUtil
@@ -31,11 +30,6 @@ public AlgorithmParameterSpec run()
3130
});
3231
}
3332

34-
static AEADNonceGeneratorFactory getDefaultFipsGCMNonceGeneratorFactory()
35-
{
36-
return null;
37-
}
38-
3933
static boolean isGCMParameterSpecAvailable()
4034
{
4135
return gcmParameterSpec != null;

tls/src/main/java/org/bouncycastle/tls/crypto/impl/jcajce/JcaTlsCrypto.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1311,7 +1311,7 @@ private TlsAEADCipher createCipher_SM4_GCM(TlsCryptoParameters cryptoParams)
13111311
*/
13121312
public AEADNonceGeneratorFactory getFipsGCMNonceGeneratorFactory()
13131313
{
1314-
return GCMUtil.getDefaultFipsGCMNonceGeneratorFactory();
1314+
return GCMFipsUtil.getDefaultFipsGCMNonceGeneratorFactory();
13151315
}
13161316

13171317
String getDigestName(int cryptoHashAlgorithm)

0 commit comments

Comments
 (0)