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 int |
AttachClientCertCallback(SSLFDProxy fd)
Use client authentication; set client certificate from SSLFDProxy.
|
static boolean |
CipherPrefGet(SSLFDProxy fd,
int cipher)
Get the preference for a specific cipher suite on the specified
PRFileDesc.
|
static int |
CipherPrefSet(SSLFDProxy fd,
int cipher,
boolean enabled)
Set the preference for a specific cipher suite on the specified
PRFileDesc.
|
static int |
ConfigJSSDefaultCertAuthCallback(SSLFDProxy fd)
Use the default JSS certificate checking handler (which understands CryptoManager
OCSP status).
|
static int |
ConfigSecureServer(SSLFDProxy fd,
PK11Cert cert,
PK11PrivKey key,
int kea)
Deprecated.
replaced with ConfigServerCert
See also: SSL_ConfigSecureServer in /usr/include/nss3/ssl.h
|
static int |
ConfigServerCert(SSLFDProxy 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 |
EnableAlertLogging(SSLFDProxy fd)
Enable recording of alerts in the SSLFDProxy object.
|
static int |
ForceHandshake(SSLFDProxy fd)
Force a handshake to occur if not started, else step one.
|
static SSLFDProxy |
ImportFD(PRFDProxy model,
PRFDProxy fd)
Import a file descriptor to create a new SSL file descriptor out of it.
|
static int |
OptionGet(SSLFDProxy fd,
int option)
Get the value of a SSL option on the specified PRFileDesc.
|
static int |
OptionSet(SSLFDProxy fd,
int option,
int val)
Set the value of a SSL option on the specified PRFileDesc.
|
static PK11Cert |
PeerCertificate(SSLFDProxy fd)
Introspect the peer's certificate.
|
static PK11Cert[] |
PeerCertificateChain(SSLFDProxy fd)
Introspect the peer's certificate chain.
|
static void |
RemoveCallbacks(SSLFDProxy fd)
Removes all enabled callbacks.
|
static int |
ResetHandshake(SSLFDProxy fd,
boolean asServer)
Reset the handshake status, optionally handshaking as a server.
|
static SecurityStatusResult |
SecurityStatus(SSLFDProxy fd)
Check the security status of a SSL handshake.
|
static int |
SetURL(SSLFDProxy fd,
java.lang.String url)
Set the hostname of a handshake on the specified PRFileDesc.
|
static SSLVersionRange |
VersionRangeGet(SSLFDProxy fd)
Get the range of TLS versions enabled by this server.
|
static int |
VersionRangeSet(SSLFDProxy 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 SSLFDProxy ImportFD(PRFDProxy model, PRFDProxy fd)
public static int OptionSet(SSLFDProxy fd, int option, int val)
public static int OptionGet(SSLFDProxy fd, int option) throws java.lang.Exception
java.lang.Exception
public static int SetURL(SSLFDProxy fd, java.lang.String url)
public static int CipherPrefSet(SSLFDProxy fd, int cipher, boolean enabled)
public static boolean CipherPrefGet(SSLFDProxy fd, int cipher) throws java.lang.Exception
java.lang.Exception
public static int VersionRangeSet(SSLFDProxy fd, SSLVersionRange range)
public static SSLVersionRange VersionRangeGet(SSLFDProxy fd) throws java.lang.Exception
java.lang.Exception
public static SecurityStatusResult SecurityStatus(SSLFDProxy fd)
public static int ResetHandshake(SSLFDProxy fd, boolean asServer)
public static int ForceHandshake(SSLFDProxy fd)
@Deprecated public static int ConfigSecureServer(SSLFDProxy fd, PK11Cert cert, PK11PrivKey key, int kea)
public static int ConfigServerCert(SSLFDProxy fd, PK11Cert cert, PK11PrivKey key)
public static int ConfigServerSessionIDCache(int maxCacheEntries, long timeout, long ssl3_timeout, java.lang.String directory)
public static PK11Cert PeerCertificate(SSLFDProxy fd)
public static PK11Cert[] PeerCertificateChain(SSLFDProxy fd) throws java.lang.Exception
java.lang.Exception
public static int AttachClientCertCallback(SSLFDProxy fd)
public static int EnableAlertLogging(SSLFDProxy fd)
public static int ConfigJSSDefaultCertAuthCallback(SSLFDProxy fd)
public static void RemoveCallbacks(SSLFDProxy fd)