javax.microedition.io
Interface SecurityInfo

public interface SecurityInfo

This interface defines methods
to access information about a secure network connection.
Protocols that implement secure connections may use this interface
to report the security parameters of the connection.

It provides the certificate, protocol, version, and cipher suite,
etc. in use.

Blocking Operations

This interface performs blocking Input and Output operations. An application will lock if an
implementation of this interface opens a connection from within the main event thread.
Prevent an application from locking by opening a connection from within a thread that is
separate from the main event thread.
SeeConnector for more information.

getCipherSuite

Returns the name of the cipher suite in use for the connection.
The name returned is from the CipherSuite column of the CipherSuite
definitions table in Appendix C of RFC 2246. If the cipher suite is
not in Appendix C, the name returned is non-null and its contents
are not specified. For non-TLS implementions the cipher suite name
should be selected according to the actual key exchange, cipher,
and hash
combination used to establish the connection, so that regardless of
whether the secure connection uses SSL V3
or TLS 1.0 or WTLS or WAP TLS Profile and Tunneling,
equivalent cipher suites have the same name.

Returns:

a String containing the name of the cipher suite
in use.

Since:

JDE 4.0.0

getProtocolName

a String containing the secure protocol identifier;
if TLS (RFC 2246) or WAP TLS Profile and Tunneling (WAP-219-TLS)
is used for the connection the return value is "TLS";
if SSL V3 (The SSL Protocol Version 3.0) is used for the connection;
the return value is "SSL");
if WTLS (WAP 199) is used for the connection the return value is "WTLS".