DtlsConnectorConfig { public List<CipherSuite> getSupportedCipherSuites() { return supportedCipherSuites; } private  DtlsConnectorConfig(); Integer getRecordSizeLimit(); Integer getMaxFragmentLengthCode(); Integer getMaxFragmentedHandshakeMessageLength(); Boolean useMultiRecordMessages(); Boolean useMultiHandshakeMessageRecords(); ProtocolVersion getProtocolVersionForHelloVerifyRequests(); Integer getRetransmissionTimeout(); Integer getMaxDeferredProcessedOutgoingApplicationDataMessages(); Integer getMaxDeferredProcessedIncomingRecordsSize(); Integer getBackOffRetransmission(); Integer getMaxRetransmissions(); Integer getMaxTransmissionUnit(); Integer getMaxTransmissionUnitLimit(); Boolean isEarlyStopRetransmission(); Boolean isAddressReuseEnabled(); Boolean isSniEnabled(); Integer getVerifyPeersOnResumptionThreshold(); ConnectionIdGenerator getConnectionIdGenerator(); Integer getOutboundMessageBufferSize(); InetSocketAddress getAddress(); List<X509Certificate> getCertificateChain(); CipherSuiteSelector getCipherSuiteSelector(); List<CipherSuite> getPreselectedCipherSuites(); List<CipherSuite> getSupportedCipherSuites(); List<SignatureAndHashAlgorithm> getSupportedSignatureAlgorithms(); List<SupportedGroup> getSupportedGroups(); PrivateKey getPrivateKey(); @Deprecated PskStore getPskStore(); AdvancedPskStore getAdvancedPskStore(); PublicKey getPublicKey(); @Deprecated X509Certificate[] getTrustStore(); @Deprecated CertificateVerifier getCertificateVerifier(); NewAdvancedCertificateVerifier getAdvancedCertificateVerifier(); ApplicationLevelInfoSupplier getApplicationLevelInfoSupplier(); Boolean isClientAuthenticationWanted(); Boolean isClientAuthenticationRequired(); Boolean isServerOnly(); String getDefaultHandshakeMode(); List<CertificateType> getIdentityCertificateTypes(); List<CertificateType> getTrustCertificateTypes(); Integer getMaxConnections(); Long getStaleConnectionThreshold(); Integer getConnectionThreadCount(); Integer getReceiverThreadCount(); Integer getSocketReceiveBufferSize(); Integer getSocketSendBufferSize(); Long getAutoResumptionTimeoutMillis(); Boolean useNoServerSessionId(); Boolean useAntiReplayFilter(); @Deprecated Boolean useWindowFilter(); Integer useExtendedWindowFilter(); Boolean useCidUpdateAddressOnNewerRecordFilter(); @Deprecated TrustedRpkStore getRpkTrustStore(); Boolean useHandshakeStateValidation(); Boolean useKeyUsageVerification(); Boolean useTruncatedCertificatePathForClientsCertificateMessage(); Boolean useTruncatedCertificatePathForValidation(); ConnectionListener getConnectionListener(); String getLoggingTag(); Integer getHealthStatusInterval(); DtlsHealth getHealthHandler(); Boolean isClientOnly(); Boolean isRecommendedCipherSuitesOnly(); Boolean isRecommendedSupportedGroupsOnly(); static Builder builder(); static Builder builder(DtlsConnectorConfig config); static final int DEFAULT_MAX_DEFERRED_PROCESSED_APPLICATION_DATA_MESSAGES; static final int DEFAULT_MAX_CONNECTIONS; static final int DEFAULT_MAX_FRAGMENTED_HANDSHAKE_MESSAGE_LENGTH; static final int DEFAULT_MAX_DEFERRED_PROCESSED_HANDSHAKE_RECORDS_SIZE; static final long DEFAULT_STALE_CONNECTION_TRESHOLD; static final int DEFAULT_RETRANSMISSION_TIMEOUT_MS; static final int DEFAULT_MAX_RETRANSMISSIONS; static final int DEFAULT_VERIFY_PEERS_ON_RESUMPTION_THRESHOLD_IN_PERCENT; static final int DEFAULT_MAX_TRANSMISSION_UNIT_LIMIT; }
@Test public void testBuilderSetsPskCipherSuitesWhenPskStoreIsSet() { DtlsConnectorConfig config = builder.setAdvancedPskStore(new AdvancedSinglePskStore("ID", "KEY".getBytes())).build(); assertFalse(config.getSupportedCipherSuites().isEmpty()); for (CipherSuite suite : config.getSupportedCipherSuites()) { assertThat(suite.getKeyExchange(), either(is(KeyExchangeAlgorithm.PSK)).or(is(KeyExchangeAlgorithm.ECDHE_PSK))); } }