Fields Summary |
---|
boolean | supportedtrue if this cipher suite is supported |
final int | keyExchangecipher suite key exchange |
final String | cipherNamecipher |
final int | keyMaterialCipher information |
final int | expandedKeyMaterial |
final int | effectiveKeyBytes |
final int | IVSize |
private final int | blockSize |
private final byte[] | cipherSuiteCode |
private final String | name |
private final boolean | isExportable |
private final String | hashName |
private final String | hmacName |
private final int | hashSize |
static int | KeyExchange_RSAkey exchange values |
static int | KeyExchange_RSA_EXPORT |
static int | KeyExchange_DHE_DSS |
static int | KeyExchange_DHE_DSS_EXPORT |
static int | KeyExchange_DHE_RSA |
static int | KeyExchange_DHE_RSA_EXPORT |
static int | KeyExchange_DH_DSS |
static int | KeyExchange_DH_RSA |
static int | KeyExchange_DH_anon |
static int | KeyExchange_DH_anon_EXPORT |
static int | KeyExchange_DH_DSS_EXPORT |
static int | KeyExchange_DH_RSA_EXPORT |
static byte[] | code_TLS_NULL_WITH_NULL_NULLTLS cipher suite codes |
static byte[] | code_TLS_RSA_WITH_NULL_MD5 |
static byte[] | code_TLS_RSA_WITH_NULL_SHA |
static byte[] | code_TLS_RSA_EXPORT_WITH_RC4_40_MD5 |
static byte[] | code_TLS_RSA_WITH_RC4_128_MD5 |
static byte[] | code_TLS_RSA_WITH_RC4_128_SHA |
static byte[] | code_TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5 |
static byte[] | code_TLS_RSA_WITH_IDEA_CBC_SHA |
static byte[] | code_TLS_RSA_EXPORT_WITH_DES40_CBC_SHA |
static byte[] | code_TLS_RSA_WITH_DES_CBC_SHA |
static byte[] | code_TLS_RSA_WITH_3DES_EDE_CBC_SHA |
static byte[] | code_TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA |
static byte[] | code_TLS_DH_DSS_WITH_DES_CBC_SHA |
static byte[] | code_TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA |
static byte[] | code_TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA |
static byte[] | code_TLS_DH_RSA_WITH_DES_CBC_SHA |
static byte[] | code_TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA |
static byte[] | code_TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA |
static byte[] | code_TLS_DHE_DSS_WITH_DES_CBC_SHA |
static byte[] | code_TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA |
static byte[] | code_TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA |
static byte[] | code_TLS_DHE_RSA_WITH_DES_CBC_SHA |
static byte[] | code_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA |
static byte[] | code_TLS_DH_anon_EXPORT_WITH_RC4_40_MD5 |
static byte[] | code_TLS_DH_anon_WITH_RC4_128_MD5 |
static byte[] | code_TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA |
static byte[] | code_TLS_DH_anon_WITH_DES_CBC_SHA |
static byte[] | code_TLS_DH_anon_WITH_3DES_EDE_CBC_SHA |
static CipherSuite | TLS_NULL_WITH_NULL_NULL |
static CipherSuite | TLS_RSA_WITH_NULL_MD5 |
static CipherSuite | TLS_RSA_WITH_NULL_SHA |
static CipherSuite | TLS_RSA_EXPORT_WITH_RC4_40_MD5 |
static CipherSuite | TLS_RSA_WITH_RC4_128_MD5 |
static CipherSuite | TLS_RSA_WITH_RC4_128_SHA |
static CipherSuite | TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5 |
static CipherSuite | TLS_RSA_WITH_IDEA_CBC_SHA |
static CipherSuite | TLS_RSA_EXPORT_WITH_DES40_CBC_SHA |
static CipherSuite | TLS_RSA_WITH_DES_CBC_SHA |
static CipherSuite | TLS_RSA_WITH_3DES_EDE_CBC_SHA |
static CipherSuite | TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA |
static CipherSuite | TLS_DH_DSS_WITH_DES_CBC_SHA |
static CipherSuite | TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA |
static CipherSuite | TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA |
static CipherSuite | TLS_DH_RSA_WITH_DES_CBC_SHA |
static CipherSuite | TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA |
static CipherSuite | TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA |
static CipherSuite | TLS_DHE_DSS_WITH_DES_CBC_SHA |
static CipherSuite | TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA |
static CipherSuite | TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA |
static CipherSuite | TLS_DHE_RSA_WITH_DES_CBC_SHA |
static CipherSuite | TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA |
static CipherSuite | TLS_DH_anon_EXPORT_WITH_RC4_40_MD5 |
static CipherSuite | TLS_DH_anon_WITH_RC4_128_MD5 |
static CipherSuite | TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA |
static CipherSuite | TLS_DH_anon_WITH_DES_CBC_SHA |
static CipherSuite | TLS_DH_anon_WITH_3DES_EDE_CBC_SHA |
private static CipherSuite[] | cuitesByCode |
private static Hashtable | cuitesByName |
static CipherSuite[] | supportedCipherSuitesarray of supported sipher suites.
Set of supported suites is defined at the moment provider's start |
static String[] | supportedCipherSuiteNamesarray of supported sipher suites names |
static CipherSuite[] | defaultCipherSuitesdefault sipher suites |
Methods Summary |
---|
public boolean | equals(java.lang.Object obj)Compares this cipher suite to the specified object.
if (obj instanceof CipherSuite
&& this.cipherSuiteCode[0] == ((CipherSuite) obj).cipherSuiteCode[0]
&& this.cipherSuiteCode[1] == ((CipherSuite) obj).cipherSuiteCode[1]) {
return true;
}
return false;
|
public int | getBlockSize()Returns cipher block size
return blockSize;
|
public java.lang.String | getBulkEncryptionAlgorithm()Returns cipher algorithm name
return cipherName;
|
public static org.apache.harmony.xnet.provider.jsse.CipherSuite | getByCode(byte b1, byte b2)Returns CipherSuite based on TLS CipherSuite code
if (b1 != 0 || b2 > cuitesByCode.length) {
// Unknoun
return new CipherSuite("UNKNOUN_" + b1 + "_" + b2, false, 0, "",
"", new byte[] { b1, b2 });
}
return cuitesByCode[b2];
|
public static org.apache.harmony.xnet.provider.jsse.CipherSuite | getByCode(byte b1, byte b2, byte b3)Returns CipherSuite based on V2CipherSpec code
as described in TLS 1.0 spec., E. Backward Compatibility With SSL
if (b1 == 0 && b2 == 0) {
if (b3 <= cuitesByCode.length) {
return cuitesByCode[b3];
}
}
// as TLSv1 equivalent of V2CipherSpec should be included in
// V2ClientHello, ignore V2CipherSpec
return new CipherSuite("UNKNOUN_" + b1 + "_" + b2 + "_" + b3, false, 0,
"", "", new byte[] { b1, b2, b3 });
|
public static org.apache.harmony.xnet.provider.jsse.CipherSuite | getByName(java.lang.String name)Returns CipherSuite by name
int count = 0;
cuitesByName = new Hashtable();
for (int i = 0; i < cuitesByCode.length; i++) {
cuitesByName.put(cuitesByCode[i].getName(), cuitesByCode[i]);
if (cuitesByCode[i].supported) {
count++;
}
}
supportedCipherSuites = new CipherSuite[count];
supportedCipherSuiteNames = new String[count];
count = 0;
for (int i = 0; i < cuitesByCode.length; i++) {
if (cuitesByCode[i].supported) {
supportedCipherSuites[count] = cuitesByCode[i];
supportedCipherSuiteNames[count] = supportedCipherSuites[count].getName();
count++;
}
}
CipherSuite[] defaultPretendent = {
TLS_RSA_WITH_RC4_128_MD5,
TLS_RSA_WITH_RC4_128_SHA,
// TLS_RSA_WITH_AES_128_CBC_SHA,
// TLS_DHE_RSA_WITH_AES_128_CBC_SHA,
// LS_DHE_DSS_WITH_AES_128_CBC_SHA,
TLS_RSA_WITH_3DES_EDE_CBC_SHA,
TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA,
TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA, TLS_RSA_WITH_DES_CBC_SHA,
TLS_DHE_RSA_WITH_DES_CBC_SHA, TLS_DHE_DSS_WITH_DES_CBC_SHA,
TLS_RSA_EXPORT_WITH_RC4_40_MD5,
TLS_RSA_EXPORT_WITH_DES40_CBC_SHA,
TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA,
TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA
};
count = 0;
for (int i = 0; i < defaultPretendent.length; i++) {
if (defaultPretendent[i].supported) {
count++;
}
}
defaultCipherSuites = new CipherSuite[count];
count = 0;
for (int i = 0; i < defaultPretendent.length; i++) {
if (defaultPretendent[i].supported) {
defaultCipherSuites[count++] = defaultPretendent[i];
}
}
return (CipherSuite) cuitesByName.get(name);
|
public java.lang.String | getHashName()Returns hash algorithm name
return hashName;
|
public java.lang.String | getHmacName()Returns MAC algorithm name
return hmacName;
|
public int | getMACLength()Returns hash size
return hashSize;
|
public java.lang.String | getName()Returns cipher suite name
return name;
|
public static org.apache.harmony.xnet.provider.jsse.CipherSuite[] | getSupported()Returns array of supported CipherSuites
return supportedCipherSuites;
|
public static java.lang.String[] | getSupportedCipherSuiteNames()Returns array of supported cipher suites names
return (String[]) supportedCipherSuiteNames.clone();
|
public boolean | isAnonymous()Returns true if cipher suite is anonymous
if (keyExchange == KeyExchange_DH_anon
|| keyExchange == KeyExchange_DH_anon_EXPORT) {
return true;
}
return false;
|
public boolean | isExportable()Indicates whether this cipher suite is exportable
return isExportable;
|
public byte[] | toBytes()Returns cipher suite code as byte array
return cipherSuiteCode;
|
public java.lang.String | toString()Returns cipher suite description
return name + ": " + cipherSuiteCode[0] + " " + cipherSuiteCode[1];
|