Still set peerSigAlgs(Cert) when no client-auth
@@ -181,13 +181,6 @@ public TlsAuthentication getAuthentication() throws IOException
public TlsCredentials getClientCredentials(CertificateRequest certificateRequest) throws IOException
{
final ContextData contextData = manager.getContextData();
- final X509ExtendedKeyManager x509KeyManager = contextData.getX509KeyManager();
-
- if (DummyX509KeyManager.INSTANCE == x509KeyManager)
- {
- return null;
- }
-
final SecurityParameters securityParameters = context.getSecurityParametersHandshake();
// Setup the peer supported signature schemes
@@ -205,6 +198,13 @@ public TlsCredentials getClientCredentials(CertificateRequest certificateRequest
: contextData.getSignatureSchemes(serverSigAlgsCert);
}
+ final X509ExtendedKeyManager x509KeyManager = contextData.getX509KeyManager();
+
+ if (DummyX509KeyManager.INSTANCE == x509KeyManager)
+ {
+ return null;
+ }
+
int keyExchangeAlgorithm = securityParameters.getKeyExchangeAlgorithm();
switch (keyExchangeAlgorithm)
{
