public Hashtable<?, ?> getClientExtensions() throws IOException { Hashtable<?, ?> clientExtensions = TlsExtensionsUtils.ensureExtensionsInitialised(super.getClientExtensions()); TlsExtensionsUtils.addEncryptThenMACExtension(clientExtensions); // TODO[draft-ietf-tls-session-hash-01] Enable once code-point assigned (only for compatible server though) // TlsExtensionsUtils.addExtendedMasterSecretExtension(clientExtensions); TlsExtensionsUtils.addMaxFragmentLengthExtension(clientExtensions, MaxFragmentLength.pow2_9); TlsExtensionsUtils.addTruncatedHMacExtension(clientExtensions); return clientExtensions; }
/** * {@inheritDoc} * * Includes the <tt>use_srtp</tt> extension in the DTLS extended client * hello. */ @Override @SuppressWarnings("rawtypes") public Hashtable getClientExtensions() throws IOException { Hashtable clientExtensions = super.getClientExtensions(); if (!isSrtpDisabled() && TlsSRTPUtils.getUseSRTPExtension(clientExtensions) == null) { if (clientExtensions == null) clientExtensions = new Hashtable(); TlsSRTPUtils.addUseSRTPExtension( clientExtensions, new UseSRTPData( DtlsControlImpl.SRTP_PROTECTION_PROFILES, mki)); } return clientExtensions; }