use of org.eclipse.californium.elements.config.Configuration 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.elements.config.Configuration in project californium by eclipse.
the class LibCoapClientOpensslInteroperabilityTest 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.elements.config.Configuration in project californium by eclipse.
the class LibCoapClientOpensslInteroperabilityTest method testLibCoapClientPskMultiFragment.
@Test
public void testLibCoapClientPskMultiFragment() throws Exception {
CipherSuite cipherSuite = CipherSuite.TLS_PSK_WITH_AES_128_CCM_8;
DtlsConnectorConfig.Builder builder = DtlsConnectorConfig.builder(new Configuration()).set(DtlsConfig.DTLS_USE_MULTI_HANDSHAKE_MESSAGE_RECORDS, true);
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.elements.config.Configuration in project californium by eclipse.
the class LibCoapClientTinyDtlsInteroperabilityTest method testLibCoapClientTinyDtlsPskMultiFragment.
@Ignore
@Test
public void testLibCoapClientTinyDtlsPskMultiFragment() throws Exception {
CipherSuite cipherSuite = CipherSuite.TLS_PSK_WITH_AES_128_CCM_8;
DtlsConnectorConfig.Builder builder = DtlsConnectorConfig.builder(new Configuration()).set(DtlsConfig.DTLS_USE_MULTI_HANDSHAKE_MESSAGE_RECORDS, true);
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.elements.config.Configuration in project californium by eclipse.
the class LibCoapClientTinyDtlsInteroperabilityTest method testLibCoapClientTinyDtlsRpkAnonymousClient.
@Test
public void testLibCoapClientTinyDtlsRpkAnonymousClient() throws Exception {
processUtil.assumeMinVersion("4.3.0");
CipherSuite cipherSuite = CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8;
Configuration configuration = new Configuration();
configuration.set(DtlsConfig.DTLS_CLIENT_AUTHENTICATION_MODE, CertificateAuthenticationMode.NONE);
DtlsConnectorConfig.Builder builder = DtlsConnectorConfig.builder(configuration);
californiumUtil.start(BIND, builder, null, cipherSuite);
processUtil.startupClient(DESTINATION_URL + "test", RPK, "Hello, CoAP!", cipherSuite);
connect("Hello, CoAP!", "Greetings!", "certificate \\(11\\)");
assertNull(californiumUtil.getPrincipal());
}
Aggregations