public class IAIKMD extends ExtendedProvider
IAIK
provider for fixing a JSSE MessageDigest
Cloneable bug.
Some versions of JSSE (e.g. Java 11) may contain a bug (https://bugs.openjdk.java.net/browse/JDK-8214098) that may cause
a TLS handshake to fail with an UnsupportedOperationException if an MessageDigest
engine is used that implements the Cloneable interface and is extended from the
java.security.MessageDigest
class.
This provider contains MessageDigest engines for the message digest algorithms
commonly used by JSSE for TLS ("MD5", "SHA", "SHA-256", "SHA-384").
The MessageDigest engines of the IAIK-MD provider simply wrap around the
corresponding MessageDigest implementations of the IAIK
provider but are extended from the
MessageDigestSpi. For that reason the IAIK provider can be used with
affected JSSE versions when installing the IAIK-MD provider as first
provider in front of the IAIK provider:
Security.insertProviderAt(new IAIKMD(), 1); Security.insertProviderAt(new IAIK(), 2);Alternatively you may call method {@link #addAsProvider()
IAIKMD.addAsProvider();
which installs IAIKMD as first
and IAIK as second provider.SHA512
,
Serialized FormConstructor and Description |
---|
IAIKMD()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
static void |
addAsProvider()
Static method which installs the
IAIK-MD provider as
first provider and the IAIK provider as second provider. |
static void |
addAsProvider(boolean printStatusInfo)
Static method which installs the
IAIK-MD provider as
first provider and the IAIK provider as second provider
and prints some system properties if desired. |
static IAIKMD |
getInstance()
Returns an instance of this provider.
|
isAvailable, puta, putc, putc
clear, elements, entrySet, get, getInfo, getName, getProperty, getService, getServices, getVersion, keys, keySet, load, put, putAll, putService, remove, removeService, toString, values
getProperty, list, list, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames
public static IAIKMD getInstance()
public static void addAsProvider()
IAIK-MD
provider as
first provider and the IAIK provider as second provider.public static void addAsProvider(boolean printStatusInfo)
IAIK-MD
provider as
first provider and the IAIK provider as second provider
and prints some system properties if desired.printStatusInfo
- prints some status information and system properties