use of org.eclipse.californium.scandium.dtls.cipher.CipherSuite in project californium by eclipse.
the class LibCoapClientGnuTlsInteroperabilityTest method testLibCoapClientPskNoSessionId.
@Test
public void testLibCoapClientPskNoSessionId() throws Exception {
CipherSuite cipherSuite = CipherSuite.TLS_PSK_WITH_AES_128_CCM_8;
DtlsConnectorConfig.Builder builder = DtlsConnectorConfig.builder(new Configuration()).set(DtlsConfig.DTLS_SERVER_USE_SESSION_ID, false);
californiumUtil.start(BIND, builder, null, cipherSuite);
processUtil.startupClient(DESTINATION_URL + "test", PSK, "Hello, CoAP!", cipherSuite);
connect("Hello, CoAP!", "Greetings!");
californiumUtil.assertPrincipalType(PreSharedKeyIdentity.class);
}
use of org.eclipse.californium.scandium.dtls.cipher.CipherSuite in project californium by eclipse.
the class LibCoapClientGnuTlsInteroperabilityTest method testLibCoapClientPsk.
@Test
public void testLibCoapClientPsk() throws Exception {
CipherSuite cipherSuite = CipherSuite.TLS_PSK_WITH_AES_128_CCM_8;
californiumUtil.start(BIND, null, cipherSuite);
processUtil.startupClient(DESTINATION_URL + "test", PSK, "Hello, CoAP!", cipherSuite);
connect("Hello, CoAP!", "Greetings!");
californiumUtil.assertPrincipalType(PreSharedKeyIdentity.class);
}
use of org.eclipse.californium.scandium.dtls.cipher.CipherSuite in project californium by eclipse.
the class LibCoapClientGnuTlsInteroperabilityTest method testLibCoapClientEcdsaGCM.
@Test
public void testLibCoapClientEcdsaGCM() throws Exception {
assumeNotNull(clientPrivateKey);
CipherSuite cipherSuite = CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256;
assumeTrue("GCM not support by JCE", cipherSuite.isSupported());
californiumUtil.start(BIND, null, cipherSuite);
processUtil.startupClient(DESTINATION_URL + "test", CHAIN, "Hello, CoAP!", cipherSuite);
connect("Hello, CoAP!", "Greetings!");
californiumUtil.assertPrincipalType(X509CertPath.class);
}
use of org.eclipse.californium.scandium.dtls.cipher.CipherSuite in project californium by eclipse.
the class LibCoapClientGnuTlsInteroperabilityTest method testLibCoapClientEcdsaTrust.
@Test
public void testLibCoapClientEcdsaTrust() throws Exception {
assumeNotNull(clientPrivateKey);
CipherSuite cipherSuite = CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8;
californiumUtil.start(BIND, null, cipherSuite);
processUtil.startupClient(DESTINATION_URL + "test", TRUST, "Hello, CoAP!", cipherSuite);
connect("Hello, CoAP!", "Greetings!");
californiumUtil.assertPrincipalType(X509CertPath.class);
}
use of org.eclipse.californium.scandium.dtls.cipher.CipherSuite in project californium by eclipse.
the class LibCoapClientGnuTlsInteroperabilityTest method testLibCoapClientPskGCM.
@Test
public void testLibCoapClientPskGCM() throws Exception {
CipherSuite cipherSuite = CipherSuite.TLS_PSK_WITH_AES_128_GCM_SHA256;
assumeTrue("GCM not support by JCE", cipherSuite.isSupported());
californiumUtil.start(BIND, null, cipherSuite);
processUtil.startupClient(DESTINATION_URL + "test", PSK, "Hello, CoAP!", cipherSuite);
connect("Hello, CoAP!", "Greetings!");
californiumUtil.assertPrincipalType(PreSharedKeyIdentity.class);
}
Aggregations