public class EncryptionConfiguration
extends java.lang.Object
Constructor and Description |
---|
EncryptionConfiguration(long handle)
Constructor storing the pointer/address to the underlying native object
|
Modifier and Type | Method and Description |
---|---|
Result |
addCertificates(java.lang.String filename)
Adds TLS certificates from a PEM file
Adds the certificates found in the file.
|
Result |
addCertificatesDirect(byte[] data,
int dataLen)
Adds TLS certificates from memory
Adds the certificates at that memory location.
|
Result |
addKnownCertificate(java.lang.String pem)
Adds a certificate to the exception list
Adds the given certificate to the list of exceptions.
|
SecureCertStatus |
evaluateCertificateTrust(java.lang.String pem,
java.lang.String expectedName)
Evaluates the certificate trust type.
|
protected void |
finalize()
Ensures the underlying native object destruction
|
Result |
globalZrtpCache(java.lang.String value)
Configure global ZRTP ZID Cache file
Sets the full file name for the global ZRTP ZID Cache file.
|
long |
handle()
Gets the pointer/address to the underlying native object
|
TLSConfiguration |
tlsConfig()
Gets the TLS specific configuration
The configuration is applied with startContext! Any changes after startContext has been invoked will not
take effect until a restart happens - stopContext followed by startContext.
|
void |
tlsConfig(TLSConfiguration value)
Sets the TLS specific configuration
The configuration is applied with startContext! Any changes after startContext has been invoked will not
take effect until a restart happens - stopContext followed by startContext.
|
SecureCertStatus |
verifyUserCertificate(java.lang.String fileName,
java.lang.String passphrase)
Verifies usability for SSL certificate and key pair
This function can be used to check if a certificate and key pair found in a PEM or PKCS#12 file is valid before
applying it to a user.
|
public EncryptionConfiguration(long handle)
handle
- Pointer/address to the underlying native objectpublic long handle()
protected void finalize()
finalize
in class java.lang.Object
public TLSConfiguration tlsConfig()
TLSConfiguration
public void tlsConfig(TLSConfiguration value)
value
- The TLS configurationTLSConfiguration
public Result addKnownCertificate(java.lang.String pem)
pem
- The certificate in PEM formatonContextSecureCertStatus Result
public Result addCertificates(java.lang.String filename)
filename
- File name containing PEM certificates to addResult
public Result addCertificatesDirect(byte[] data, int dataLen)
data
- data to the buffer containing PEM certificatesdataLen
- Size of the buffer in bytesResult
public Result globalZrtpCache(java.lang.String value)
value
- The ZID Cache file name, or empty to disableResult
public SecureCertStatus evaluateCertificateTrust(java.lang.String pem, java.lang.String expectedName)
pem
- The PEM encoded certificateexpectedName
- The policy will require this value to match the host name.SecureCertStatus
public SecureCertStatus verifyUserCertificate(java.lang.String fileName, java.lang.String passphrase)
fileName
- File name of the cert+key pair. Accepts PEM (text file with the cert and key one after the
other in base64 encoding) or PKCS#12 (a binary format more common on Windows)passphrase
- Optional, the pass phrase which is used to protect the private key in the filetlsConfiguration::SecureSuite