Skip to content
Snippets Groups Projects
Commit a9f4661a authored by Lyubomir Marinov's avatar Lyubomir Marinov
Browse files

Fixes the list of cipher suites supported by the DTLS server so that it...

Fixes the list of cipher suites supported by the DTLS server so that it reflects the capabilities of the actual Bouncy Castle implementations at this time.
parent b8786f6d
No related branches found
No related tags found
No related merge requests found
......@@ -80,6 +80,30 @@ int getChosenProtectionProfile()
return chosenProtectionProfile;
}
/**
* {@inheritDoc}
*
* Overrides the super implementation to explicitly specify cipher suites
* which we know to be supported by Bouncy Castle. At the time of this
* writing, we know that Bouncy Castle implements Client Key Exchange only
* with <tt>TLS_ECDHE_WITH_XXX</tt> and <tt>TLS_RSA_WITH_XXX</tt>.
*/
@Override
public int[] getCipherSuites()
{
return
new int[]
{
/* core/src/main/java/org/bouncycastle/crypto/tls/DefaultTlsClient.java */
CipherSuite.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
CipherSuite.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
CipherSuite.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
CipherSuite.TLS_RSA_WITH_AES_128_GCM_SHA256,
CipherSuite.TLS_RSA_WITH_AES_128_CBC_SHA256,
CipherSuite.TLS_RSA_WITH_AES_128_CBC_SHA
};
}
/**
* {@inheritDoc}
*
......
......@@ -77,6 +77,42 @@ int getChosenProtectionProfile()
return chosenProtectionProfile;
}
/**
* {@inheritDoc}
*
* Overrides the super implementation to explicitly specify cipher suites
* which we know to be supported by Bouncy Castle. At the time of this
* writing, we know that Bouncy Castle implements Client Key Exchange only
* with <tt>TLS_ECDHE_WITH_XXX</tt> and <tt>TLS_RSA_WITH_XXX</tt>.
*/
@Override
protected int[] getCipherSuites()
{
return
new int[]
{
/* core/src/main/java/org/bouncycastle/crypto/tls/DefaultTlsServer.java */
CipherSuite.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
CipherSuite.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
CipherSuite.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
CipherSuite.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
CipherSuite.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
CipherSuite.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
CipherSuite.TLS_RSA_WITH_AES_256_GCM_SHA384,
CipherSuite.TLS_RSA_WITH_AES_128_GCM_SHA256,
CipherSuite.TLS_RSA_WITH_AES_256_CBC_SHA256,
CipherSuite.TLS_RSA_WITH_AES_128_CBC_SHA256,
CipherSuite.TLS_RSA_WITH_AES_256_CBC_SHA,
CipherSuite.TLS_RSA_WITH_AES_128_CBC_SHA
/* core/src/test/java/org/bouncycastle/crypto/tls/test/MockDTLSServer.java */
// CipherSuite.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
// CipherSuite.TLS_ECDHE_RSA_WITH_ESTREAM_SALSA20_SHA1,
// CipherSuite.TLS_ECDHE_RSA_WITH_SALSA20_SHA1,
// CipherSuite.TLS_RSA_WITH_ESTREAM_SALSA20_SHA1,
// CipherSuite.TLS_RSA_WITH_SALSA20_SHA1
};
}
/**
* Gets the <tt>TlsContext</tt> with which this <tt>TlsServer</tt> has been
* initialized.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment