public class TlsExtensionsUtils extends Object
Modifier and Type | Field and Description |
---|---|
static Integer |
EXT_encrypt_then_mac |
static Integer |
EXT_extended_master_secret |
static Integer |
EXT_heartbeat |
static Integer |
EXT_max_fragment_length |
static Integer |
EXT_padding |
static Integer |
EXT_server_name |
static Integer |
EXT_status_request |
static Integer |
EXT_truncated_hmac |
Constructor and Description |
---|
TlsExtensionsUtils() |
public static final Integer EXT_encrypt_then_mac
public static final Integer EXT_extended_master_secret
public static final Integer EXT_heartbeat
public static final Integer EXT_max_fragment_length
public static final Integer EXT_padding
public static final Integer EXT_server_name
public static final Integer EXT_status_request
public static final Integer EXT_truncated_hmac
public static Hashtable ensureExtensionsInitialised(Hashtable extensions)
public static void addEncryptThenMACExtension(Hashtable extensions)
public static void addExtendedMasterSecretExtension(Hashtable extensions)
public static void addHeartbeatExtension(Hashtable extensions, HeartbeatExtension heartbeatExtension) throws IOException
IOException
public static void addMaxFragmentLengthExtension(Hashtable extensions, short maxFragmentLength) throws IOException
IOException
public static void addPaddingExtension(Hashtable extensions, int dataLength) throws IOException
IOException
public static void addServerNameExtension(Hashtable extensions, ServerNameList serverNameList) throws IOException
IOException
public static void addTruncatedHMacExtension(Hashtable extensions)
public static HeartbeatExtension getHeartbeatExtension(Hashtable extensions) throws IOException
IOException
public static short getMaxFragmentLengthExtension(Hashtable extensions) throws IOException
IOException
public static int getPaddingExtension(Hashtable extensions) throws IOException
IOException
public static ServerNameList getServerNameExtension(Hashtable extensions) throws IOException
IOException
public static boolean hasEncryptThenMACExtension(Hashtable extensions) throws IOException
IOException
public static boolean hasExtendedMasterSecretExtension(Hashtable extensions) throws IOException
IOException
public static boolean hasTruncatedHMacExtension(Hashtable extensions) throws IOException
IOException
public static byte[] createEmptyExtensionData()
public static byte[] createEncryptThenMACExtension()
public static byte[] createExtendedMasterSecretExtension()
public static byte[] createHeartbeatExtension(HeartbeatExtension heartbeatExtension) throws IOException
IOException
public static byte[] createMaxFragmentLengthExtension(short maxFragmentLength) throws IOException
IOException
public static byte[] createPaddingExtension(int dataLength) throws IOException
IOException
public static byte[] createServerNameExtension(ServerNameList serverNameList) throws IOException
IOException
public static byte[] createTruncatedHMacExtension()
public static boolean readEncryptThenMACExtension(byte[] extensionData) throws IOException
IOException
public static boolean readExtendedMasterSecretExtension(byte[] extensionData) throws IOException
IOException
public static HeartbeatExtension readHeartbeatExtension(byte[] extensionData) throws IOException
IOException
public static short readMaxFragmentLengthExtension(byte[] extensionData) throws IOException
IOException
public static int readPaddingExtension(byte[] extensionData) throws IOException
IOException
public static ServerNameList readServerNameExtension(byte[] extensionData) throws IOException
IOException
public static boolean readTruncatedHMacExtension(byte[] extensionData) throws IOException
IOException