Package org.bouncycastle.tls
Class TlsExtensionsUtils
- java.lang.Object
-
- org.bouncycastle.tls.TlsExtensionsUtils
-
public class TlsExtensionsUtils extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.IntegerEXT_application_layer_protocol_negotiationstatic java.lang.IntegerEXT_certificate_authoritiesstatic java.lang.IntegerEXT_client_certificate_typestatic java.lang.IntegerEXT_client_certificate_urlstatic java.lang.IntegerEXT_cookiestatic java.lang.IntegerEXT_early_datastatic java.lang.IntegerEXT_ec_point_formatsstatic java.lang.IntegerEXT_encrypt_then_macstatic java.lang.IntegerEXT_extended_master_secretstatic java.lang.IntegerEXT_heartbeatstatic java.lang.IntegerEXT_key_sharestatic java.lang.IntegerEXT_max_fragment_lengthstatic java.lang.IntegerEXT_oid_filtersstatic java.lang.IntegerEXT_paddingstatic java.lang.IntegerEXT_post_handshake_authstatic java.lang.IntegerEXT_pre_shared_keystatic java.lang.IntegerEXT_psk_key_exchange_modesstatic java.lang.IntegerEXT_record_size_limitstatic java.lang.IntegerEXT_server_certificate_typestatic java.lang.IntegerEXT_server_namestatic java.lang.IntegerEXT_signature_algorithmsstatic java.lang.IntegerEXT_signature_algorithms_certstatic java.lang.IntegerEXT_status_requeststatic java.lang.IntegerEXT_status_request_v2static java.lang.IntegerEXT_supported_groupsstatic java.lang.IntegerEXT_supported_versionsstatic java.lang.IntegerEXT_truncated_hmacstatic java.lang.IntegerEXT_trusted_ca_keys
-
Constructor Summary
Constructors Constructor Description TlsExtensionsUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddALPNExtensionClient(java.util.Hashtable extensions, java.util.Vector protocolNameList)static voidaddALPNExtensionServer(java.util.Hashtable extensions, ProtocolName protocolName)static voidaddCertificateAuthoritiesExtension(java.util.Hashtable extensions, java.util.Vector authorities)static voidaddClientCertificateTypeExtensionClient(java.util.Hashtable extensions, short[] certificateTypes)static voidaddClientCertificateTypeExtensionServer(java.util.Hashtable extensions, short certificateType)static voidaddClientCertificateURLExtension(java.util.Hashtable extensions)static voidaddCookieExtension(java.util.Hashtable extensions, byte[] cookie)static voidaddEarlyDataIndication(java.util.Hashtable extensions)static voidaddEarlyDataMaxSize(java.util.Hashtable extensions, long maxSize)static voidaddEmptyExtensionData(java.util.Hashtable extensions, java.lang.Integer extType)static voidaddEncryptThenMACExtension(java.util.Hashtable extensions)static voidaddExtendedMasterSecretExtension(java.util.Hashtable extensions)static voidaddHeartbeatExtension(java.util.Hashtable extensions, HeartbeatExtension heartbeatExtension)static voidaddKeyShareClientHello(java.util.Hashtable extensions, java.util.Vector clientShares)static voidaddKeyShareHelloRetryRequest(java.util.Hashtable extensions, int namedGroup)static voidaddKeyShareServerHello(java.util.Hashtable extensions, KeyShareEntry serverShare)static voidaddMaxFragmentLengthExtension(java.util.Hashtable extensions, short maxFragmentLength)static voidaddOIDFiltersExtension(java.util.Hashtable extensions, java.util.Hashtable filters)static voidaddPaddingExtension(java.util.Hashtable extensions, int dataLength)static voidaddPostHandshakeAuthExtension(java.util.Hashtable extensions)static voidaddPreSharedKeyClientHello(java.util.Hashtable extensions, OfferedPsks offeredPsks)static voidaddPreSharedKeyServerHello(java.util.Hashtable extensions, int selectedIdentity)static voidaddPSKKeyExchangeModesExtension(java.util.Hashtable extensions, short[] modes)static voidaddRecordSizeLimitExtension(java.util.Hashtable extensions, int recordSizeLimit)static voidaddServerCertificateTypeExtensionClient(java.util.Hashtable extensions, short[] certificateTypes)static voidaddServerCertificateTypeExtensionServer(java.util.Hashtable extensions, short certificateType)static voidaddServerNameExtensionClient(java.util.Hashtable extensions, java.util.Vector serverNameList)static voidaddServerNameExtensionServer(java.util.Hashtable extensions)static voidaddSignatureAlgorithmsCertExtension(java.util.Hashtable extensions, java.util.Vector supportedSignatureAlgorithms)static voidaddSignatureAlgorithmsExtension(java.util.Hashtable extensions, java.util.Vector supportedSignatureAlgorithms)static voidaddStatusRequestExtension(java.util.Hashtable extensions, CertificateStatusRequest statusRequest)static voidaddStatusRequestV2Extension(java.util.Hashtable extensions, java.util.Vector statusRequestV2)static voidaddSupportedGroupsExtension(java.util.Hashtable extensions, java.util.Vector namedGroups)static voidaddSupportedPointFormatsExtension(java.util.Hashtable extensions, short[] ecPointFormats)static voidaddSupportedVersionsExtensionClient(java.util.Hashtable extensions, ProtocolVersion[] versions)static voidaddSupportedVersionsExtensionServer(java.util.Hashtable extensions, ProtocolVersion selectedVersion)static voidaddTruncatedHMacExtension(java.util.Hashtable extensions)static voidaddTrustedCAKeysExtensionClient(java.util.Hashtable extensions, java.util.Vector trustedAuthoritiesList)static voidaddTrustedCAKeysExtensionServer(java.util.Hashtable extensions)static byte[]createALPNExtensionClient(java.util.Vector protocolNameList)static byte[]createALPNExtensionServer(ProtocolName protocolName)static byte[]createCertificateAuthoritiesExtension(java.util.Vector authorities)static byte[]createCertificateTypeExtensionClient(short[] certificateTypes)static byte[]createCertificateTypeExtensionServer(short certificateType)static byte[]createClientCertificateURLExtension()static byte[]createCookieExtension(byte[] cookie)static byte[]createEarlyDataIndication()static byte[]createEarlyDataMaxSize(long maxSize)static byte[]createEmptyExtensionData()static byte[]createEncryptThenMACExtension()static byte[]createExtendedMasterSecretExtension()static byte[]createHeartbeatExtension(HeartbeatExtension heartbeatExtension)static byte[]createKeyShareClientHello(java.util.Vector clientShares)static byte[]createKeyShareHelloRetryRequest(int namedGroup)static byte[]createKeyShareServerHello(KeyShareEntry serverShare)static byte[]createMaxFragmentLengthExtension(short maxFragmentLength)static byte[]createOIDFiltersExtension(java.util.Hashtable filters)static byte[]createPaddingExtension(int dataLength)static byte[]createPostHandshakeAuthExtension()static byte[]createPreSharedKeyClientHello(OfferedPsks offeredPsks)static byte[]createPreSharedKeyServerHello(int selectedIdentity)static byte[]createPSKKeyExchangeModesExtension(short[] modes)static byte[]createRecordSizeLimitExtension(int recordSizeLimit)static byte[]createServerNameExtensionClient(java.util.Vector serverNameList)static byte[]createServerNameExtensionServer()static byte[]createSignatureAlgorithmsCertExtension(java.util.Vector supportedSignatureAlgorithms)static byte[]createSignatureAlgorithmsExtension(java.util.Vector supportedSignatureAlgorithms)static byte[]createStatusRequestExtension(CertificateStatusRequest statusRequest)static byte[]createStatusRequestV2Extension(java.util.Vector statusRequestV2)static byte[]createSupportedGroupsExtension(java.util.Vector namedGroups)static byte[]createSupportedPointFormatsExtension(short[] ecPointFormats)static byte[]createSupportedVersionsExtensionClient(ProtocolVersion[] versions)static byte[]createSupportedVersionsExtensionServer(ProtocolVersion selectedVersion)static byte[]createTruncatedHMacExtension()static byte[]createTrustedCAKeysExtensionClient(java.util.Vector trustedAuthoritiesList)static byte[]createTrustedCAKeysExtensionServer()static java.util.HashtableensureExtensionsInitialised(java.util.Hashtable extensions)static java.util.VectorgetALPNExtensionClient(java.util.Hashtable extensions)static ProtocolNamegetALPNExtensionServer(java.util.Hashtable extensions)static java.util.VectorgetCertificateAuthoritiesExtension(java.util.Hashtable extensions)static short[]getClientCertificateTypeExtensionClient(java.util.Hashtable extensions)static shortgetClientCertificateTypeExtensionServer(java.util.Hashtable extensions)static byte[]getCookieExtension(java.util.Hashtable extensions)static longgetEarlyDataMaxSize(java.util.Hashtable extensions)static HeartbeatExtensiongetHeartbeatExtension(java.util.Hashtable extensions)static java.util.VectorgetKeyShareClientHello(java.util.Hashtable extensions)static intgetKeyShareHelloRetryRequest(java.util.Hashtable extensions)static KeyShareEntrygetKeyShareServerHello(java.util.Hashtable extensions)static shortgetMaxFragmentLengthExtension(java.util.Hashtable extensions)static java.util.HashtablegetOIDFiltersExtension(java.util.Hashtable extensions)static intgetPaddingExtension(java.util.Hashtable extensions)static OfferedPsksgetPreSharedKeyClientHello(java.util.Hashtable extensions)static intgetPreSharedKeyServerHello(java.util.Hashtable extensions)static short[]getPSKKeyExchangeModesExtension(java.util.Hashtable extensions)static intgetRecordSizeLimitExtension(java.util.Hashtable extensions)static short[]getServerCertificateTypeExtensionClient(java.util.Hashtable extensions)static shortgetServerCertificateTypeExtensionServer(java.util.Hashtable extensions)static java.util.VectorgetServerNameExtensionClient(java.util.Hashtable extensions)static java.util.VectorgetSignatureAlgorithmsCertExtension(java.util.Hashtable extensions)static java.util.VectorgetSignatureAlgorithmsExtension(java.util.Hashtable extensions)static CertificateStatusRequestgetStatusRequestExtension(java.util.Hashtable extensions)static java.util.VectorgetStatusRequestV2Extension(java.util.Hashtable extensions)static int[]getSupportedGroupsExtension(java.util.Hashtable extensions)static short[]getSupportedPointFormatsExtension(java.util.Hashtable extensions)static ProtocolVersion[]getSupportedVersionsExtensionClient(java.util.Hashtable extensions)static ProtocolVersiongetSupportedVersionsExtensionServer(java.util.Hashtable extensions)static java.util.VectorgetTrustedCAKeysExtensionClient(java.util.Hashtable extensions)static booleanhasClientCertificateURLExtension(java.util.Hashtable extensions)static booleanhasEarlyDataIndication(java.util.Hashtable extensions)static booleanhasEncryptThenMACExtension(java.util.Hashtable extensions)static booleanhasExtendedMasterSecretExtension(java.util.Hashtable extensions)static booleanhasPostHandshakeAuthExtension(java.util.Hashtable extensions)static booleanhasServerNameExtensionServer(java.util.Hashtable extensions)static booleanhasTruncatedHMacExtension(java.util.Hashtable extensions)static booleanhasTrustedCAKeysExtensionServer(java.util.Hashtable extensions)static java.util.VectorreadALPNExtensionClient(byte[] extensionData)static ProtocolNamereadALPNExtensionServer(byte[] extensionData)static java.util.VectorreadCertificateAuthoritiesExtension(byte[] extensionData)static short[]readCertificateTypeExtensionClient(byte[] extensionData)static shortreadCertificateTypeExtensionServer(byte[] extensionData)static booleanreadClientCertificateURLExtension(byte[] extensionData)static byte[]readCookieExtension(byte[] extensionData)static booleanreadEarlyDataIndication(byte[] extensionData)static longreadEarlyDataMaxSize(byte[] extensionData)static booleanreadEncryptThenMACExtension(byte[] extensionData)static booleanreadExtendedMasterSecretExtension(byte[] extensionData)static HeartbeatExtensionreadHeartbeatExtension(byte[] extensionData)static java.util.VectorreadKeyShareClientHello(byte[] extensionData)static intreadKeyShareHelloRetryRequest(byte[] extensionData)static KeyShareEntryreadKeyShareServerHello(byte[] extensionData)static shortreadMaxFragmentLengthExtension(byte[] extensionData)static java.util.HashtablereadOIDFiltersExtension(byte[] extensionData)static intreadPaddingExtension(byte[] extensionData)static booleanreadPostHandshakeAuthExtension(byte[] extensionData)static OfferedPsksreadPreSharedKeyClientHello(byte[] extensionData)static intreadPreSharedKeyServerHello(byte[] extensionData)static short[]readPSKKeyExchangeModesExtension(byte[] extensionData)static intreadRecordSizeLimitExtension(byte[] extensionData)static java.util.VectorreadServerNameExtensionClient(byte[] extensionData)static booleanreadServerNameExtensionServer(byte[] extensionData)static java.util.VectorreadSignatureAlgorithmsCertExtension(byte[] extensionData)static java.util.VectorreadSignatureAlgorithmsExtension(byte[] extensionData)static CertificateStatusRequestreadStatusRequestExtension(byte[] extensionData)static java.util.VectorreadStatusRequestV2Extension(byte[] extensionData)static int[]readSupportedGroupsExtension(byte[] extensionData)static short[]readSupportedPointFormatsExtension(byte[] extensionData)static ProtocolVersion[]readSupportedVersionsExtensionClient(byte[] extensionData)static ProtocolVersionreadSupportedVersionsExtensionServer(byte[] extensionData)static booleanreadTruncatedHMacExtension(byte[] extensionData)static java.util.VectorreadTrustedCAKeysExtensionClient(byte[] extensionData)static booleanreadTrustedCAKeysExtensionServer(byte[] extensionData)
-
-
-
Field Detail
-
EXT_application_layer_protocol_negotiation
public static final java.lang.Integer EXT_application_layer_protocol_negotiation
-
EXT_certificate_authorities
public static final java.lang.Integer EXT_certificate_authorities
-
EXT_client_certificate_type
public static final java.lang.Integer EXT_client_certificate_type
-
EXT_client_certificate_url
public static final java.lang.Integer EXT_client_certificate_url
-
EXT_cookie
public static final java.lang.Integer EXT_cookie
-
EXT_early_data
public static final java.lang.Integer EXT_early_data
-
EXT_ec_point_formats
public static final java.lang.Integer EXT_ec_point_formats
-
EXT_encrypt_then_mac
public static final java.lang.Integer EXT_encrypt_then_mac
-
EXT_extended_master_secret
public static final java.lang.Integer EXT_extended_master_secret
-
EXT_heartbeat
public static final java.lang.Integer EXT_heartbeat
-
EXT_key_share
public static final java.lang.Integer EXT_key_share
-
EXT_max_fragment_length
public static final java.lang.Integer EXT_max_fragment_length
-
EXT_oid_filters
public static final java.lang.Integer EXT_oid_filters
-
EXT_padding
public static final java.lang.Integer EXT_padding
-
EXT_post_handshake_auth
public static final java.lang.Integer EXT_post_handshake_auth
-
EXT_pre_shared_key
public static final java.lang.Integer EXT_pre_shared_key
-
EXT_psk_key_exchange_modes
public static final java.lang.Integer EXT_psk_key_exchange_modes
-
EXT_record_size_limit
public static final java.lang.Integer EXT_record_size_limit
-
EXT_server_certificate_type
public static final java.lang.Integer EXT_server_certificate_type
-
EXT_server_name
public static final java.lang.Integer EXT_server_name
-
EXT_signature_algorithms
public static final java.lang.Integer EXT_signature_algorithms
-
EXT_signature_algorithms_cert
public static final java.lang.Integer EXT_signature_algorithms_cert
-
EXT_status_request
public static final java.lang.Integer EXT_status_request
-
EXT_status_request_v2
public static final java.lang.Integer EXT_status_request_v2
-
EXT_supported_groups
public static final java.lang.Integer EXT_supported_groups
-
EXT_supported_versions
public static final java.lang.Integer EXT_supported_versions
-
EXT_truncated_hmac
public static final java.lang.Integer EXT_truncated_hmac
-
EXT_trusted_ca_keys
public static final java.lang.Integer EXT_trusted_ca_keys
-
-
Method Detail
-
ensureExtensionsInitialised
public static java.util.Hashtable ensureExtensionsInitialised(java.util.Hashtable extensions)
-
addALPNExtensionClient
public static void addALPNExtensionClient(java.util.Hashtable extensions, java.util.Vector protocolNameList) throws java.io.IOException- Parameters:
protocolNameList- aVectorofProtocolName- Throws:
java.io.IOException
-
addALPNExtensionServer
public static void addALPNExtensionServer(java.util.Hashtable extensions, ProtocolName protocolName) throws java.io.IOException- Throws:
java.io.IOException
-
addCertificateAuthoritiesExtension
public static void addCertificateAuthoritiesExtension(java.util.Hashtable extensions, java.util.Vector authorities) throws java.io.IOException- Throws:
java.io.IOException
-
addClientCertificateTypeExtensionClient
public static void addClientCertificateTypeExtensionClient(java.util.Hashtable extensions, short[] certificateTypes) throws java.io.IOException- Throws:
java.io.IOException
-
addClientCertificateTypeExtensionServer
public static void addClientCertificateTypeExtensionServer(java.util.Hashtable extensions, short certificateType) throws java.io.IOException- Throws:
java.io.IOException
-
addClientCertificateURLExtension
public static void addClientCertificateURLExtension(java.util.Hashtable extensions)
-
addCookieExtension
public static void addCookieExtension(java.util.Hashtable extensions, byte[] cookie) throws java.io.IOException- Throws:
java.io.IOException
-
addEarlyDataIndication
public static void addEarlyDataIndication(java.util.Hashtable extensions)
-
addEarlyDataMaxSize
public static void addEarlyDataMaxSize(java.util.Hashtable extensions, long maxSize) throws java.io.IOException- Throws:
java.io.IOException
-
addEmptyExtensionData
public static void addEmptyExtensionData(java.util.Hashtable extensions, java.lang.Integer extType)
-
addEncryptThenMACExtension
public static void addEncryptThenMACExtension(java.util.Hashtable extensions)
-
addExtendedMasterSecretExtension
public static void addExtendedMasterSecretExtension(java.util.Hashtable extensions)
-
addHeartbeatExtension
public static void addHeartbeatExtension(java.util.Hashtable extensions, HeartbeatExtension heartbeatExtension) throws java.io.IOException- Throws:
java.io.IOException
-
addKeyShareClientHello
public static void addKeyShareClientHello(java.util.Hashtable extensions, java.util.Vector clientShares) throws java.io.IOException- Throws:
java.io.IOException
-
addKeyShareHelloRetryRequest
public static void addKeyShareHelloRetryRequest(java.util.Hashtable extensions, int namedGroup) throws java.io.IOException- Throws:
java.io.IOException
-
addKeyShareServerHello
public static void addKeyShareServerHello(java.util.Hashtable extensions, KeyShareEntry serverShare) throws java.io.IOException- Throws:
java.io.IOException
-
addMaxFragmentLengthExtension
public static void addMaxFragmentLengthExtension(java.util.Hashtable extensions, short maxFragmentLength) throws java.io.IOException- Throws:
java.io.IOException
-
addOIDFiltersExtension
public static void addOIDFiltersExtension(java.util.Hashtable extensions, java.util.Hashtable filters) throws java.io.IOException- Throws:
java.io.IOException
-
addPaddingExtension
public static void addPaddingExtension(java.util.Hashtable extensions, int dataLength) throws java.io.IOException- Throws:
java.io.IOException
-
addPostHandshakeAuthExtension
public static void addPostHandshakeAuthExtension(java.util.Hashtable extensions)
-
addPreSharedKeyClientHello
public static void addPreSharedKeyClientHello(java.util.Hashtable extensions, OfferedPsks offeredPsks) throws java.io.IOException- Throws:
java.io.IOException
-
addPreSharedKeyServerHello
public static void addPreSharedKeyServerHello(java.util.Hashtable extensions, int selectedIdentity) throws java.io.IOException- Throws:
java.io.IOException
-
addPSKKeyExchangeModesExtension
public static void addPSKKeyExchangeModesExtension(java.util.Hashtable extensions, short[] modes) throws java.io.IOException- Throws:
java.io.IOException
-
addRecordSizeLimitExtension
public static void addRecordSizeLimitExtension(java.util.Hashtable extensions, int recordSizeLimit) throws java.io.IOException- Throws:
java.io.IOException
-
addServerCertificateTypeExtensionClient
public static void addServerCertificateTypeExtensionClient(java.util.Hashtable extensions, short[] certificateTypes) throws java.io.IOException- Throws:
java.io.IOException
-
addServerCertificateTypeExtensionServer
public static void addServerCertificateTypeExtensionServer(java.util.Hashtable extensions, short certificateType) throws java.io.IOException- Throws:
java.io.IOException
-
addServerNameExtensionClient
public static void addServerNameExtensionClient(java.util.Hashtable extensions, java.util.Vector serverNameList) throws java.io.IOException- Throws:
java.io.IOException
-
addServerNameExtensionServer
public static void addServerNameExtensionServer(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
addSignatureAlgorithmsExtension
public static void addSignatureAlgorithmsExtension(java.util.Hashtable extensions, java.util.Vector supportedSignatureAlgorithms) throws java.io.IOException- Throws:
java.io.IOException
-
addSignatureAlgorithmsCertExtension
public static void addSignatureAlgorithmsCertExtension(java.util.Hashtable extensions, java.util.Vector supportedSignatureAlgorithms) throws java.io.IOException- Throws:
java.io.IOException
-
addStatusRequestExtension
public static void addStatusRequestExtension(java.util.Hashtable extensions, CertificateStatusRequest statusRequest) throws java.io.IOException- Throws:
java.io.IOException
-
addStatusRequestV2Extension
public static void addStatusRequestV2Extension(java.util.Hashtable extensions, java.util.Vector statusRequestV2) throws java.io.IOException- Throws:
java.io.IOException
-
addSupportedGroupsExtension
public static void addSupportedGroupsExtension(java.util.Hashtable extensions, java.util.Vector namedGroups) throws java.io.IOException- Throws:
java.io.IOException
-
addSupportedPointFormatsExtension
public static void addSupportedPointFormatsExtension(java.util.Hashtable extensions, short[] ecPointFormats) throws java.io.IOException- Throws:
java.io.IOException
-
addSupportedVersionsExtensionClient
public static void addSupportedVersionsExtensionClient(java.util.Hashtable extensions, ProtocolVersion[] versions) throws java.io.IOException- Throws:
java.io.IOException
-
addSupportedVersionsExtensionServer
public static void addSupportedVersionsExtensionServer(java.util.Hashtable extensions, ProtocolVersion selectedVersion) throws java.io.IOException- Throws:
java.io.IOException
-
addTruncatedHMacExtension
public static void addTruncatedHMacExtension(java.util.Hashtable extensions)
-
addTrustedCAKeysExtensionClient
public static void addTrustedCAKeysExtensionClient(java.util.Hashtable extensions, java.util.Vector trustedAuthoritiesList) throws java.io.IOException- Throws:
java.io.IOException
-
addTrustedCAKeysExtensionServer
public static void addTrustedCAKeysExtensionServer(java.util.Hashtable extensions)
-
getALPNExtensionClient
public static java.util.Vector getALPNExtensionClient(java.util.Hashtable extensions) throws java.io.IOException- Returns:
- a
VectorofProtocolName - Throws:
java.io.IOException
-
getALPNExtensionServer
public static ProtocolName getALPNExtensionServer(java.util.Hashtable extensions) throws java.io.IOException
- Throws:
java.io.IOException
-
getCertificateAuthoritiesExtension
public static java.util.Vector getCertificateAuthoritiesExtension(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
getClientCertificateTypeExtensionClient
public static short[] getClientCertificateTypeExtensionClient(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
getClientCertificateTypeExtensionServer
public static short getClientCertificateTypeExtensionServer(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
getCookieExtension
public static byte[] getCookieExtension(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
getEarlyDataMaxSize
public static long getEarlyDataMaxSize(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
getHeartbeatExtension
public static HeartbeatExtension getHeartbeatExtension(java.util.Hashtable extensions) throws java.io.IOException
- Throws:
java.io.IOException
-
getKeyShareClientHello
public static java.util.Vector getKeyShareClientHello(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
getKeyShareHelloRetryRequest
public static int getKeyShareHelloRetryRequest(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
getKeyShareServerHello
public static KeyShareEntry getKeyShareServerHello(java.util.Hashtable extensions) throws java.io.IOException
- Throws:
java.io.IOException
-
getMaxFragmentLengthExtension
public static short getMaxFragmentLengthExtension(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
getOIDFiltersExtension
public static java.util.Hashtable getOIDFiltersExtension(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
getPaddingExtension
public static int getPaddingExtension(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
getPreSharedKeyClientHello
public static OfferedPsks getPreSharedKeyClientHello(java.util.Hashtable extensions) throws java.io.IOException
- Throws:
java.io.IOException
-
getPreSharedKeyServerHello
public static int getPreSharedKeyServerHello(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
getPSKKeyExchangeModesExtension
public static short[] getPSKKeyExchangeModesExtension(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
getRecordSizeLimitExtension
public static int getRecordSizeLimitExtension(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
getServerCertificateTypeExtensionClient
public static short[] getServerCertificateTypeExtensionClient(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
getServerCertificateTypeExtensionServer
public static short getServerCertificateTypeExtensionServer(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
getServerNameExtensionClient
public static java.util.Vector getServerNameExtensionClient(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
getSignatureAlgorithmsExtension
public static java.util.Vector getSignatureAlgorithmsExtension(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
getSignatureAlgorithmsCertExtension
public static java.util.Vector getSignatureAlgorithmsCertExtension(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
getStatusRequestExtension
public static CertificateStatusRequest getStatusRequestExtension(java.util.Hashtable extensions) throws java.io.IOException
- Throws:
java.io.IOException
-
getStatusRequestV2Extension
public static java.util.Vector getStatusRequestV2Extension(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
getSupportedGroupsExtension
public static int[] getSupportedGroupsExtension(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
getSupportedPointFormatsExtension
public static short[] getSupportedPointFormatsExtension(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
getSupportedVersionsExtensionClient
public static ProtocolVersion[] getSupportedVersionsExtensionClient(java.util.Hashtable extensions) throws java.io.IOException
- Throws:
java.io.IOException
-
getSupportedVersionsExtensionServer
public static ProtocolVersion getSupportedVersionsExtensionServer(java.util.Hashtable extensions) throws java.io.IOException
- Throws:
java.io.IOException
-
getTrustedCAKeysExtensionClient
public static java.util.Vector getTrustedCAKeysExtensionClient(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
hasClientCertificateURLExtension
public static boolean hasClientCertificateURLExtension(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
hasEarlyDataIndication
public static boolean hasEarlyDataIndication(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
hasEncryptThenMACExtension
public static boolean hasEncryptThenMACExtension(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
hasExtendedMasterSecretExtension
public static boolean hasExtendedMasterSecretExtension(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
hasServerNameExtensionServer
public static boolean hasServerNameExtensionServer(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
hasPostHandshakeAuthExtension
public static boolean hasPostHandshakeAuthExtension(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
hasTruncatedHMacExtension
public static boolean hasTruncatedHMacExtension(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
hasTrustedCAKeysExtensionServer
public static boolean hasTrustedCAKeysExtensionServer(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
createALPNExtensionClient
public static byte[] createALPNExtensionClient(java.util.Vector protocolNameList) throws java.io.IOException- Parameters:
protocolNameList- aVectorofProtocolName- Throws:
java.io.IOException
-
createALPNExtensionServer
public static byte[] createALPNExtensionServer(ProtocolName protocolName) throws java.io.IOException
- Throws:
java.io.IOException
-
createCertificateAuthoritiesExtension
public static byte[] createCertificateAuthoritiesExtension(java.util.Vector authorities) throws java.io.IOException- Throws:
java.io.IOException
-
createCertificateTypeExtensionClient
public static byte[] createCertificateTypeExtensionClient(short[] certificateTypes) throws java.io.IOException- Throws:
java.io.IOException
-
createCertificateTypeExtensionServer
public static byte[] createCertificateTypeExtensionServer(short certificateType) throws java.io.IOException- Throws:
java.io.IOException
-
createClientCertificateURLExtension
public static byte[] createClientCertificateURLExtension()
-
createCookieExtension
public static byte[] createCookieExtension(byte[] cookie) throws java.io.IOException- Throws:
java.io.IOException
-
createEarlyDataIndication
public static byte[] createEarlyDataIndication()
-
createEarlyDataMaxSize
public static byte[] createEarlyDataMaxSize(long maxSize) throws java.io.IOException- Throws:
java.io.IOException
-
createEmptyExtensionData
public static byte[] createEmptyExtensionData()
-
createEncryptThenMACExtension
public static byte[] createEncryptThenMACExtension()
-
createExtendedMasterSecretExtension
public static byte[] createExtendedMasterSecretExtension()
-
createHeartbeatExtension
public static byte[] createHeartbeatExtension(HeartbeatExtension heartbeatExtension) throws java.io.IOException
- Throws:
java.io.IOException
-
createKeyShareClientHello
public static byte[] createKeyShareClientHello(java.util.Vector clientShares) throws java.io.IOException- Throws:
java.io.IOException
-
createKeyShareHelloRetryRequest
public static byte[] createKeyShareHelloRetryRequest(int namedGroup) throws java.io.IOException- Throws:
java.io.IOException
-
createKeyShareServerHello
public static byte[] createKeyShareServerHello(KeyShareEntry serverShare) throws java.io.IOException
- Throws:
java.io.IOException
-
createMaxFragmentLengthExtension
public static byte[] createMaxFragmentLengthExtension(short maxFragmentLength) throws java.io.IOException- Throws:
java.io.IOException
-
createOIDFiltersExtension
public static byte[] createOIDFiltersExtension(java.util.Hashtable filters) throws java.io.IOException- Throws:
java.io.IOException
-
createPaddingExtension
public static byte[] createPaddingExtension(int dataLength) throws java.io.IOException- Throws:
java.io.IOException
-
createPostHandshakeAuthExtension
public static byte[] createPostHandshakeAuthExtension()
-
createPreSharedKeyClientHello
public static byte[] createPreSharedKeyClientHello(OfferedPsks offeredPsks) throws java.io.IOException
- Throws:
java.io.IOException
-
createPreSharedKeyServerHello
public static byte[] createPreSharedKeyServerHello(int selectedIdentity) throws java.io.IOException- Throws:
java.io.IOException
-
createPSKKeyExchangeModesExtension
public static byte[] createPSKKeyExchangeModesExtension(short[] modes) throws java.io.IOException- Throws:
java.io.IOException
-
createRecordSizeLimitExtension
public static byte[] createRecordSizeLimitExtension(int recordSizeLimit) throws java.io.IOException- Throws:
java.io.IOException
-
createServerNameExtensionClient
public static byte[] createServerNameExtensionClient(java.util.Vector serverNameList) throws java.io.IOException- Throws:
java.io.IOException
-
createServerNameExtensionServer
public static byte[] createServerNameExtensionServer()
-
createSignatureAlgorithmsExtension
public static byte[] createSignatureAlgorithmsExtension(java.util.Vector supportedSignatureAlgorithms) throws java.io.IOException- Throws:
java.io.IOException
-
createSignatureAlgorithmsCertExtension
public static byte[] createSignatureAlgorithmsCertExtension(java.util.Vector supportedSignatureAlgorithms) throws java.io.IOException- Throws:
java.io.IOException
-
createStatusRequestExtension
public static byte[] createStatusRequestExtension(CertificateStatusRequest statusRequest) throws java.io.IOException
- Throws:
java.io.IOException
-
createStatusRequestV2Extension
public static byte[] createStatusRequestV2Extension(java.util.Vector statusRequestV2) throws java.io.IOException- Throws:
java.io.IOException
-
createSupportedGroupsExtension
public static byte[] createSupportedGroupsExtension(java.util.Vector namedGroups) throws java.io.IOException- Throws:
java.io.IOException
-
createSupportedPointFormatsExtension
public static byte[] createSupportedPointFormatsExtension(short[] ecPointFormats) throws java.io.IOException- Throws:
java.io.IOException
-
createSupportedVersionsExtensionClient
public static byte[] createSupportedVersionsExtensionClient(ProtocolVersion[] versions) throws java.io.IOException
- Throws:
java.io.IOException
-
createSupportedVersionsExtensionServer
public static byte[] createSupportedVersionsExtensionServer(ProtocolVersion selectedVersion) throws java.io.IOException
- Throws:
java.io.IOException
-
createTruncatedHMacExtension
public static byte[] createTruncatedHMacExtension()
-
createTrustedCAKeysExtensionClient
public static byte[] createTrustedCAKeysExtensionClient(java.util.Vector trustedAuthoritiesList) throws java.io.IOException- Throws:
java.io.IOException
-
createTrustedCAKeysExtensionServer
public static byte[] createTrustedCAKeysExtensionServer()
-
readALPNExtensionClient
public static java.util.Vector readALPNExtensionClient(byte[] extensionData) throws java.io.IOException- Returns:
- a
VectorofProtocolName - Throws:
java.io.IOException
-
readALPNExtensionServer
public static ProtocolName readALPNExtensionServer(byte[] extensionData) throws java.io.IOException
- Throws:
java.io.IOException
-
readCertificateAuthoritiesExtension
public static java.util.Vector readCertificateAuthoritiesExtension(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
readCertificateTypeExtensionClient
public static short[] readCertificateTypeExtensionClient(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
readCertificateTypeExtensionServer
public static short readCertificateTypeExtensionServer(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
readClientCertificateURLExtension
public static boolean readClientCertificateURLExtension(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
readCookieExtension
public static byte[] readCookieExtension(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
readEarlyDataIndication
public static boolean readEarlyDataIndication(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
readEarlyDataMaxSize
public static long readEarlyDataMaxSize(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
readEncryptThenMACExtension
public static boolean readEncryptThenMACExtension(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
readExtendedMasterSecretExtension
public static boolean readExtendedMasterSecretExtension(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
readHeartbeatExtension
public static HeartbeatExtension readHeartbeatExtension(byte[] extensionData) throws java.io.IOException
- Throws:
java.io.IOException
-
readKeyShareClientHello
public static java.util.Vector readKeyShareClientHello(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
readKeyShareHelloRetryRequest
public static int readKeyShareHelloRetryRequest(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
readKeyShareServerHello
public static KeyShareEntry readKeyShareServerHello(byte[] extensionData) throws java.io.IOException
- Throws:
java.io.IOException
-
readMaxFragmentLengthExtension
public static short readMaxFragmentLengthExtension(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
readOIDFiltersExtension
public static java.util.Hashtable readOIDFiltersExtension(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
readPaddingExtension
public static int readPaddingExtension(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
readPostHandshakeAuthExtension
public static boolean readPostHandshakeAuthExtension(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
readPreSharedKeyClientHello
public static OfferedPsks readPreSharedKeyClientHello(byte[] extensionData) throws java.io.IOException
- Throws:
java.io.IOException
-
readPreSharedKeyServerHello
public static int readPreSharedKeyServerHello(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
readPSKKeyExchangeModesExtension
public static short[] readPSKKeyExchangeModesExtension(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
readRecordSizeLimitExtension
public static int readRecordSizeLimitExtension(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
readServerNameExtensionClient
public static java.util.Vector readServerNameExtensionClient(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
readServerNameExtensionServer
public static boolean readServerNameExtensionServer(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
readSignatureAlgorithmsExtension
public static java.util.Vector readSignatureAlgorithmsExtension(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
readSignatureAlgorithmsCertExtension
public static java.util.Vector readSignatureAlgorithmsCertExtension(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
readStatusRequestExtension
public static CertificateStatusRequest readStatusRequestExtension(byte[] extensionData) throws java.io.IOException
- Throws:
java.io.IOException
-
readStatusRequestV2Extension
public static java.util.Vector readStatusRequestV2Extension(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
readSupportedGroupsExtension
public static int[] readSupportedGroupsExtension(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
readSupportedPointFormatsExtension
public static short[] readSupportedPointFormatsExtension(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
readSupportedVersionsExtensionClient
public static ProtocolVersion[] readSupportedVersionsExtensionClient(byte[] extensionData) throws java.io.IOException
- Throws:
java.io.IOException
-
readSupportedVersionsExtensionServer
public static ProtocolVersion readSupportedVersionsExtensionServer(byte[] extensionData) throws java.io.IOException
- Throws:
java.io.IOException
-
readTruncatedHMacExtension
public static boolean readTruncatedHMacExtension(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
readTrustedCAKeysExtensionClient
public static java.util.Vector readTrustedCAKeysExtensionClient(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
readTrustedCAKeysExtensionServer
public static boolean readTrustedCAKeysExtensionServer(byte[] extensionData) throws java.io.IOException- Throws:
java.io.IOException
-
-