ix-ax / axsharp

[This repository is for active development.] AX# binds SIMATIC AX based projects with .NET ecosystem.
https://ix-ax.github.io/axsharp/
MIT License
48 stars 11 forks source link

Adds `ignoreSslErrors` to the `WebApiConnector` class #300

Closed PTKu closed 4 months ago

PTKu commented 4 months ago

Description

The most significant changes involve the addition of a new parameter ignoreSslErrors to the WebApiConnector class, CreateWebApi method, and WebApiConnectorFactory class. This parameter allows the user to choose whether to ignore SSL errors or not.

  1. The WebApiConnector class in WebApiConnector.cs has been updated to include a new parameter ignoreSSLErros in its constructor. This parameter is a boolean that, when set to true, will ignore SSL errors. If ignoreSSLErros is set to true, a lambda function is set to the CertificateCallback of ServerCertificateCallback that always returns true, effectively ignoring any SSL errors.

  2. The CreateWebApi method in WebApiConnectorExtensions.cs has been updated to include a new parameter ignoreSslErrors with a default value of false. The Parameters property of the ConnectorAdapter object returned by the method has been updated to include ignoreSslErrors.

  3. The WebApiConnectorFactory class in WebApiConnectorFactory.cs has been updated to handle the new ignoreSslErrors parameter. The WebApiConnector object returned by the Create method now includes ignoreSslErrors as a parameter.

Type of change

Please delete options that are not relevant.