public class SSL
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
REQUEST_CERTIFICATE
Request certificate from the remote peer.
|
static int |
REQUIRE_CERTIFICATE
Require certificate from the remote peer.
|
static int |
SECFailure
Return value on failure from NSS functions.
|
static int |
SECSuccess
Return value on success from NSS functions.
|
static int |
SECWouldBlock
Return value from NSS functions when the operation would block.
|
Constructor and Description |
---|
SSL() |
Modifier and Type | Method and Description |
---|---|
static boolean |
CipherPrefGet(PRFDProxy fd,
int cipher)
Get the preference for a specific cipher suite on the specified
PRFileDesc.
|
static int |
CipherPrefSet(PRFDProxy fd,
int cipher,
boolean enabled)
Set the preference for a specific cipher suite on the specified
PRFileDesc.
|
static int |
ConfigSecureServer(PRFDProxy fd,
PK11Cert cert,
PK11PrivKey key,
int kea)
Deprecated.
replaced with ConfigServerCert
See also: SSL_ConfigSecureServer in /usr/include/nss3/ssl.h
|
static int |
ConfigServerCert(PRFDProxy fd,
PK11Cert cert,
PK11PrivKey key)
Configure the certificate and private key for a server socket.
|
static int |
ConfigServerSessionIDCache(int maxCacheEntries,
long timeout,
long ssl3_timeout,
java.lang.String directory)
Configure the server's session cache.
|
static int |
ForceHandshake(PRFDProxy fd)
Force a handshake to occur if not started, else step one.
|
static PRFDProxy |
ImportFD(PRFDProxy model,
PRFDProxy fd)
Import a file descriptor to create a new SSL file descriptor out of it.
|
static int |
OptionGet(PRFDProxy fd,
int option)
Get the value of a SSL option on the specified PRFileDesc.
|
static int |
OptionSet(PRFDProxy fd,
int option,
int val)
Set the value of a SSL option on the specified PRFileDesc.
|
static PK11Cert |
PeerCertificate(PRFDProxy fd)
Introspect the peer's certificate.
|
static PK11Cert[] |
PeerCertificateChain(PRFDProxy fd)
Introspect the peer's certificate chain.
|
static int |
ResetHandshake(PRFDProxy fd,
boolean asServer)
Reset the handshake status, optionally handshaking as a server.
|
static SecurityStatusResult |
SecurityStatus(PRFDProxy fd)
Check the security status of a SSL handshake.
|
static int |
SetURL(PRFDProxy fd,
java.lang.String url)
Set the hostname of a handshake on the specified PRFileDesc.
|
static SSLVersionRange |
VersionRangeGet(PRFDProxy fd)
Get the range of TLS versions enabled by this server.
|
static int |
VersionRangeSet(PRFDProxy fd,
SSLVersionRange range)
Set the range of TLS versions enabled by this server by SSLVersionRange.
|
public static final int REQUEST_CERTIFICATE
public static final int REQUIRE_CERTIFICATE
public static final int SECSuccess
public static final int SECFailure
public static final int SECWouldBlock
public static PRFDProxy ImportFD(PRFDProxy model, PRFDProxy fd)
public static int OptionSet(PRFDProxy fd, int option, int val)
public static int OptionGet(PRFDProxy fd, int option) throws java.lang.Exception
java.lang.Exception
public static int SetURL(PRFDProxy fd, java.lang.String url)
public static int CipherPrefSet(PRFDProxy fd, int cipher, boolean enabled)
public static boolean CipherPrefGet(PRFDProxy fd, int cipher) throws java.lang.Exception
java.lang.Exception
public static int VersionRangeSet(PRFDProxy fd, SSLVersionRange range)
public static SSLVersionRange VersionRangeGet(PRFDProxy fd) throws java.lang.Exception
java.lang.Exception
public static SecurityStatusResult SecurityStatus(PRFDProxy fd)
public static int ResetHandshake(PRFDProxy fd, boolean asServer)
public static int ForceHandshake(PRFDProxy fd)
@Deprecated public static int ConfigSecureServer(PRFDProxy fd, PK11Cert cert, PK11PrivKey key, int kea)
public static int ConfigServerCert(PRFDProxy fd, PK11Cert cert, PK11PrivKey key)
public static int ConfigServerSessionIDCache(int maxCacheEntries, long timeout, long ssl3_timeout, java.lang.String directory)
public static PK11Cert PeerCertificate(PRFDProxy fd)