Package org.mozilla.jss.ssl.javax
Class JSSParameters
- java.lang.Object
-
- javax.net.ssl.SSLParameters
-
- org.mozilla.jss.ssl.javax.JSSParameters
-
public class JSSParameters extends javax.net.ssl.SSLParameters
JSSParameters is an implementation of SSLParameters to interoperate with NSS. In particular, we extend SSLParameters to provide cipher suites and protocol versions as NSS constants. This aids with the JNI translation layer. We also create a default set of SSLParameters which use a null cipher suite list and null protocol version list to fall back on the NSS default. On RHEL-like systems, this will default to CryptoPolicies. We also need to store the desired certificate alias; this contrasts to the SNI functionality provided by SSLParameters in that it ties back to a certificate in the NSS DB and works with client certificates. When using the JSSEngine implementation of SSLEngine, only the alias will be used to find the certificate.
-
-
Constructor Summary
Constructors Constructor Description JSSParameters()
JSSParameters(java.lang.String[] cipherSuites)
JSSParameters(java.lang.String[] cipherSuites, java.lang.String[] protocols)
JSSParameters(javax.net.ssl.SSLParameters downcast)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAlias()
java.lang.String[]
getCipherSuites()
java.lang.String
getHostname()
java.util.Collection<? extends java.util.EventListener>
getListeners()
java.lang.String[]
getProtocols()
SSLCipher[]
getSSLCiphers()
SSLVersionRange
getSSLVersionRange()
void
setAlias(java.lang.String cert_alias)
void
setCipherSuites(java.lang.String[] cipherSuites)
void
setCipherSuites(SSLCipher[] cipherSuites)
void
setHostname(java.lang.String server_hostname)
void
setListeners(java.util.Collection<? extends java.util.EventListener> new_listeners)
void
setProtocols(java.lang.String[] protocols)
void
setProtocols(SSLVersionRange vrange)
void
setProtocols(SSLVersion min, SSLVersion max)
-
Methods inherited from class javax.net.ssl.SSLParameters
getAlgorithmConstraints, getApplicationProtocols, getEnableRetransmissions, getEndpointIdentificationAlgorithm, getMaximumPacketSize, getNeedClientAuth, getServerNames, getSNIMatchers, getUseCipherSuitesOrder, getWantClientAuth, setAlgorithmConstraints, setApplicationProtocols, setEnableRetransmissions, setEndpointIdentificationAlgorithm, setMaximumPacketSize, setNeedClientAuth, setServerNames, setSNIMatchers, setUseCipherSuitesOrder, setWantClientAuth
-
-
-
-
Method Detail
-
setCipherSuites
public void setCipherSuites(java.lang.String[] cipherSuites) throws java.lang.IllegalArgumentException
- Overrides:
setCipherSuites
in classjavax.net.ssl.SSLParameters
- Throws:
java.lang.IllegalArgumentException
-
setCipherSuites
public void setCipherSuites(SSLCipher[] cipherSuites)
-
getCipherSuites
public java.lang.String[] getCipherSuites()
- Overrides:
getCipherSuites
in classjavax.net.ssl.SSLParameters
-
getSSLCiphers
public SSLCipher[] getSSLCiphers()
-
setProtocols
public void setProtocols(java.lang.String[] protocols) throws java.lang.IllegalArgumentException
- Overrides:
setProtocols
in classjavax.net.ssl.SSLParameters
- Throws:
java.lang.IllegalArgumentException
-
setProtocols
public void setProtocols(SSLVersion min, SSLVersion max)
-
setProtocols
public void setProtocols(SSLVersionRange vrange)
-
getProtocols
public java.lang.String[] getProtocols()
- Overrides:
getProtocols
in classjavax.net.ssl.SSLParameters
-
getSSLVersionRange
public SSLVersionRange getSSLVersionRange()
-
getAlias
public java.lang.String getAlias()
-
setAlias
public void setAlias(java.lang.String cert_alias)
-
getHostname
public java.lang.String getHostname()
-
setHostname
public void setHostname(java.lang.String server_hostname)
-
getListeners
public java.util.Collection<? extends java.util.EventListener> getListeners()
-
setListeners
public void setListeners(java.util.Collection<? extends java.util.EventListener> new_listeners)
-
-