public class TlsUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static byte[] |
EMPTY_BYTES |
static int[] |
EMPTY_INTS |
static long[] |
EMPTY_LONGS |
static short[] |
EMPTY_SHORTS |
static java.lang.Integer |
EXT_signature_algorithms
Deprecated.
Use
TlsExtensionsUtils.EXT_signature_algorithms instead. |
static java.lang.Integer |
EXT_signature_algorithms_cert
Deprecated.
Use
TlsExtensionsUtils.EXT_signature_algorithms_cert instead. |
protected static short |
MINIMUM_HASH_PREFERRED |
protected static short |
MINIMUM_HASH_STRICT |
Constructor and Description |
---|
TlsUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
addIfSupported(java.util.Vector supportedGroups,
TlsCrypto crypto,
int namedGroup) |
static void |
addIfSupported(java.util.Vector supportedGroups,
TlsCrypto crypto,
int[] namedGroups) |
static void |
addIfSupported(java.util.Vector supportedAlgs,
TlsCrypto crypto,
SignatureAndHashAlgorithm alg) |
static void |
addSignatureAlgorithmsExtension(java.util.Hashtable extensions,
java.util.Vector supportedSignatureAlgorithms)
Deprecated.
|
static boolean |
addToSet(java.util.Vector s,
int i) |
static void |
checkUint16(int i) |
static void |
checkUint16(long i) |
static void |
checkUint24(int i) |
static void |
checkUint24(long i) |
static void |
checkUint32(long i) |
static void |
checkUint48(long i) |
static void |
checkUint64(long i) |
static void |
checkUint8(int i) |
static void |
checkUint8(long i) |
static void |
checkUint8(short i) |
static SignatureAndHashAlgorithm |
chooseSignatureAndHashAlgorithm(TlsContext context,
java.util.Vector sigHashAlgs,
short signatureAlgorithm) |
static boolean |
containsAnySignatureAlgorithm(java.util.Vector supportedSignatureAlgorithms,
short signatureAlgorithm) |
static boolean |
containsNonAscii(byte[] bs) |
static boolean |
containsNonAscii(java.lang.String s) |
static boolean |
containsSignatureAlgorithm(java.util.Vector supportedSignatureAlgorithms,
SignatureAndHashAlgorithm signatureAlgorithm) |
static byte[] |
createSignatureAlgorithmsExtension(java.util.Vector supportedSignatureAlgorithms)
Deprecated.
|
static int |
decodeUint16(byte[] buf) |
static short |
decodeUint8(byte[] buf) |
static short[] |
decodeUint8ArrayWithUint8Length(byte[] buf) |
static byte[] |
encodeOpaque8(byte[] buf) |
static void |
encodeSupportedSignatureAlgorithms(java.util.Vector supportedSignatureAlgorithms,
java.io.OutputStream output) |
static byte[] |
encodeUint16(int uint) |
static byte[] |
encodeUint16ArrayWithUint16Length(int[] uints) |
static byte[] |
encodeUint8(short uint) |
static byte[] |
encodeUint8ArrayWithUint8Length(short[] uints) |
static byte[] |
encodeVersion(ProtocolVersion version) |
static int |
getCipherType(int cipherSuite) |
static int[] |
getCommonCipherSuites(int[] peerCipherSuites,
int[] localCipherSuites,
boolean useLocalOrder) |
static java.util.Vector |
getDefaultDSSSignatureAlgorithms() |
static java.util.Vector |
getDefaultECDSASignatureAlgorithms() |
static java.util.Vector |
getDefaultRSASignatureAlgorithms() |
static SignatureAndHashAlgorithm |
getDefaultSignatureAlgorithm(short signatureAlgorithm) |
static java.util.Vector |
getDefaultSignatureAlgorithms(short signatureAlgorithm) |
static java.util.Vector |
getDefaultSupportedSignatureAlgorithms(TlsContext context) |
static int |
getEncryptionAlgorithm(int cipherSuite) |
static byte[] |
getExtensionData(java.util.Hashtable extensions,
java.lang.Integer extensionType) |
static short |
getHashAlgorithmForHMACAlgorithm(int macAlgorithm) |
static short |
getHashAlgorithmForPRFAlgorithm(int prfAlgorithm) |
static int |
getKeyExchangeAlgorithm(int cipherSuite) |
static java.util.Vector |
getKeyExchangeAlgorithms(int[] cipherSuites) |
static short |
getLegacyClientCertType(short signatureAlgorithm) |
static short |
getLegacySignatureAlgorithmClient(short clientCertificateType) |
static short |
getLegacySignatureAlgorithmClientCert(short clientCertificateType) |
static short |
getLegacySignatureAlgorithmServer(int keyExchangeAlgorithm) |
static int |
getMACAlgorithm(int cipherSuite) |
static ProtocolVersion |
getMinimumVersion(int cipherSuite) |
static java.util.Vector |
getNamedGroupRoles(int[] cipherSuites) |
static java.util.Vector |
getNamedGroupRoles(java.util.Vector keyExchangeAlgorithms) |
static org.bouncycastle.asn1.ASN1ObjectIdentifier |
getOIDForHashAlgorithm(short hashAlgorithm) |
static java.util.Vector |
getSignatureAlgorithmsExtension(java.util.Hashtable extensions)
Deprecated.
|
static SignatureAndHashAlgorithm |
getSignatureAndHashAlgorithm(TlsContext context,
TlsCredentialedSigner signerCredentials) |
static int[] |
getSupportedCipherSuites(TlsCrypto crypto,
int[] suites) |
static java.util.Vector |
getUsableSignatureAlgorithms(java.util.Vector sigHashAlgs) |
static boolean |
hasExpectedEmptyExtensionData(java.util.Hashtable extensions,
java.lang.Integer extensionType,
short alertDescription) |
static boolean |
hasSigningCapability(short clientCertificateType) |
static TlsSession |
importSession(byte[] sessionID,
SessionParameters sessionParameters) |
static boolean |
isAEADCipherSuite(int cipherSuite) |
static boolean |
isBlockCipherSuite(int cipherSuite) |
static boolean |
isSignatureAlgorithmsExtensionAllowed(ProtocolVersion version) |
static boolean |
isStreamCipherSuite(int cipherSuite) |
static boolean |
isSupportedCipherSuite(TlsCrypto crypto,
int cipherSuite) |
static boolean |
isSupportedKeyExchange(TlsCrypto crypto,
int keyExchangeAlgorithm) |
static boolean |
isTLSv10(ProtocolVersion version) |
static boolean |
isTLSv10(TlsContext context) |
static boolean |
isTLSv11(ProtocolVersion version) |
static boolean |
isTLSv11(TlsContext context) |
static boolean |
isTLSv12(ProtocolVersion version) |
static boolean |
isTLSv12(TlsContext context) |
static boolean |
isValidCipherSuiteForSignatureAlgorithms(int cipherSuite,
java.util.Vector sigAlgs) |
static boolean |
isValidCipherSuiteForVersion(int cipherSuite,
ProtocolVersion serverVersion) |
static boolean |
isValidUint16(int i) |
static boolean |
isValidUint16(long i) |
static boolean |
isValidUint24(int i) |
static boolean |
isValidUint24(long i) |
static boolean |
isValidUint32(long i) |
static boolean |
isValidUint48(long i) |
static boolean |
isValidUint64(long i) |
static boolean |
isValidUint8(int i) |
static boolean |
isValidUint8(long i) |
static boolean |
isValidUint8(short i) |
static java.util.Vector |
parseSupportedSignatureAlgorithms(java.io.InputStream input) |
static TlsSecret |
PRF(TlsContext context,
TlsSecret secret,
java.lang.String asciiLabel,
byte[] seed,
int length) |
static byte[] |
readAllOrNothing(int length,
java.io.InputStream input) |
static org.bouncycastle.asn1.ASN1Primitive |
readASN1Object(byte[] encoding) |
static org.bouncycastle.asn1.ASN1Primitive |
readDERObject(byte[] encoding) |
static void |
readFully(byte[] buf,
java.io.InputStream input) |
static byte[] |
readFully(int length,
java.io.InputStream input) |
static byte[] |
readOpaque16(java.io.InputStream input) |
static byte[] |
readOpaque16(java.io.InputStream input,
int minLength) |
static byte[] |
readOpaque24(java.io.InputStream input) |
static byte[] |
readOpaque24(java.io.InputStream input,
int minLength) |
static byte[] |
readOpaque8(java.io.InputStream input) |
static byte[] |
readOpaque8(java.io.InputStream input,
int minLength) |
static byte[] |
readOpaque8(java.io.InputStream input,
int minLength,
int maxLength) |
static java.util.Vector |
readSignatureAlgorithmsExtension(byte[] extensionData)
Deprecated.
|
static int |
readUint16(byte[] buf,
int offset) |
static int |
readUint16(java.io.InputStream input) |
static int[] |
readUint16Array(int count,
java.io.InputStream input) |
static int |
readUint24(byte[] buf,
int offset) |
static int |
readUint24(java.io.InputStream input) |
static long |
readUint32(byte[] buf,
int offset) |
static long |
readUint32(java.io.InputStream input) |
static long |
readUint48(byte[] buf,
int offset) |
static long |
readUint48(java.io.InputStream input) |
static short |
readUint8(byte[] buf,
int offset) |
static short |
readUint8(java.io.InputStream input) |
static short[] |
readUint8Array(int count,
java.io.InputStream input) |
static ProtocolVersion |
readVersion(byte[] buf,
int offset) |
static ProtocolVersion |
readVersion(java.io.InputStream input) |
static void |
verifySupportedSignatureAlgorithm(java.util.Vector supportedSignatureAlgorithms,
SignatureAndHashAlgorithm signatureAlgorithm) |
static void |
writeGMTUnixTime(byte[] buf,
int offset) |
static void |
writeOpaque16(byte[] buf,
java.io.OutputStream output) |
static void |
writeOpaque24(byte[] buf,
java.io.OutputStream output) |
static void |
writeOpaque8(byte[] buf,
java.io.OutputStream output) |
static void |
writeUint16(int i,
byte[] buf,
int offset) |
static void |
writeUint16(int i,
java.io.OutputStream output) |
static void |
writeUint16Array(int[] uints,
byte[] buf,
int offset) |
static void |
writeUint16Array(int[] uints,
java.io.OutputStream output) |
static void |
writeUint16ArrayWithUint16Length(int[] uints,
byte[] buf,
int offset) |
static void |
writeUint16ArrayWithUint16Length(int[] uints,
java.io.OutputStream output) |
static void |
writeUint24(int i,
byte[] buf,
int offset) |
static void |
writeUint24(int i,
java.io.OutputStream output) |
static void |
writeUint32(long i,
byte[] buf,
int offset) |
static void |
writeUint32(long i,
java.io.OutputStream output) |
static void |
writeUint48(long i,
byte[] buf,
int offset) |
static void |
writeUint48(long i,
java.io.OutputStream output) |
static void |
writeUint64(long i,
byte[] buf,
int offset) |
static void |
writeUint64(long i,
java.io.OutputStream output) |
static void |
writeUint8(int i,
byte[] buf,
int offset) |
static void |
writeUint8(int i,
java.io.OutputStream output) |
static void |
writeUint8(short i,
byte[] buf,
int offset) |
static void |
writeUint8(short i,
java.io.OutputStream output) |
static void |
writeUint8Array(short[] uints,
byte[] buf,
int offset) |
static void |
writeUint8Array(short[] uints,
java.io.OutputStream output) |
static void |
writeUint8ArrayWithUint8Length(short[] uints,
byte[] buf,
int offset) |
static void |
writeUint8ArrayWithUint8Length(short[] uints,
java.io.OutputStream output) |
static void |
writeVersion(ProtocolVersion version,
byte[] buf,
int offset) |
static void |
writeVersion(ProtocolVersion version,
java.io.OutputStream output) |
public static final byte[] EMPTY_BYTES
public static final short[] EMPTY_SHORTS
public static final int[] EMPTY_INTS
public static final long[] EMPTY_LONGS
public static final java.lang.Integer EXT_signature_algorithms
TlsExtensionsUtils.EXT_signature_algorithms
instead.public static final java.lang.Integer EXT_signature_algorithms_cert
TlsExtensionsUtils.EXT_signature_algorithms_cert
instead.protected static short MINIMUM_HASH_STRICT
protected static short MINIMUM_HASH_PREFERRED
public static void checkUint8(short i) throws java.io.IOException
java.io.IOException
public static void checkUint8(int i) throws java.io.IOException
java.io.IOException
public static void checkUint8(long i) throws java.io.IOException
java.io.IOException
public static void checkUint16(int i) throws java.io.IOException
java.io.IOException
public static void checkUint16(long i) throws java.io.IOException
java.io.IOException
public static void checkUint24(int i) throws java.io.IOException
java.io.IOException
public static void checkUint24(long i) throws java.io.IOException
java.io.IOException
public static void checkUint32(long i) throws java.io.IOException
java.io.IOException
public static void checkUint48(long i) throws java.io.IOException
java.io.IOException
public static void checkUint64(long i) throws java.io.IOException
java.io.IOException
public static boolean isValidUint8(short i)
public static boolean isValidUint8(int i)
public static boolean isValidUint8(long i)
public static boolean isValidUint16(int i)
public static boolean isValidUint16(long i)
public static boolean isValidUint24(int i)
public static boolean isValidUint24(long i)
public static boolean isValidUint32(long i)
public static boolean isValidUint48(long i)
public static boolean isValidUint64(long i)
public static boolean isTLSv10(ProtocolVersion version)
public static boolean isTLSv10(TlsContext context)
public static boolean isTLSv11(ProtocolVersion version)
public static boolean isTLSv11(TlsContext context)
public static boolean isTLSv12(ProtocolVersion version)
public static boolean isTLSv12(TlsContext context)
public static void writeUint8(short i, java.io.OutputStream output) throws java.io.IOException
java.io.IOException
public static void writeUint8(int i, java.io.OutputStream output) throws java.io.IOException
java.io.IOException
public static void writeUint8(short i, byte[] buf, int offset)
public static void writeUint8(int i, byte[] buf, int offset)
public static void writeUint16(int i, java.io.OutputStream output) throws java.io.IOException
java.io.IOException
public static void writeUint16(int i, byte[] buf, int offset)
public static void writeUint24(int i, java.io.OutputStream output) throws java.io.IOException
java.io.IOException
public static void writeUint24(int i, byte[] buf, int offset)
public static void writeUint32(long i, java.io.OutputStream output) throws java.io.IOException
java.io.IOException
public static void writeUint32(long i, byte[] buf, int offset)
public static void writeUint48(long i, java.io.OutputStream output) throws java.io.IOException
java.io.IOException
public static void writeUint48(long i, byte[] buf, int offset)
public static void writeUint64(long i, java.io.OutputStream output) throws java.io.IOException
java.io.IOException
public static void writeUint64(long i, byte[] buf, int offset)
public static void writeOpaque8(byte[] buf, java.io.OutputStream output) throws java.io.IOException
java.io.IOException
public static void writeOpaque16(byte[] buf, java.io.OutputStream output) throws java.io.IOException
java.io.IOException
public static void writeOpaque24(byte[] buf, java.io.OutputStream output) throws java.io.IOException
java.io.IOException
public static void writeUint8Array(short[] uints, java.io.OutputStream output) throws java.io.IOException
java.io.IOException
public static void writeUint8Array(short[] uints, byte[] buf, int offset) throws java.io.IOException
java.io.IOException
public static void writeUint8ArrayWithUint8Length(short[] uints, java.io.OutputStream output) throws java.io.IOException
java.io.IOException
public static void writeUint8ArrayWithUint8Length(short[] uints, byte[] buf, int offset) throws java.io.IOException
java.io.IOException
public static void writeUint16Array(int[] uints, java.io.OutputStream output) throws java.io.IOException
java.io.IOException
public static void writeUint16Array(int[] uints, byte[] buf, int offset) throws java.io.IOException
java.io.IOException
public static void writeUint16ArrayWithUint16Length(int[] uints, java.io.OutputStream output) throws java.io.IOException
java.io.IOException
public static void writeUint16ArrayWithUint16Length(int[] uints, byte[] buf, int offset) throws java.io.IOException
java.io.IOException
public static short decodeUint8(byte[] buf) throws java.io.IOException
java.io.IOException
public static short[] decodeUint8ArrayWithUint8Length(byte[] buf) throws java.io.IOException
java.io.IOException
public static int decodeUint16(byte[] buf) throws java.io.IOException
java.io.IOException
public static byte[] encodeOpaque8(byte[] buf) throws java.io.IOException
java.io.IOException
public static byte[] encodeUint8(short uint) throws java.io.IOException
java.io.IOException
public static byte[] encodeUint8ArrayWithUint8Length(short[] uints) throws java.io.IOException
java.io.IOException
public static byte[] encodeUint16(int uint) throws java.io.IOException
java.io.IOException
public static byte[] encodeUint16ArrayWithUint16Length(int[] uints) throws java.io.IOException
java.io.IOException
public static byte[] encodeVersion(ProtocolVersion version) throws java.io.IOException
java.io.IOException
public static short readUint8(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static short readUint8(byte[] buf, int offset)
public static int readUint16(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static int readUint16(byte[] buf, int offset)
public static int readUint24(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static int readUint24(byte[] buf, int offset)
public static long readUint32(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static long readUint32(byte[] buf, int offset)
public static long readUint48(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static long readUint48(byte[] buf, int offset)
public static byte[] readAllOrNothing(int length, java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static byte[] readFully(int length, java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static void readFully(byte[] buf, java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static byte[] readOpaque8(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static byte[] readOpaque8(java.io.InputStream input, int minLength) throws java.io.IOException
java.io.IOException
public static byte[] readOpaque8(java.io.InputStream input, int minLength, int maxLength) throws java.io.IOException
java.io.IOException
public static byte[] readOpaque16(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static byte[] readOpaque16(java.io.InputStream input, int minLength) throws java.io.IOException
java.io.IOException
public static byte[] readOpaque24(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static byte[] readOpaque24(java.io.InputStream input, int minLength) throws java.io.IOException
java.io.IOException
public static short[] readUint8Array(int count, java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static int[] readUint16Array(int count, java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static ProtocolVersion readVersion(byte[] buf, int offset) throws java.io.IOException
java.io.IOException
public static ProtocolVersion readVersion(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static org.bouncycastle.asn1.ASN1Primitive readASN1Object(byte[] encoding) throws java.io.IOException
java.io.IOException
public static org.bouncycastle.asn1.ASN1Primitive readDERObject(byte[] encoding) throws java.io.IOException
java.io.IOException
public static void writeGMTUnixTime(byte[] buf, int offset)
public static void writeVersion(ProtocolVersion version, java.io.OutputStream output) throws java.io.IOException
java.io.IOException
public static void writeVersion(ProtocolVersion version, byte[] buf, int offset)
public static void addIfSupported(java.util.Vector supportedAlgs, TlsCrypto crypto, SignatureAndHashAlgorithm alg)
public static void addIfSupported(java.util.Vector supportedGroups, TlsCrypto crypto, int namedGroup)
public static void addIfSupported(java.util.Vector supportedGroups, TlsCrypto crypto, int[] namedGroups)
public static boolean addToSet(java.util.Vector s, int i)
public static java.util.Vector getDefaultDSSSignatureAlgorithms()
public static java.util.Vector getDefaultECDSASignatureAlgorithms()
public static java.util.Vector getDefaultRSASignatureAlgorithms()
public static SignatureAndHashAlgorithm getDefaultSignatureAlgorithm(short signatureAlgorithm)
public static java.util.Vector getDefaultSignatureAlgorithms(short signatureAlgorithm)
public static java.util.Vector getDefaultSupportedSignatureAlgorithms(TlsContext context)
public static SignatureAndHashAlgorithm getSignatureAndHashAlgorithm(TlsContext context, TlsCredentialedSigner signerCredentials) throws java.io.IOException
java.io.IOException
public static byte[] getExtensionData(java.util.Hashtable extensions, java.lang.Integer extensionType)
public static boolean hasExpectedEmptyExtensionData(java.util.Hashtable extensions, java.lang.Integer extensionType, short alertDescription) throws java.io.IOException
java.io.IOException
public static TlsSession importSession(byte[] sessionID, SessionParameters sessionParameters)
public static boolean isSignatureAlgorithmsExtensionAllowed(ProtocolVersion version)
public static void addSignatureAlgorithmsExtension(java.util.Hashtable extensions, java.util.Vector supportedSignatureAlgorithms) throws java.io.IOException
TlsExtensionsUtils.addSignatureAlgorithmsExtension(Hashtable, Vector)
instead.java.io.IOException
public static java.util.Vector getSignatureAlgorithmsExtension(java.util.Hashtable extensions) throws java.io.IOException
TlsExtensionsUtils.getSignatureAlgorithmsExtension(Hashtable)
instead.java.io.IOException
public static byte[] createSignatureAlgorithmsExtension(java.util.Vector supportedSignatureAlgorithms) throws java.io.IOException
TlsExtensionsUtils.createSignatureAlgorithmsExtension(Vector)
instead.java.io.IOException
public static java.util.Vector readSignatureAlgorithmsExtension(byte[] extensionData) throws java.io.IOException
TlsExtensionsUtils.readSignatureAlgorithmsExtension(byte[])
instead.java.io.IOException
public static short getLegacyClientCertType(short signatureAlgorithm)
public static short getLegacySignatureAlgorithmClient(short clientCertificateType)
public static short getLegacySignatureAlgorithmClientCert(short clientCertificateType)
public static short getLegacySignatureAlgorithmServer(int keyExchangeAlgorithm)
public static void encodeSupportedSignatureAlgorithms(java.util.Vector supportedSignatureAlgorithms, java.io.OutputStream output) throws java.io.IOException
java.io.IOException
public static java.util.Vector parseSupportedSignatureAlgorithms(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static void verifySupportedSignatureAlgorithm(java.util.Vector supportedSignatureAlgorithms, SignatureAndHashAlgorithm signatureAlgorithm) throws java.io.IOException
java.io.IOException
public static boolean containsSignatureAlgorithm(java.util.Vector supportedSignatureAlgorithms, SignatureAndHashAlgorithm signatureAlgorithm) throws java.io.IOException
java.io.IOException
public static boolean containsAnySignatureAlgorithm(java.util.Vector supportedSignatureAlgorithms, short signatureAlgorithm)
public static TlsSecret PRF(TlsContext context, TlsSecret secret, java.lang.String asciiLabel, byte[] seed, int length)
public static short getHashAlgorithmForHMACAlgorithm(int macAlgorithm)
public static short getHashAlgorithmForPRFAlgorithm(int prfAlgorithm)
public static org.bouncycastle.asn1.ASN1ObjectIdentifier getOIDForHashAlgorithm(short hashAlgorithm)
public static boolean hasSigningCapability(short clientCertificateType)
public static int getCipherType(int cipherSuite)
public static int getEncryptionAlgorithm(int cipherSuite)
public static int getKeyExchangeAlgorithm(int cipherSuite)
public static java.util.Vector getKeyExchangeAlgorithms(int[] cipherSuites)
public static int getMACAlgorithm(int cipherSuite)
public static ProtocolVersion getMinimumVersion(int cipherSuite)
public static java.util.Vector getNamedGroupRoles(int[] cipherSuites)
public static java.util.Vector getNamedGroupRoles(java.util.Vector keyExchangeAlgorithms)
public static boolean isAEADCipherSuite(int cipherSuite) throws java.io.IOException
java.io.IOException
public static boolean isBlockCipherSuite(int cipherSuite) throws java.io.IOException
java.io.IOException
public static boolean isStreamCipherSuite(int cipherSuite) throws java.io.IOException
java.io.IOException
public static boolean isValidCipherSuiteForSignatureAlgorithms(int cipherSuite, java.util.Vector sigAlgs)
public static boolean isValidCipherSuiteForVersion(int cipherSuite, ProtocolVersion serverVersion)
public static SignatureAndHashAlgorithm chooseSignatureAndHashAlgorithm(TlsContext context, java.util.Vector sigHashAlgs, short signatureAlgorithm) throws java.io.IOException
java.io.IOException
public static java.util.Vector getUsableSignatureAlgorithms(java.util.Vector sigHashAlgs)
public static int[] getCommonCipherSuites(int[] peerCipherSuites, int[] localCipherSuites, boolean useLocalOrder)
public static int[] getSupportedCipherSuites(TlsCrypto crypto, int[] suites)
public static boolean isSupportedCipherSuite(TlsCrypto crypto, int cipherSuite)
public static boolean isSupportedKeyExchange(TlsCrypto crypto, int keyExchangeAlgorithm)
public static boolean containsNonAscii(byte[] bs)
public static boolean containsNonAscii(java.lang.String s)