|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CertificateService
A service which implementors will ask the user for permission for the certificates which are for some reason not valid and not globally trusted.
| Field Summary | |
|---|---|
static int |
DO_NOT_TRUST
Result of user interaction. |
static String |
PNAME_ALWAYS_TRUST
Property for always trust mode. |
static String |
PNAME_CLIENTAUTH_CERTCONFIG_BASE
The property name prefix of all client authentication configurations. |
static String |
PNAME_NO_USER_INTERACTION
When set to true, the certificate check is performed. |
static String |
PNAME_TRUSTSTORE_FILE
Property that is being applied to the system property javax.net.ssl.trustStore |
static String |
PNAME_TRUSTSTORE_PASSWORD
Property that is being applied to the system property javax.net.ssl.trustStorePassword |
static String |
PNAME_TRUSTSTORE_TYPE
Property that is being applied to the system property javax.net.ssl.trustStoreType |
static int |
TRUST_ALWAYS
Result of user interaction. |
static int |
TRUST_THIS_SESSION_ONLY
Result of user interaction. |
| Method Summary | |
|---|---|
void |
addCertificateToTrust(Certificate cert,
String trustFor,
int trustMode)
Adds a certificate to the local trust store. |
List<CertificateConfigEntry> |
getClientAuthCertificateConfigs()
Returns all saved CertificateConfigEntrys. |
SSLContext |
getSSLContext()
Get an SSL Context that validates certificates based on the JRE default check and asks the user when the JRE check fails. |
SSLContext |
getSSLContext(KeyManager[] keyManagers,
X509TrustManager trustManager)
Get an SSL Context with the specified trustmanager. |
SSLContext |
getSSLContext(String clientCertConfig,
X509TrustManager trustManager)
Get an SSL Context with the specified trustmanager. |
SSLContext |
getSSLContext(X509TrustManager trustManager)
Get an SSL Context with the specified trustmanager. |
List<KeyStoreType> |
getSupportedKeyStoreTypes()
Gets a list of all supported KeyStore types. |
X509TrustManager |
getTrustManager(Iterable<String> identitiesToTest)
Creates a trustmanager that validates the certificate based on the JRE default check and asks the user when the JRE check fails. |
X509TrustManager |
getTrustManager(Iterable<String> identitiesToTest,
CertificateMatcher clientVerifier,
CertificateMatcher serverVerifier)
Creates a trustmanager that validates the certificate based on the JRE default check and asks the user when the JRE check fails. |
X509TrustManager |
getTrustManager(String identityToTest)
|
X509TrustManager |
getTrustManager(String identityToTest,
CertificateMatcher clientVerifier,
CertificateMatcher serverVerifier)
|
void |
removeClientAuthCertificateConfig(String id)
Deletes a saved CertificateConfigEntry. |
void |
setClientAuthCertificateConfig(CertificateConfigEntry entry)
Saves or updates the passed CertificateConfigEntry to the config. |
| Field Detail |
|---|
static final String PNAME_ALWAYS_TRUST
static final String PNAME_NO_USER_INTERACTION
static final String PNAME_CLIENTAUTH_CERTCONFIG_BASE
static final String PNAME_TRUSTSTORE_TYPE
static final String PNAME_TRUSTSTORE_FILE
static final String PNAME_TRUSTSTORE_PASSWORD
static final int DO_NOT_TRUST
static final int TRUST_ALWAYS
static final int TRUST_THIS_SESSION_ONLY
| Method Detail |
|---|
List<CertificateConfigEntry> getClientAuthCertificateConfigs()
CertificateConfigEntrys.
void removeClientAuthCertificateConfig(String id)
CertificateConfigEntry.
id - The ID (CertificateConfigEntry.getId()) of the entry to
delete.void setClientAuthCertificateConfig(CertificateConfigEntry entry)
CertificateConfigEntry to the config.
If CertificateConfigEntry.getId() returns null, a new entry is
created.
entry - The @see CertificateConfigEntry to save or update.List<KeyStoreType> getSupportedKeyStoreTypes()
SSLContext getSSLContext()
throws GeneralSecurityException
GeneralSecurityException
SSLContext getSSLContext(X509TrustManager trustManager)
throws GeneralSecurityException
trustManager - The trustmanager that will be used by the created
SSLContext
GeneralSecurityException
SSLContext getSSLContext(String clientCertConfig,
X509TrustManager trustManager)
throws GeneralSecurityException
clientCertConfig - The ID of a client certificate configuration
entry that is to be used when the server asks for a client TLS
certificatetrustManager - The trustmanager that will be used by the created
SSLContext
GeneralSecurityException
SSLContext getSSLContext(KeyManager[] keyManagers,
X509TrustManager trustManager)
throws GeneralSecurityException
keyManagers - The key manager(s) to be used for client
authenticationtrustManager - The trustmanager that will be used by the created
SSLContext
GeneralSecurityException
X509TrustManager getTrustManager(Iterable<String> identitiesToTest)
throws GeneralSecurityException
identitiesToTest - when not null, the values are assumed
to be hostnames for invocations of checkServerTrusted and
e-mail addresses for invocations of checkClientTrusted
GeneralSecurityException
X509TrustManager getTrustManager(String identityToTest)
throws GeneralSecurityException
identityToTest - when not null, the value is assumed to
be a hostname for invocations of checkServerTrusted and an
e-mail address for invocations of checkClientTrusted
GeneralSecurityExceptiongetTrustManager(Iterable)
X509TrustManager getTrustManager(String identityToTest,
CertificateMatcher clientVerifier,
CertificateMatcher serverVerifier)
throws GeneralSecurityException
identityToTest - The identity to match against the supplied
verifiers.clientVerifier - The verifier to use in calls to checkClientTrustedserverVerifier - The verifier to use in calls to checkServerTrusted
GeneralSecurityExceptiongetTrustManager(Iterable, CertificateMatcher, CertificateMatcher)
X509TrustManager getTrustManager(Iterable<String> identitiesToTest,
CertificateMatcher clientVerifier,
CertificateMatcher serverVerifier)
throws GeneralSecurityException
identitiesToTest - The identities to match against the supplied
verifiers.clientVerifier - The verifier to use in calls to checkClientTrustedserverVerifier - The verifier to use in calls to checkServerTrusted
GeneralSecurityException
void addCertificateToTrust(Certificate cert,
String trustFor,
int trustMode)
throws CertificateException
cert - The certificate to add to the trust store.trustFor - trustMode - Whether to trust the certificate permanently or only
for the current session.
CertificateException - when the thumbprint could not be calculated
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||