Skip to content

Commit 64f6564

Browse files
committed
Merge pull request #72 from AsrOneSdk/sriramvu-dev
Revert "ignoreCertificateHandler to make OneBox se
2 parents 4e6e420 + 94bfa23 commit 64f6564

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesClient.cs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
using Microsoft.WindowsAzure.Management.RecoveryServices.Models;
3333
using Microsoft.WindowsAzure.Management.SiteRecovery;
3434
using Microsoft.WindowsAzure.Management.SiteRecovery.Models;
35-
using System.Net.Security;
3635

3736
namespace Microsoft.Azure.Commands.RecoveryServices
3837
{
@@ -87,28 +86,11 @@ public RecoveryServicesManagementClient GetRecoveryServicesClient
8786
/// <param name="azureSubscription">Azure Subscription</param>
8887
public PSRecoveryServicesClient(AzureProfile azureProfile, AzureSubscription azureSubscription)
8988
{
90-
if (ServicePointManager.ServerCertificateValidationCallback == null)
91-
{
92-
ServicePointManager.ServerCertificateValidationCallback =
93-
IgnoreCertificateErrorHandler;
94-
95-
}
96-
9789
this.Profile = azureProfile;
9890
this.recoveryServicesClient =
9991
AzureSession.ClientFactory.CreateClient<RecoveryServicesManagementClient>(azureProfile, azureSubscription, AzureEnvironment.Endpoint.ServiceManagement);
10092
}
10193

102-
private static bool IgnoreCertificateErrorHandler
103-
(object sender,
104-
System.Security.Cryptography.X509Certificates.X509Certificate certificate,
105-
System.Security.Cryptography.X509Certificates.X509Chain chain,
106-
SslPolicyErrors sslPolicyErrors)
107-
{
108-
return true;
109-
110-
}
111-
11294
/// <summary>
11395
/// Retrieves Azure Cloud services.
11496
/// </summary>

0 commit comments

Comments
 (0)