|
BEA Systems, Inc. | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweblogic.webservice.client.BaseWLSSLAdapter
Copyright (c) 2003 by BEA Systems, Inc. All Rights Reserved. WLSSLContext.java Created: Mon Apr 8 19:24:52 2002
Field Summary | |
static String |
ENFORCE_CONSTRAINTS
Deprecated. |
static String |
STRICT_CHECKING_DEFAULT
Deprecated. |
protected boolean |
strictCertChecking
Deprecated. |
static String |
TRUSTED_CERTS
Deprecated. |
protected static String |
trustedCertFile
Deprecated. |
protected static boolean |
verbose
Deprecated. |
static String |
VERBOSE_PROPERTY
Deprecated. |
Constructor Summary | |
BaseWLSSLAdapter()
Deprecated. Returns an instance of the this class. |
Method Summary | |
protected boolean |
adapterUsed()
Deprecated. |
void |
addIdentity(X509Certificate[] chain,
byte[] encodedPrivateKey)
Deprecated. |
void |
addIdentity(X509Certificate[] chain,
PrivateKey privateKey)
Deprecated. |
void |
addIdentity(X509Certificate[] chain,
PrivateKey privateKey)
Deprecated. Adds an certificate chain to be sent to a peer during authentication. |
void |
clearProxy()
Deprecated. Removes the proxy from the Adapter's connections -- all subsequent connections will be direct. |
Socket |
createSocket(String host,
int port)
Deprecated. Returns a socket connected to a ServerSocket on the named host, at the given port. |
protected com.certicom.net.ssl.SSLContext |
getContext()
Deprecated. internals |
X509Certificate[] |
getIdentity(String algorithm,
int index)
Deprecated. |
String |
getProtocolVersion()
Deprecated. Gets the hello policy for clients. |
protected SSLSocketFactory |
getSocketFactory()
Deprecated. |
protected boolean |
getStrictCheckingDefault()
Deprecated. |
void |
loadLocalIdentity(InputStream stream,
char[] password)
Deprecated. Adds a PEM encoded certificate chain to the system. |
abstract URLConnection |
openConnection(URL url)
Deprecated. Opens connection to URL |
void |
removeIdentity(X509Certificate certificate)
Deprecated. |
void |
removeIdentity(X509Certificate certificate)
Deprecated. |
void |
setProtocolVersion(String version)
Deprecated. This sets the hello policy for clients. |
void |
setProxy(String host,
int port)
Deprecated. Sets the proxy for the adapter. |
static void |
setStrictCheckingDefault(boolean strict)
Deprecated. Determines the default setting for Strict Certificate checking of subsequent instances of this adapter class. |
void |
setTrustedCertificatesFile(String filename)
Deprecated. Sets the name of the file from which the set of trusted CA certs will be loaded. |
void |
setTrustManager(TrustManager manager)
Deprecated. Sets the trust policy for all sockets generated by factories of this adapter. |
void |
setTrustManager(TrustManager manager,
Object callbackref)
Deprecated. Sets the trust policy for all sockets generated by this adapter. |
void |
setVerbose(boolean verbose)
Deprecated. This method is used to enable or disabled verbose debugging output. |
static X509Certificate |
X509java2javax(X509Certificate javaCert)
Deprecated. Convert a java.security.cert.X509Certificate to the equivalent javax.security.cert.X509Certificates |
static X509Certificate[] |
X509java2javax(X509Certificate[] javaCerts)
Deprecated. Converts an array of java.security.cert.X509Certificates to the equivalent array of javax.security.cert.X509Certificates |
static X509Certificate |
X509javax2java(X509Certificate javaxCert)
Deprecated. Convert a javax.security.cert.X509Certificate to the equivalent java.security.cert.X509Certificates |
static X509Certificate[] |
X509javax2java(X509Certificate[] javaxCerts)
Deprecated. Converts an array of javax.security.cert.Certificates (e.g. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String ENFORCE_CONSTRAINTS
public static final String STRICT_CHECKING_DEFAULT
protected boolean strictCertChecking
public static final String TRUSTED_CERTS
protected static String trustedCertFile
protected static boolean verbose
public static final String VERBOSE_PROPERTY
Constructor Detail |
public BaseWLSSLAdapter()
weblogic.webservice.client.ssl.trustedcertfile
To disable strict certificate checking by default, set the
following system property to false
:
weblogic.webservice.client.ssl.strictcertchecking
To enable the use of proxy by default, set the following system
properties to the appropriate values.
weblogic.webservice.transport.https.proxy.host
weblogic.webservice.transport.https.proxy.port
Method Detail |
protected boolean adapterUsed()
public final void addIdentity(X509Certificate[] chain, byte[] encodedPrivateKey)
chain
- The certificate chain that will be used for
authentication to a peer.encodedPrivateKey
- The private key associated with the last
certificate. This is needed to sign/decrypt
messages during authentiction and key exchange.removeIdentity(X509Certificate)
,
getIdentity(String, int)
,
loadLocalIdentity(InputStream, char[])
public final void addIdentity(X509Certificate[] chain, PrivateKey privateKey)
chain
- The certificate chain that will be used for
authentication to a peer.privateKey
- The private key associated with the last
certificate. This is needed to sign/decrypt
messages during authentiction and key exchange.removeIdentity(X509Certificate)
,
getIdentity(String, int)
,
loadLocalIdentity(InputStream, char[])
public final void addIdentity(X509Certificate[] chain, PrivateKey privateKey)
chain
- The certificate chain that will be used for
authentication to a peer.privateKey
- The private key associated with the last
certificate. This is needed to sign/decrypt
messages during authentiction and key exchange.removeIdentity(X509Certificate)
,
getIdentity(String, int)
,
loadLocalIdentity(InputStream, char[])
public void clearProxy()
public final Socket createSocket(String host, int port) throws IOException
createSocket
in interface SSLAdapter
host
- the server hostport
- the server port
IOException
- if the connection can't be established
UnknownHostException
- if the host is not knownprotected final com.certicom.net.ssl.SSLContext getContext()
public final X509Certificate[] getIdentity(String algorithm, int index)
In a server, only the first authentication chain added to the system is used, though multiple chains may be added.
algorithm
- The algorithm that the cert chain uses for
authentication. eg "ECDSA", "DSA", "RSA".index
- The index into the list of authentication chains.
ArrayIndexOutOfBoundsException
- if there is no certificate at
the given index.addIdentity(X509Certificate[], byte[])
,
removeIdentity(X509Certificate)
,
loadLocalIdentity(InputStream, char[])
public final String getProtocolVersion()
setProtocolVersion(String)
protected SSLSocketFactory getSocketFactory()
protected final boolean getStrictCheckingDefault()
public final void loadLocalIdentity(InputStream stream, char[] password) throws KeyManagementException
stream
- The input stream containing the encoded certificate chain.password
- The password to the PKCS 8 encrypted private key.
KeyManagementException
- if the certificate is malformedaddIdentity(X509Certificate[], byte[])
,
removeIdentity(X509Certificate)
,
getIdentity(String, int)
public abstract URLConnection openConnection(URL url) throws IOException
openConnection
in interface SSLAdapter
url
- URL we will be connecting to
IOException
- if error occurs while accessing Socketpublic final void removeIdentity(X509Certificate certificate)
certificate
- The certificate which is the last in the certificate chain
to be removed.addIdentity(X509Certificate[], byte[])
,
getIdentity(String, int)
,
loadLocalIdentity(InputStream, char[])
public final void removeIdentity(X509Certificate certificate)
public final void setProtocolVersion(String version)
When a client sends a hello message to a server, a preferred protocol version is sent. The server responds with an offer to use that protocol or a different one. The policy defines what to do when the negotiated protocol version is other than preferred. This has some security implications, though as of this writing the SSL3 and TLS protocol versions have not been successfully attacked.
It is safe to send the SSL2 hello message even when the only allowed versions are SSL3 and TLS. This is commonly done to allow a graceful exit when no common protocol can be negotiated.
"TLS" means that a TLS hello is sent; the client will accept SSL3 or TLS.
"SSL3" means that a SSL3 hello is sent; the client will accept SSL3 or SSL2.
"TLS1/2HI" means that a SSL2 hello is sent; the client will accept SSL3 or TLS.
"SSL3/2HI" means that a SSL2 hello is sent; the client will accept SSL3 or SSL2.
"TLS1-ONLY" means that a TLS hello is sent; the client will accept TLS.
"SSL3-ONLY" means that a SSL3 hello is sent; the client will accept SSL3.
"ANY" is synonymous with "TLS1/2HI"
The default is "ANY".
public void setProxy(String host, int port)
host
- the hostname or IP address of the proxy server.port
- the port on which the proxy server listens.public static void setStrictCheckingDefault(boolean strict)
false
means instances will accept flawed
certificates from the server but warn.
This value can also be set with the following system property:
weblogic.webservice.client.ssl.strictcertchecking
strict
- the default setting for strict certificate checkingpublic void setTrustedCertificatesFile(String filename)
filename
- public final void setTrustManager(TrustManager manager)
manager
- the trust policy.TrustManager
public final void setTrustManager(TrustManager manager, Object callbackref)
manager
- the trust manager for policy.callbackref
- callback object passed to the Trust Manager
certificateCallback methodTrustManager
public void setVerbose(boolean verbose)
weblogic.webservice.client.verbose
verbose
- the default setting for strict certificate checkingpublic static final X509Certificate X509java2javax(X509Certificate javaCert) throws CertificateEncodingException, CertificateException
javaCert
-
CertificateEncodingException
CertificateException
public static final X509Certificate[] X509java2javax(X509Certificate[] javaCerts) throws CertificateException, CertificateEncodingException
javaCerts
-
CertificateException
CertificateEncodingException
public static final X509Certificate X509javax2java(X509Certificate javaxCert) throws CertificateException, CertificateEncodingException
javaxCert
-
CertificateException
CertificateEncodingException
public static final X509Certificate[] X509javax2java(X509Certificate[] javaxCerts) throws CertificateEncodingException, CertificateException
javaxCerts
-
CertificateEncodingException
CertificateException
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs91 Copyright 2005 BEA Systems Inc. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |