Top Fields Constructors Methods
org.apache.tomcat.jni

public final Class SSL

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final long
public static final long
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int

Constructor Summary

AccessConstructor and Description
public
SSL()

Method Summary

Modifier and TypeMethod and Description
public static native int

Returns:

the handshake status
doHandshake
(long
the SSL instance (SSL *)
ssl
)

SSL_do_handshake

public static native int

Returns:

FIPS_mode return code. It is 0 if OpenSSL is not in FIPS mode, 1 if OpenSSL is in FIPS Mode.
fipsModeGet
()

Get the status of FIPS Mode.

public static native int

Returns:

FIPS_mode_set return code
fipsModeSet
(int
1 - enable, 0 - disable
mode
)

Enable/Disable FIPS Mode.

public static native void
freeBIO(long
BIO pointer
bio
)

BIO_free

public static native void
freeSSL(long
the SSL instance (SSL *)
ssl
)

SSL_free

public static native String

Returns:

the ALPN protocol negotiated
getAlpnSelected
(long
the SSL instance (SSL *)
ssl
)

SSL_get0_alpn_selected

public static native String

Returns:

the cipher name
getCipherForSSL
(long
the SSL instance (SSL *)
ssl
)

SSL_get_cipher.

public static native String[]

Returns:

ciphers
getCiphers
(long
the SSL instance (SSL *)
ssl
)

Returns all cipher suites that are enabled for negotiation in an SSL handshake.

public static native String

Returns:

an error message
getErrorString
(long
The error code
errorNumber
)

Get the error number representing for the given errorNumber.

public static native int

Returns:

the count
getHandshakeCount
(long
SSL pointer
ssl
)

Return the handshake completed count.

public static native int

Returns:

the last error number
getLastErrorNumber
()

Get the error number representing the last error OpenSSL encountered on this thread.

public static native int

Returns:

options See SSL.SSL_OP_* for option flags.
getOptions
(long
the SSL instance (SSL *)
ssl
)

Get OpenSSL Option.

public static native byte[][]

Returns:

the certificate chain bytes
getPeerCertChain
(long
the SSL instance (SSL *)
ssl
)

Get the peer certificate chain or null if non was send.

public static native byte[]

Returns:

the certificate bytes
getPeerCertificate
(long
the SSL instance (SSL *)
ssl
)

Get the peer certificate or null if non was send.

public static native int

Returns:

the operation status
getPostHandshakeAuthInProgress
(long
the SSL instance (SSL *)
ssl
)

Is post handshake authentication in progress on this connection?

public static native byte[]

Returns:

the session as byte array representation obtained via SSL_SESSION_get_id.
getSessionId
(long
the SSL instance (SSL *)
ssl
)

Returns the ID of the session as byte array representation.

public static native int

Returns:

the operation status
getShutdown
(long
the SSL instance (SSL *)
ssl
)

SSL_get_shutdown

public static native long

Returns:

returns the time at which the session ssl was established. The time is given in seconds since the Epoch
getTime
(long
the SSL instance (SSL *)
ssl
)

SSL_get_time

public static native String

Returns:

the SSL version in use
getVersion
(long
the SSL instance (SSL *)
ssl
)

SSL_get_version

public static native int

Returns:

APR status code
initialize
(String
Support for external a Crypto Device ("engine"), usually a hardware accelerator card for crypto operations.
engine
)

Initialize OpenSSL support.

public static native int

Returns:

the status
isInInit
(long
the SSL instance (SSL *)
ssl
)

SSL_in_init.

public static native long

Returns:

pointer to the Network BIO (BIO *)
makeNetworkBIO
(long
the SSL instance (SSL *)
ssl
)

Wire up internal and network BIOs for the given SSL instance.

public static native long

Returns:

pointer to SSL instance (SSL *)
newSSL
(long
Server or Client context to use.
ctx
,
boolean
if true configure SSL instance to use accept handshake routines if false configure SSL instance to use connect handshake routines
server
)

SSL_new

public static native int

Returns:

the pending bytes count
pendingReadableBytesInSSL
(long
SSL pointer (SSL *)
ssl
)

SSL_pending.

public static native int

Returns:

the pending bytes count
pendingWrittenBytesInBIO
(long
BIO pointer (BIO *)
bio
)

BIO_ctrl_pending.

public static native void
randSet(String
Filename to use. If set it will be used for SSL initialization and all contexts where explicitly not set.
filename
)

Sets global random filename.

public static native int

Returns:

the bytes count read
readFromBIO
(long
BIO pointer
bio
,
long
Buffer pointer
rbuf
,
int
Read length
rlen
)

BIO_read.

public static native int

Returns:

the bytes count read
readFromSSL
(long
the SSL instance (SSL *)
ssl
,
long
Buffer pointer
rbuf
,
int
Read length
rlen
)

SSL_read

public static native int

Returns:

the operation status
renegotiate
(long
the SSL instance (SSL *)
ssl
)

SSL_renegotiate

public static native int

Returns:

the operation status
renegotiatePending
(long
the SSL instance (SSL *)
ssl
)

SSL_renegotiate_pending

public static native boolean

Returns:

true if the operation was successful
setCipherSuites
(long
the SSL instance (SSL *)
ssl
,
String
an SSL cipher specification
ciphers
)

Returns the cipher suites available for negotiation in SSL handshake.

public static native void
setOptions(long
the SSL instance (SSL *)
ssl
,
int
See SSL.SSL_OP_* for option flags.
options
)

Set OpenSSL Option.

public static native void
setVerify(long
the SSL instance (SSL *)
ssl
,
int
Type of Client Certificate verification.
level
,
int
Maximum depth of CA Certificates in Client Certificate verification.
depth
)

Set Type of Client Certificate verification and Maximum depth of CA Certificates in Client Certificate verification.

public static native int

Returns:

the operation status
shutdownSSL
(long
the SSL instance (SSL *)
ssl
)

SSL_shutdown

public static native int

Returns:

the operation status
verifyClientPostHandshake
(long
the SSL instance (SSL *)
ssl
)

SSL_verify_client_post_handshake

public static native int
public static native String
public static native int

Returns:

the bytes count written
writeToBIO
(long
BIO pointer
bio
,
long
Buffer pointer
wbuf
,
int
Write length
wlen
)

BIO_write.

public static native int

Returns:

the bytes count written
writeToSSL
(long
the SSL instance (SSL *)
ssl
,
long
Buffer pointer
wbuf
,
int
Write length
wlen
)

SSL_write.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait