Skip to content

Commit

Permalink
moved nonce generator method to GCMFipsUtil class (avoid dup in Java …
Browse files Browse the repository at this point in the history
…9 tree).
  • Loading branch information
dghgit committed Jan 11, 2025
1 parent ed1208c commit 3b0be50
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package org.bouncycastle.tls.crypto.impl.jcajce;

import org.bouncycastle.tls.crypto.impl.AEADNonceGeneratorFactory;

class GCMFipsUtil
{
static AEADNonceGeneratorFactory getDefaultFipsGCMNonceGeneratorFactory()
{
return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import java.security.PrivilegedExceptionAction;
import java.security.spec.AlgorithmParameterSpec;

import org.bouncycastle.tls.crypto.impl.AEADNonceGeneratorFactory;
import org.bouncycastle.util.Integers;

class GCMUtil
Expand All @@ -31,11 +30,6 @@ public AlgorithmParameterSpec run()
});
}

static AEADNonceGeneratorFactory getDefaultFipsGCMNonceGeneratorFactory()
{
return null;
}

static boolean isGCMParameterSpecAvailable()
{
return gcmParameterSpec != null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1311,7 +1311,7 @@ private TlsAEADCipher createCipher_SM4_GCM(TlsCryptoParameters cryptoParams)
*/
public AEADNonceGeneratorFactory getFipsGCMNonceGeneratorFactory()
{
return GCMUtil.getDefaultFipsGCMNonceGeneratorFactory();
return GCMFipsUtil.getDefaultFipsGCMNonceGeneratorFactory();
}

String getDigestName(int cryptoHashAlgorithm)
Expand Down

0 comments on commit 3b0be50

Please sign in to comment.