public interface ServerSocketInterface
As SSL requires additional parameters that are generally implementation dependent, the "server.ini" file object is passed along. This makes it possible to access information in - typically - the "[SSL]" section of the file.
| Modifier and Type | Field and Description |
|---|---|
static int |
SSLINFO_CLIENTCERT_ISSUER
Performs the SSL handshake, if necessary, and
gets the client certificate issuer in form of
CN=nnn|O=nnn|L=nnn|S=nnn|C=NN,
CN=Common Name,
O=Organization,
L=Locality,
S=State or province,
C=Country,
and "|" is character '\0'.
|
static int |
SSLINFO_CLIENTCERT_PUBLICKEYFORMAT
Get the "Public key format".
|
static int |
SSLINFO_CLIENTCERT_SERIALNUMBER
The client certificate serial number (null for none,
otherwise a hex string without spaces).
|
static int |
SSLINFO_CLIENTCERT_SIGNATUREALGORITHM
Get the "Signature Algorithm".
|
static int |
SSLINFO_CLIENTCERT_SUBJECT
Performs the SSL handshake, if necessary, and
gets the client certificate subject in form of
CN=nnn|OU=nnn|O=nnn|L=nnn|S=nnn|C=NN|E=nnn,
CN=Common Name,
OU=Organizational Unit,
O=Organization,
L=Locality,
S=State or province,
C=Country,
E=Email address,
and "|" is character '\0'.
|
static int |
SSLINFO_CLIENTCERT_VALIDFROM
Performs the SSL handshake, if necessary, and
gets the client certificate "Valid from" date
in the server date country settings.
|
static int |
SSLINFO_CLIENTCERT_VALIDTO
Performs the SSL handshake, if necessary, and
gets the client certificate "Valid to" date
in the server date country settings.
|
static int |
SSLINFO_CLIENTCERT_VERSION
Get the "Version" as an integer.
|
static int |
SSLINFO_GETCIPHER
The level of information: the name of the cipher being used.
|
static int |
SSLINFO_GETEFFECTIVEBITS
The level of information: The number of effective bits for encryption.
|
static int |
SSLINFO_ISENCRYPTED
The level of information: "0" or "1" if encrypted or not.
|
static int |
SSLINFO_ISSTRONGENCRYPTED
The level of information: "0" or "1" if strong encrypted (>=128 bits) or not.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this socket.
|
InetAddress |
getInetAddress()
Returns the local address of this server socket.
|
String |
getInformation(Socket socket,
int index)
Returns SSL information about this socket.
|
String |
getLocalAddress(Socket socket)
Gets the local address of the socket.
|
String |
getLocalName(Socket socket)
Gets the local name of the socket.
|
int |
getLocalPort()
Returns the port on which this socket is listening.
|
int |
getMapToPort()
Gets the port number being mapped to externally.
|
String |
getPortID()
Gets the port ID.
|
boolean |
isEncrypted(Socket socket)
Checks if encryption (with SSL with any encryption - not only signing) is used.
|
boolean |
isLoadBalanced()
Checks if the port is load balanced.
|
boolean |
isStrongEncrypted(Socket socket)
Checks if strong encryption (using SSL) is used.
|
boolean |
isUsingSSL()
Returns if SSL is used or not.
|
boolean |
renegotiateSession(Socket socket,
boolean isStrongEncryptionRequired,
boolean isClientAuthenticationRequired,
String accessControlID)
If an SSL connection is not using strong encryption or if a client certificate
is required, call this method.
|
void |
setExternalSSL(boolean isExternal)
Sets the external SSL flag.
|
void |
setLoadBalancing(boolean isLoadBalanced)
Sets load balancing.
|
String |
toString()
Returns the implementation address and implementation port of this
socket as a String.
|
static final int SSLINFO_ISENCRYPTED
static final int SSLINFO_ISSTRONGENCRYPTED
static final int SSLINFO_GETEFFECTIVEBITS
static final int SSLINFO_GETCIPHER
static final int SSLINFO_CLIENTCERT_SERIALNUMBER
static final int SSLINFO_CLIENTCERT_SUBJECT
Returns null if client certificate authentication or SSL is not used.
static final int SSLINFO_CLIENTCERT_ISSUER
Returns null if client certificate authentication or SSL is not used.
static final int SSLINFO_CLIENTCERT_VALIDFROM
Returns null if client certificate authentication or SSL is not used.
static final int SSLINFO_CLIENTCERT_VALIDTO
Returns null if client certificate authentication or SSL is not used.
static final int SSLINFO_CLIENTCERT_VERSION
Returns null if client certificate authentication or SSL is not used.
static final int SSLINFO_CLIENTCERT_SIGNATUREALGORITHM
Returns null if client certificate authentication or SSL is not used.
static final int SSLINFO_CLIENTCERT_PUBLICKEYFORMAT
Returns null if client certificate authentication or SSL is not used.
String getInformation(Socket socket, int index)
index - index of the information requested.String getPortID()
void setExternalSSL(boolean isExternal)
boolean isUsingSSL()
boolean isEncrypted(Socket socket)
boolean isStrongEncrypted(Socket socket)
void setLoadBalancing(boolean isLoadBalanced)
boolean isLoadBalanced()
boolean renegotiateSession(Socket socket, boolean isStrongEncryptionRequired, boolean isClientAuthenticationRequired, String accessControlID) throws IOException
IOException - for negotiation or other I/O failures.InetAddress getInetAddress()
String getLocalName(Socket socket)
String getLocalAddress(Socket socket)
int getLocalPort()
int getMapToPort()
getLocalPort
is returned.void close()
throws IOException
IOException - if an I/O error occurs when closing the socket.Phantom® and NetPhantom® are registered trademarks of Nexum Technologies SARL.
© Copyright Nexum Technologies SARL, 2011. All rights reserved.