org.mozilla.jss.ssl

Class SSLSecurityStatus

public class SSLSecurityStatus extends Object

This class represents the known state of an SSL connection: what cipher is being used, how secure it is, and who's on the other end.
Field Summary
intSTATUS_FORTEZZA
intSTATUS_NOOPT
intSTATUS_OFF
intSTATUS_ON_HIGH
intSTATUS_ON_LOW
Constructor Summary
SSLSecurityStatus(int status, String cipher, int sessionKeySize, int sessionSecretSize, String issuer, String subject, String serialNumber, X509Certificate certificate)
This constructor is called from the native SSL code It's not necessary for you to call this.
Method Summary
StringgetCipher()
Query which cipher is being used in this session.
X509CertificategetPeerCertificate()
Retrieve certificate presented by the other other end of the socket

Not Supported in NSS 2.0 Beta release.

StringgetRemoteIssuer()
Get the distinguished name of the remote certificate's issuer
StringgetRemoteSubject()
Get the distinguished name of the subject of the remote certificate
intgetSecurityStatus()
Get exact security status of socket.
StringgetSerialNumber()
Get the serial number of the remote certificate
intgetSessionKeySize()
Query how many bits long the session key is.
intgetSessionSecretSize()
To satisfy export restrictions, some of the session key may be revealed.
booleanisSecurityOn()
Query if security is enabled on this socket.
StringtoString()
Get a pretty string to show to a user, summarizing the contents of this object

Field Detail

STATUS_FORTEZZA

public final int STATUS_FORTEZZA

Deprecated: As of NSS 3.11, FORTEZZA is no longer supported. STATUS_FORTEZZA is a placeholder for backward compatibility.

STATUS_NOOPT

public final int STATUS_NOOPT

STATUS_OFF

public final int STATUS_OFF

STATUS_ON_HIGH

public final int STATUS_ON_HIGH

STATUS_ON_LOW

public final int STATUS_ON_LOW

Constructor Detail

SSLSecurityStatus

public SSLSecurityStatus(int status, String cipher, int sessionKeySize, int sessionSecretSize, String issuer, String subject, String serialNumber, X509Certificate certificate)
This constructor is called from the native SSL code It's not necessary for you to call this.

Method Detail

getCipher

public String getCipher()
Query which cipher is being used in this session.

getPeerCertificate

public X509Certificate getPeerCertificate()
Retrieve certificate presented by the other other end of the socket

Not Supported in NSS 2.0 Beta release.

Can be null if peer did not present a certificate.

getRemoteIssuer

public String getRemoteIssuer()
Get the distinguished name of the remote certificate's issuer

getRemoteSubject

public String getRemoteSubject()
Get the distinguished name of the subject of the remote certificate

getSecurityStatus

public int getSecurityStatus()
Get exact security status of socket.

getSerialNumber

public String getSerialNumber()
Get the serial number of the remote certificate

getSessionKeySize

public int getSessionKeySize()
Query how many bits long the session key is. More bits are better.

getSessionSecretSize

public int getSessionSecretSize()
To satisfy export restrictions, some of the session key may be revealed. This function tells you how many bits are actually secret.

isSecurityOn

public boolean isSecurityOn()
Query if security is enabled on this socket.

toString

public String toString()

Deprecated: As of NSS 3.11, FORTEZZA is no longer supported. This is just a placeholder for backward compatibility.

Get a pretty string to show to a user, summarizing the contents of this object