public final class OKVSSLConnection extends java.lang.Object implements OKVPrimitiveConnection
Constructor and Description |
---|
OKVSSLConnection(java.lang.String serverIP,
int serverPort,
java.lang.String walletLoc,
oracle.okv.utils.OKVSecureString psd) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the connection to the Oracle Key Vault
server if it is not yet already closed.
|
byte[] |
getCACertFromSSLConnection(java.lang.String userCertIssuerDN)
Get CA Certificate from SSL connection.
|
boolean |
isClosed()
Checks if the connection is closed.
|
void |
open()
Opens the connection to the Oracle Key Vault server if
it is not yet already open.
|
int |
recv(byte[] bytes,
int offset,
int len)
Receives a byte array from the Oracle Key Vault server.
|
void |
send(byte[] bytes)
Sends a byte array to the Oracle Key Vault server.
|
public OKVSSLConnection(java.lang.String serverIP, int serverPort, java.lang.String walletLoc, oracle.okv.utils.OKVSecureString psd) throws OKVConnectionException
OKVConnectionException
public void send(byte[] bytes) throws java.io.IOException
send
in interface OKVPrimitiveConnection
bytes
- the bytes to be sent to the serverjava.io.IOException
public void open() throws java.io.IOException, OKVConnectionException
open
in interface OKVPrimitiveConnection
java.io.IOException
OKVConnectionException
public boolean isClosed()
isClosed
in interface OKVPrimitiveConnection
public void close() throws java.io.IOException
close
in interface OKVPrimitiveConnection
java.io.IOException
public int recv(byte[] bytes, int offset, int len)
recv
in interface OKVPrimitiveConnection
bytes
- the byte array to which content from OKV server
is to be readoffset
- offset at which to start storing the byteslen
- maximum number of bytes to readpublic byte[] getCACertFromSSLConnection(java.lang.String userCertIssuerDN)
userCertIssuerDN
- DN of CA Certificate to be returned