16.1. Checking the Security Properties of a Connection

The device and the server negotiate the secure connection parameters based on mutually agreeable secure suites. After the connection has been established, the application can retrieve a SecurityInfo object and verify the integrity and server credentials of a negotiated connection. A MIDlet using an HTTPS or secure connection gets the object by calling the getSecurityInfo method on the open connection. If the MIDlet's connection is not secure enough, it can report an error and close the connection.

The application can use the SecurityInfo object to get the protocol name, protocol version, cipher suite, and certificate for a secure network connection. Table 16.1 lists the names and versions ...

Get Programming Wireless Devices with the Java™ 2 Platform, Micro Edition, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.