Top Description Inners Fields Constructors Methods
org.bouncycastle.crypto.fips

public final Class FipsStatus

extends Object
Class Inheritance
Imports
java.io.ByteArrayOutputStream, .IOException, .InputStream, java.net.URL, .URLDecoder, java.security.AccessController, .CodeSource, .PrivilegedAction, java.util.Enumeration, .Map, .TreeMap, java.util.concurrent.atomic.AtomicBoolean, java.util.jar.JarEntry, .JarFile, .JarInputStream, org.bouncycastle.LICENSE, org.bouncycastle.crypto.CryptoServicesRegistrar, org.bouncycastle.crypto.internal.macs.HMac, org.bouncycastle.crypto.internal.params.KeyParameterImpl, org.bouncycastle.util.Arrays, .Pack, .Strings, org.bouncycastle.util.encoders.Hex, org.bouncycastle.util.io.Streams

Status utility class - it has three methods on it, one for returning "isReady" status, one for a status message, and one for the current module checksum.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
private static final String[]
private static volatile FipsStatus.Loader
public static final String
private static final AtomicBoolean
private static volatile Throwable
private static final Object

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static byte[]
private static byte[][]
private static void
private static boolean
pack-priv static String
getMarker(final Class<T> sourceClass, final String markerName)

public static byte[]

Returns:

the internally calculated HMAC for the module.
getModuleHMAC
()

Return the HMAC used to verify that the code contained in the module is the same

private static String
public static String

Returns:

READY if all is well, an exception message otherwise.
getStatusMessage
()

Return a message indicating the current status.

pack-priv static boolean
public static boolean

Returns:

true if an error has been detected, false otherwise.
isErrorStatus
()

Return true if the module is in error status, false otherwise.

public static boolean

Returns:

true if the module is ready for operation with all self-tests complete.
isReady
()

Check to see if the FIPS module is ready for operation.

private static void
loadClass(String className)

pack-priv static void
pack-priv static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

classesback to summary
private static final String[] classes
loaderback to summary
private static volatile FipsStatus.Loader loader
READYback to summary
public static final String READY
readyStatusback to summary
private static final AtomicBoolean readyStatus
statusExceptionback to summary
private static volatile Throwable statusException
statusLockback to summary
private static final Object statusLock

Constructor Detail

FipsStatusback to summary
private FipsStatus()

Method Detail

calculateModuleHMACback to summary
private static byte[] calculateModuleHMAC(JarFile jarFile)
calculateModuleHMACback to summary
private static byte[][] calculateModuleHMAC(JarInputStream jIn) throws Exception
checksumValidateback to summary
private static void checksumValidate()
checkValidJarUrlback to summary
private static boolean checkValidJarUrl(String url)
getMarkerback to summary
pack-priv static String getMarker(final Class<T> sourceClass, final String markerName)
getModuleHMACback to summary
public static byte[] getModuleHMAC()

Return the HMAC used to verify that the code contained in the module is the same

Returns:byte[]

the internally calculated HMAC for the module.

getResourceNameback to summary
private static String getResourceName()
getStatusMessageback to summary
public static String getStatusMessage()

Return a message indicating the current status.

Returns:String

READY if all is well, an exception message otherwise.

isBootingback to summary
pack-priv static boolean isBooting()
isErrorStatusback to summary
public static boolean isErrorStatus()

Return true if the module is in error status, false otherwise.

Returns:boolean

true if an error has been detected, false otherwise.

isReadyback to summary
public static boolean isReady()

Check to see if the FIPS module is ready for operation.

Returns:boolean

true if the module is ready for operation with all self-tests complete.

loadClassback to summary
private static void loadClass(String className)
moveToErrorStatusback to summary
pack-priv static void moveToErrorStatus(String error)
moveToErrorStatusback to summary
pack-priv static void moveToErrorStatus(FipsOperationError error)
org.bouncycastle.crypto.fips back to summary

pack-priv Class FipsStatus.Loader

extends Object
Class Inheritance

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
run()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Loaderback to summary
pack-priv Loader()

Method Detail

runback to summary
pack-priv void run() throws Exception