public final class InsecureSSLContextFactory extends Object implements SSLContextFactory
I tried using a trivial SecureRandomSpi implementation, but it didn't make SSL measurable faster. Seeding the SecureRandom up front can help on some platforms.
SSLContextFactory.SSLContextFactoryException
Constructor and Description |
---|
InsecureSSLContextFactory()
Constructor.
|
InsecureSSLContextFactory(InputStream keyStoreStream,
char[] keyStorePassword,
String keyStoreType)
Constructor.
|
InsecureSSLContextFactory(KeyManager[] keyManagers)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
SSLContext |
getSSLContext()
Returns an appropriate JSSE
SSLContext . |
public InsecureSSLContextFactory()
The JSSE does not provide an way to access its default SSLContext, and we
don't bother trying to replicate it. (The default context is specified by
the System properties javax.ssl.net.ssl.keyStore
,
javax.ssl.net.ssl.keyStorePassword
,
javax.ssl.net.ssl.keyStoreType
. These properties have no
effect on The Grinder.)
public InsecureSSLContextFactory(KeyManager[] keyManagers)
keyManagers
- The sources of authentication keys.public InsecureSSLContextFactory(InputStream keyStoreStream, char[] keyStorePassword, String keyStoreType) throws GeneralSecurityException, IOException
keyStoreStream
- Key Store input stream. A key store is read
from the stream, but the stream is not closed.keyStorePassword
- Key Store password, or null
.keyStoreType
- Key Store type.GeneralSecurityException
- If the JSSE could not load
the key store.IOException
- If the key store stream could not be read.public SSLContext getSSLContext() throws SSLContextFactory.SSLContextFactoryException
SSLContext
. This can be used to obtain
an SSLSocketFactory
.
The Grinder optimises client SSL processing to increase the number of simultaneous client threads it is reasonable to run. It uses an insecure source of random information, and does not perform checks on the certificates presented by a server. Do not use The Grinder to implement any SSL communication that you want to be secure.
getSSLContext
in interface SSLContextFactory
SSLContextFactory.SSLContextFactoryException
- If the SSLContext could not be found/created.SSLControl
Copyright © 2000-2014. All Rights Reserved.