mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-23 12:30:50 +01:00
CA-178981: Make the HTTP API work through XenCenter for TLS 1.2 servers
This commit is contained in:
parent
9d098948f7
commit
3e38b34437
@ -131,9 +131,9 @@ namespace CommandLib
|
||||
null
|
||||
);
|
||||
try
|
||||
{
|
||||
sslStream.AuthenticateAsClient("");
|
||||
}
|
||||
{
|
||||
sslStream.AuthenticateAsClient("", null, SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12, true);
|
||||
}
|
||||
catch (AuthenticationException e){
|
||||
if (tCLIprotocol.conf.debug) throw e;
|
||||
tCLIprotocol.dGlobalError("Authentication failed - closing the connection.");
|
||||
|
@ -35,6 +35,7 @@ using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using System.Net.Security;
|
||||
using System.Security.Authentication;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
@ -358,7 +359,7 @@ namespace XenAPI
|
||||
{
|
||||
SslStream sslStream = new SslStream(stream, false,
|
||||
new RemoteCertificateValidationCallback(ValidateServerCertificate), null);
|
||||
sslStream.AuthenticateAsClient("");
|
||||
sslStream.AuthenticateAsClient("", null, SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12, true);
|
||||
|
||||
stream = sslStream;
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ using System.Threading;
|
||||
using System.IO;
|
||||
using System.Net.Security;
|
||||
using System.Net.Sockets;
|
||||
using System.Security.Authentication;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
|
||||
@ -490,7 +491,7 @@ namespace XenOvfTransport
|
||||
SslStream sslStream = new SslStream(stream, false, new RemoteCertificateValidationCallback(ValidateServerCertificate), null);
|
||||
try
|
||||
{
|
||||
sslStream.AuthenticateAsClient("");
|
||||
sslStream.AuthenticateAsClient("", null, SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12, true);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user