forked from loafle/openapi-generator-original
[csharp-netcore] Enable setting of RemoteCertificateValidationCallback through IReadableConfiguration (#15979)
* Fix for [BUG][C#][csharp] Use RestClient.RemoteCertificateValidationCallback for SSL validation #11497 * Fixed modification of wrong files through merging to master and applied the changes to the correct files * Updated examples * Forget some examples * Updates branch to reflect master changes and published changed example files yet again to solve conflicts * Fixed examples
This commit is contained in:
parent
965eb2a02f
commit
6b62f2b05a
@ -455,7 +455,8 @@ namespace {{packageName}}.Client
|
|||||||
MaxTimeout = configuration.Timeout,
|
MaxTimeout = configuration.Timeout,
|
||||||
Proxy = configuration.Proxy,
|
Proxy = configuration.Proxy,
|
||||||
UserAgent = configuration.UserAgent,
|
UserAgent = configuration.UserAgent,
|
||||||
UseDefaultCredentials = configuration.UseDefaultCredentials
|
UseDefaultCredentials = configuration.UseDefaultCredentials,
|
||||||
|
RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback
|
||||||
};
|
};
|
||||||
|
|
||||||
RestClient client = new RestClient(clientOptions)
|
RestClient client = new RestClient(clientOptions)
|
||||||
|
@ -12,6 +12,7 @@ using System.Reflection;
|
|||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
|
using System.Net.Security;
|
||||||
{{#useRestSharp}}
|
{{#useRestSharp}}
|
||||||
{{#hasOAuthMethods}}using {{packageName}}.Client.Auth;
|
{{#hasOAuthMethods}}using {{packageName}}.Client.Auth;
|
||||||
{{/hasOAuthMethods}}
|
{{/hasOAuthMethods}}
|
||||||
@ -628,6 +629,11 @@ namespace {{packageName}}.Client
|
|||||||
}
|
}
|
||||||
{{/hasHttpSignatureMethods}}
|
{{/hasHttpSignatureMethods}}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets and Sets the RemoteCertificateValidationCallback
|
||||||
|
/// </summary>
|
||||||
|
public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; }
|
||||||
|
|
||||||
#endregion Properties
|
#endregion Properties
|
||||||
|
|
||||||
#region Methods
|
#region Methods
|
||||||
@ -714,7 +720,8 @@ namespace {{packageName}}.Client
|
|||||||
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
||||||
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
||||||
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
||||||
UseDefaultCredentials = second.UseDefaultCredentials
|
UseDefaultCredentials = second.UseDefaultCredentials,
|
||||||
|
RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback,
|
||||||
};
|
};
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Net.Security;
|
||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
{{#useRestSharp}}
|
{{#useRestSharp}}
|
||||||
{{#hasOAuthMethods}}using {{packageName}}.Client.Auth;
|
{{#hasOAuthMethods}}using {{packageName}}.Client.Auth;
|
||||||
@ -161,5 +162,11 @@ namespace {{packageName}}.Client
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
HttpSigningConfiguration HttpSigningConfiguration { get; }
|
HttpSigningConfiguration HttpSigningConfiguration { get; }
|
||||||
{{/hasHttpSignatureMethods}}
|
{{/hasHttpSignatureMethods}}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Callback function for handling the validation of remote certificates. Useful for certificate pinning and
|
||||||
|
/// overriding certificate errors in the scope of a request.
|
||||||
|
/// </summary>
|
||||||
|
RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -454,7 +454,8 @@ namespace Org.OpenAPITools.Client
|
|||||||
MaxTimeout = configuration.Timeout,
|
MaxTimeout = configuration.Timeout,
|
||||||
Proxy = configuration.Proxy,
|
Proxy = configuration.Proxy,
|
||||||
UserAgent = configuration.UserAgent,
|
UserAgent = configuration.UserAgent,
|
||||||
UseDefaultCredentials = configuration.UseDefaultCredentials
|
UseDefaultCredentials = configuration.UseDefaultCredentials,
|
||||||
|
RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback
|
||||||
};
|
};
|
||||||
|
|
||||||
RestClient client = new RestClient(clientOptions)
|
RestClient client = new RestClient(clientOptions)
|
||||||
|
@ -18,6 +18,7 @@ using System.Reflection;
|
|||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
|
using System.Net.Security;
|
||||||
|
|
||||||
namespace Org.OpenAPITools.Client
|
namespace Org.OpenAPITools.Client
|
||||||
{
|
{
|
||||||
@ -516,6 +517,11 @@ namespace Org.OpenAPITools.Client
|
|||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets and Sets the RemoteCertificateValidationCallback
|
||||||
|
/// </summary>
|
||||||
|
public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; }
|
||||||
|
|
||||||
#endregion Properties
|
#endregion Properties
|
||||||
|
|
||||||
#region Methods
|
#region Methods
|
||||||
@ -591,7 +597,8 @@ namespace Org.OpenAPITools.Client
|
|||||||
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
||||||
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
||||||
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
||||||
UseDefaultCredentials = second.UseDefaultCredentials
|
UseDefaultCredentials = second.UseDefaultCredentials,
|
||||||
|
RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback,
|
||||||
};
|
};
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Net.Security;
|
||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
|
|
||||||
namespace Org.OpenAPITools.Client
|
namespace Org.OpenAPITools.Client
|
||||||
@ -130,5 +131,11 @@ namespace Org.OpenAPITools.Client
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>X509 Certificate collection.</value>
|
/// <value>X509 Certificate collection.</value>
|
||||||
X509CertificateCollection ClientCertificates { get; }
|
X509CertificateCollection ClientCertificates { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Callback function for handling the validation of remote certificates. Useful for certificate pinning and
|
||||||
|
/// overriding certificate errors in the scope of a request.
|
||||||
|
/// </summary>
|
||||||
|
RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -455,7 +455,8 @@ namespace Org.OpenAPITools.Client
|
|||||||
MaxTimeout = configuration.Timeout,
|
MaxTimeout = configuration.Timeout,
|
||||||
Proxy = configuration.Proxy,
|
Proxy = configuration.Proxy,
|
||||||
UserAgent = configuration.UserAgent,
|
UserAgent = configuration.UserAgent,
|
||||||
UseDefaultCredentials = configuration.UseDefaultCredentials
|
UseDefaultCredentials = configuration.UseDefaultCredentials,
|
||||||
|
RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback
|
||||||
};
|
};
|
||||||
|
|
||||||
RestClient client = new RestClient(clientOptions)
|
RestClient client = new RestClient(clientOptions)
|
||||||
|
@ -18,6 +18,7 @@ using System.Reflection;
|
|||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
|
using System.Net.Security;
|
||||||
using Org.OpenAPITools.Client.Auth;
|
using Org.OpenAPITools.Client.Auth;
|
||||||
|
|
||||||
namespace Org.OpenAPITools.Client
|
namespace Org.OpenAPITools.Client
|
||||||
@ -650,6 +651,11 @@ namespace Org.OpenAPITools.Client
|
|||||||
set { _HttpSigningConfiguration = value; }
|
set { _HttpSigningConfiguration = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets and Sets the RemoteCertificateValidationCallback
|
||||||
|
/// </summary>
|
||||||
|
public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; }
|
||||||
|
|
||||||
#endregion Properties
|
#endregion Properties
|
||||||
|
|
||||||
#region Methods
|
#region Methods
|
||||||
@ -730,7 +736,8 @@ namespace Org.OpenAPITools.Client
|
|||||||
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
||||||
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
||||||
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
||||||
UseDefaultCredentials = second.UseDefaultCredentials
|
UseDefaultCredentials = second.UseDefaultCredentials,
|
||||||
|
RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback,
|
||||||
};
|
};
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Net.Security;
|
||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
using Org.OpenAPITools.Client.Auth;
|
using Org.OpenAPITools.Client.Auth;
|
||||||
|
|
||||||
@ -160,5 +161,11 @@ namespace Org.OpenAPITools.Client
|
|||||||
/// Gets the HttpSigning configuration
|
/// Gets the HttpSigning configuration
|
||||||
/// </summary>
|
/// </summary>
|
||||||
HttpSigningConfiguration HttpSigningConfiguration { get; }
|
HttpSigningConfiguration HttpSigningConfiguration { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Callback function for handling the validation of remote certificates. Useful for certificate pinning and
|
||||||
|
/// overriding certificate errors in the scope of a request.
|
||||||
|
/// </summary>
|
||||||
|
RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ using System.Reflection;
|
|||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
|
using System.Net.Security;
|
||||||
|
|
||||||
namespace Org.OpenAPITools.Client
|
namespace Org.OpenAPITools.Client
|
||||||
{
|
{
|
||||||
@ -625,6 +626,11 @@ namespace Org.OpenAPITools.Client
|
|||||||
set { _HttpSigningConfiguration = value; }
|
set { _HttpSigningConfiguration = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets and Sets the RemoteCertificateValidationCallback
|
||||||
|
/// </summary>
|
||||||
|
public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; }
|
||||||
|
|
||||||
#endregion Properties
|
#endregion Properties
|
||||||
|
|
||||||
#region Methods
|
#region Methods
|
||||||
@ -701,7 +707,8 @@ namespace Org.OpenAPITools.Client
|
|||||||
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
||||||
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
||||||
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
||||||
UseDefaultCredentials = second.UseDefaultCredentials
|
UseDefaultCredentials = second.UseDefaultCredentials,
|
||||||
|
RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback,
|
||||||
};
|
};
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Net.Security;
|
||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
|
|
||||||
namespace Org.OpenAPITools.Client
|
namespace Org.OpenAPITools.Client
|
||||||
@ -135,5 +136,11 @@ namespace Org.OpenAPITools.Client
|
|||||||
/// Gets the HttpSigning configuration
|
/// Gets the HttpSigning configuration
|
||||||
/// </summary>
|
/// </summary>
|
||||||
HttpSigningConfiguration HttpSigningConfiguration { get; }
|
HttpSigningConfiguration HttpSigningConfiguration { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Callback function for handling the validation of remote certificates. Useful for certificate pinning and
|
||||||
|
/// overriding certificate errors in the scope of a request.
|
||||||
|
/// </summary>
|
||||||
|
RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -456,7 +456,8 @@ namespace Org.OpenAPITools.Client
|
|||||||
MaxTimeout = configuration.Timeout,
|
MaxTimeout = configuration.Timeout,
|
||||||
Proxy = configuration.Proxy,
|
Proxy = configuration.Proxy,
|
||||||
UserAgent = configuration.UserAgent,
|
UserAgent = configuration.UserAgent,
|
||||||
UseDefaultCredentials = configuration.UseDefaultCredentials
|
UseDefaultCredentials = configuration.UseDefaultCredentials,
|
||||||
|
RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback
|
||||||
};
|
};
|
||||||
|
|
||||||
RestClient client = new RestClient(clientOptions)
|
RestClient client = new RestClient(clientOptions)
|
||||||
|
@ -18,6 +18,7 @@ using System.Reflection;
|
|||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
|
using System.Net.Security;
|
||||||
using Org.OpenAPITools.Client.Auth;
|
using Org.OpenAPITools.Client.Auth;
|
||||||
|
|
||||||
namespace Org.OpenAPITools.Client
|
namespace Org.OpenAPITools.Client
|
||||||
@ -655,6 +656,11 @@ namespace Org.OpenAPITools.Client
|
|||||||
set { _HttpSigningConfiguration = value; }
|
set { _HttpSigningConfiguration = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets and Sets the RemoteCertificateValidationCallback
|
||||||
|
/// </summary>
|
||||||
|
public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; }
|
||||||
|
|
||||||
#endregion Properties
|
#endregion Properties
|
||||||
|
|
||||||
#region Methods
|
#region Methods
|
||||||
@ -735,7 +741,8 @@ namespace Org.OpenAPITools.Client
|
|||||||
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
||||||
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
||||||
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
||||||
UseDefaultCredentials = second.UseDefaultCredentials
|
UseDefaultCredentials = second.UseDefaultCredentials,
|
||||||
|
RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback,
|
||||||
};
|
};
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Net.Security;
|
||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
using Org.OpenAPITools.Client.Auth;
|
using Org.OpenAPITools.Client.Auth;
|
||||||
|
|
||||||
@ -160,5 +161,11 @@ namespace Org.OpenAPITools.Client
|
|||||||
/// Gets the HttpSigning configuration
|
/// Gets the HttpSigning configuration
|
||||||
/// </summary>
|
/// </summary>
|
||||||
HttpSigningConfiguration HttpSigningConfiguration { get; }
|
HttpSigningConfiguration HttpSigningConfiguration { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Callback function for handling the validation of remote certificates. Useful for certificate pinning and
|
||||||
|
/// overriding certificate errors in the scope of a request.
|
||||||
|
/// </summary>
|
||||||
|
RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -456,7 +456,8 @@ namespace Org.OpenAPITools.Client
|
|||||||
MaxTimeout = configuration.Timeout,
|
MaxTimeout = configuration.Timeout,
|
||||||
Proxy = configuration.Proxy,
|
Proxy = configuration.Proxy,
|
||||||
UserAgent = configuration.UserAgent,
|
UserAgent = configuration.UserAgent,
|
||||||
UseDefaultCredentials = configuration.UseDefaultCredentials
|
UseDefaultCredentials = configuration.UseDefaultCredentials,
|
||||||
|
RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback
|
||||||
};
|
};
|
||||||
|
|
||||||
RestClient client = new RestClient(clientOptions)
|
RestClient client = new RestClient(clientOptions)
|
||||||
|
@ -18,6 +18,7 @@ using System.Reflection;
|
|||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
|
using System.Net.Security;
|
||||||
using Org.OpenAPITools.Client.Auth;
|
using Org.OpenAPITools.Client.Auth;
|
||||||
|
|
||||||
namespace Org.OpenAPITools.Client
|
namespace Org.OpenAPITools.Client
|
||||||
@ -655,6 +656,11 @@ namespace Org.OpenAPITools.Client
|
|||||||
set { _HttpSigningConfiguration = value; }
|
set { _HttpSigningConfiguration = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets and Sets the RemoteCertificateValidationCallback
|
||||||
|
/// </summary>
|
||||||
|
public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; }
|
||||||
|
|
||||||
#endregion Properties
|
#endregion Properties
|
||||||
|
|
||||||
#region Methods
|
#region Methods
|
||||||
@ -735,7 +741,8 @@ namespace Org.OpenAPITools.Client
|
|||||||
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
||||||
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
||||||
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
||||||
UseDefaultCredentials = second.UseDefaultCredentials
|
UseDefaultCredentials = second.UseDefaultCredentials,
|
||||||
|
RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback,
|
||||||
};
|
};
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Net.Security;
|
||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
using Org.OpenAPITools.Client.Auth;
|
using Org.OpenAPITools.Client.Auth;
|
||||||
|
|
||||||
@ -160,5 +161,11 @@ namespace Org.OpenAPITools.Client
|
|||||||
/// Gets the HttpSigning configuration
|
/// Gets the HttpSigning configuration
|
||||||
/// </summary>
|
/// </summary>
|
||||||
HttpSigningConfiguration HttpSigningConfiguration { get; }
|
HttpSigningConfiguration HttpSigningConfiguration { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Callback function for handling the validation of remote certificates. Useful for certificate pinning and
|
||||||
|
/// overriding certificate errors in the scope of a request.
|
||||||
|
/// </summary>
|
||||||
|
RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -456,7 +456,8 @@ namespace Org.OpenAPITools.Client
|
|||||||
MaxTimeout = configuration.Timeout,
|
MaxTimeout = configuration.Timeout,
|
||||||
Proxy = configuration.Proxy,
|
Proxy = configuration.Proxy,
|
||||||
UserAgent = configuration.UserAgent,
|
UserAgent = configuration.UserAgent,
|
||||||
UseDefaultCredentials = configuration.UseDefaultCredentials
|
UseDefaultCredentials = configuration.UseDefaultCredentials,
|
||||||
|
RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback
|
||||||
};
|
};
|
||||||
|
|
||||||
RestClient client = new RestClient(clientOptions)
|
RestClient client = new RestClient(clientOptions)
|
||||||
|
@ -18,6 +18,7 @@ using System.Reflection;
|
|||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
|
using System.Net.Security;
|
||||||
using Org.OpenAPITools.Client.Auth;
|
using Org.OpenAPITools.Client.Auth;
|
||||||
|
|
||||||
namespace Org.OpenAPITools.Client
|
namespace Org.OpenAPITools.Client
|
||||||
@ -655,6 +656,11 @@ namespace Org.OpenAPITools.Client
|
|||||||
set { _HttpSigningConfiguration = value; }
|
set { _HttpSigningConfiguration = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets and Sets the RemoteCertificateValidationCallback
|
||||||
|
/// </summary>
|
||||||
|
public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; }
|
||||||
|
|
||||||
#endregion Properties
|
#endregion Properties
|
||||||
|
|
||||||
#region Methods
|
#region Methods
|
||||||
@ -735,7 +741,8 @@ namespace Org.OpenAPITools.Client
|
|||||||
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
||||||
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
||||||
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
||||||
UseDefaultCredentials = second.UseDefaultCredentials
|
UseDefaultCredentials = second.UseDefaultCredentials,
|
||||||
|
RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback,
|
||||||
};
|
};
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Net.Security;
|
||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
using Org.OpenAPITools.Client.Auth;
|
using Org.OpenAPITools.Client.Auth;
|
||||||
|
|
||||||
@ -160,5 +161,11 @@ namespace Org.OpenAPITools.Client
|
|||||||
/// Gets the HttpSigning configuration
|
/// Gets the HttpSigning configuration
|
||||||
/// </summary>
|
/// </summary>
|
||||||
HttpSigningConfiguration HttpSigningConfiguration { get; }
|
HttpSigningConfiguration HttpSigningConfiguration { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Callback function for handling the validation of remote certificates. Useful for certificate pinning and
|
||||||
|
/// overriding certificate errors in the scope of a request.
|
||||||
|
/// </summary>
|
||||||
|
RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ using System.Reflection;
|
|||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
|
using System.Net.Security;
|
||||||
|
|
||||||
namespace Org.OpenAPITools.Client
|
namespace Org.OpenAPITools.Client
|
||||||
{
|
{
|
||||||
@ -625,6 +626,11 @@ namespace Org.OpenAPITools.Client
|
|||||||
set { _HttpSigningConfiguration = value; }
|
set { _HttpSigningConfiguration = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets and Sets the RemoteCertificateValidationCallback
|
||||||
|
/// </summary>
|
||||||
|
public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; }
|
||||||
|
|
||||||
#endregion Properties
|
#endregion Properties
|
||||||
|
|
||||||
#region Methods
|
#region Methods
|
||||||
@ -701,7 +707,8 @@ namespace Org.OpenAPITools.Client
|
|||||||
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
||||||
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
||||||
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
||||||
UseDefaultCredentials = second.UseDefaultCredentials
|
UseDefaultCredentials = second.UseDefaultCredentials,
|
||||||
|
RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback,
|
||||||
};
|
};
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Net.Security;
|
||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
|
|
||||||
namespace Org.OpenAPITools.Client
|
namespace Org.OpenAPITools.Client
|
||||||
@ -135,5 +136,11 @@ namespace Org.OpenAPITools.Client
|
|||||||
/// Gets the HttpSigning configuration
|
/// Gets the HttpSigning configuration
|
||||||
/// </summary>
|
/// </summary>
|
||||||
HttpSigningConfiguration HttpSigningConfiguration { get; }
|
HttpSigningConfiguration HttpSigningConfiguration { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Callback function for handling the validation of remote certificates. Useful for certificate pinning and
|
||||||
|
/// overriding certificate errors in the scope of a request.
|
||||||
|
/// </summary>
|
||||||
|
RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -455,7 +455,8 @@ namespace Org.OpenAPITools.Client
|
|||||||
MaxTimeout = configuration.Timeout,
|
MaxTimeout = configuration.Timeout,
|
||||||
Proxy = configuration.Proxy,
|
Proxy = configuration.Proxy,
|
||||||
UserAgent = configuration.UserAgent,
|
UserAgent = configuration.UserAgent,
|
||||||
UseDefaultCredentials = configuration.UseDefaultCredentials
|
UseDefaultCredentials = configuration.UseDefaultCredentials,
|
||||||
|
RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback
|
||||||
};
|
};
|
||||||
|
|
||||||
RestClient client = new RestClient(clientOptions)
|
RestClient client = new RestClient(clientOptions)
|
||||||
|
@ -18,6 +18,7 @@ using System.Reflection;
|
|||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
|
using System.Net.Security;
|
||||||
using Org.OpenAPITools.Client.Auth;
|
using Org.OpenAPITools.Client.Auth;
|
||||||
|
|
||||||
namespace Org.OpenAPITools.Client
|
namespace Org.OpenAPITools.Client
|
||||||
@ -650,6 +651,11 @@ namespace Org.OpenAPITools.Client
|
|||||||
set { _HttpSigningConfiguration = value; }
|
set { _HttpSigningConfiguration = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets and Sets the RemoteCertificateValidationCallback
|
||||||
|
/// </summary>
|
||||||
|
public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; }
|
||||||
|
|
||||||
#endregion Properties
|
#endregion Properties
|
||||||
|
|
||||||
#region Methods
|
#region Methods
|
||||||
@ -730,7 +736,8 @@ namespace Org.OpenAPITools.Client
|
|||||||
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
||||||
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
||||||
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
||||||
UseDefaultCredentials = second.UseDefaultCredentials
|
UseDefaultCredentials = second.UseDefaultCredentials,
|
||||||
|
RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback,
|
||||||
};
|
};
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Net.Security;
|
||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
using Org.OpenAPITools.Client.Auth;
|
using Org.OpenAPITools.Client.Auth;
|
||||||
|
|
||||||
@ -160,5 +161,11 @@ namespace Org.OpenAPITools.Client
|
|||||||
/// Gets the HttpSigning configuration
|
/// Gets the HttpSigning configuration
|
||||||
/// </summary>
|
/// </summary>
|
||||||
HttpSigningConfiguration HttpSigningConfiguration { get; }
|
HttpSigningConfiguration HttpSigningConfiguration { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Callback function for handling the validation of remote certificates. Useful for certificate pinning and
|
||||||
|
/// overriding certificate errors in the scope of a request.
|
||||||
|
/// </summary>
|
||||||
|
RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -456,7 +456,8 @@ namespace Org.OpenAPITools.Client
|
|||||||
MaxTimeout = configuration.Timeout,
|
MaxTimeout = configuration.Timeout,
|
||||||
Proxy = configuration.Proxy,
|
Proxy = configuration.Proxy,
|
||||||
UserAgent = configuration.UserAgent,
|
UserAgent = configuration.UserAgent,
|
||||||
UseDefaultCredentials = configuration.UseDefaultCredentials
|
UseDefaultCredentials = configuration.UseDefaultCredentials,
|
||||||
|
RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback
|
||||||
};
|
};
|
||||||
|
|
||||||
RestClient client = new RestClient(clientOptions)
|
RestClient client = new RestClient(clientOptions)
|
||||||
|
@ -18,6 +18,7 @@ using System.Reflection;
|
|||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
|
using System.Net.Security;
|
||||||
using Org.OpenAPITools.Client.Auth;
|
using Org.OpenAPITools.Client.Auth;
|
||||||
|
|
||||||
namespace Org.OpenAPITools.Client
|
namespace Org.OpenAPITools.Client
|
||||||
@ -655,6 +656,11 @@ namespace Org.OpenAPITools.Client
|
|||||||
set { _HttpSigningConfiguration = value; }
|
set { _HttpSigningConfiguration = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets and Sets the RemoteCertificateValidationCallback
|
||||||
|
/// </summary>
|
||||||
|
public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; }
|
||||||
|
|
||||||
#endregion Properties
|
#endregion Properties
|
||||||
|
|
||||||
#region Methods
|
#region Methods
|
||||||
@ -735,7 +741,8 @@ namespace Org.OpenAPITools.Client
|
|||||||
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
||||||
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
||||||
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
||||||
UseDefaultCredentials = second.UseDefaultCredentials
|
UseDefaultCredentials = second.UseDefaultCredentials,
|
||||||
|
RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback,
|
||||||
};
|
};
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Net.Security;
|
||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
using Org.OpenAPITools.Client.Auth;
|
using Org.OpenAPITools.Client.Auth;
|
||||||
|
|
||||||
@ -160,5 +161,11 @@ namespace Org.OpenAPITools.Client
|
|||||||
/// Gets the HttpSigning configuration
|
/// Gets the HttpSigning configuration
|
||||||
/// </summary>
|
/// </summary>
|
||||||
HttpSigningConfiguration HttpSigningConfiguration { get; }
|
HttpSigningConfiguration HttpSigningConfiguration { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Callback function for handling the validation of remote certificates. Useful for certificate pinning and
|
||||||
|
/// overriding certificate errors in the scope of a request.
|
||||||
|
/// </summary>
|
||||||
|
RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -455,7 +455,8 @@ namespace Org.OpenAPITools.Client
|
|||||||
MaxTimeout = configuration.Timeout,
|
MaxTimeout = configuration.Timeout,
|
||||||
Proxy = configuration.Proxy,
|
Proxy = configuration.Proxy,
|
||||||
UserAgent = configuration.UserAgent,
|
UserAgent = configuration.UserAgent,
|
||||||
UseDefaultCredentials = configuration.UseDefaultCredentials
|
UseDefaultCredentials = configuration.UseDefaultCredentials,
|
||||||
|
RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback
|
||||||
};
|
};
|
||||||
|
|
||||||
RestClient client = new RestClient(clientOptions)
|
RestClient client = new RestClient(clientOptions)
|
||||||
|
@ -18,6 +18,7 @@ using System.Reflection;
|
|||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
|
using System.Net.Security;
|
||||||
using Org.OpenAPITools.Client.Auth;
|
using Org.OpenAPITools.Client.Auth;
|
||||||
|
|
||||||
namespace Org.OpenAPITools.Client
|
namespace Org.OpenAPITools.Client
|
||||||
@ -541,6 +542,11 @@ namespace Org.OpenAPITools.Client
|
|||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets and Sets the RemoteCertificateValidationCallback
|
||||||
|
/// </summary>
|
||||||
|
public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; }
|
||||||
|
|
||||||
#endregion Properties
|
#endregion Properties
|
||||||
|
|
||||||
#region Methods
|
#region Methods
|
||||||
@ -620,7 +626,8 @@ namespace Org.OpenAPITools.Client
|
|||||||
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
||||||
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
||||||
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
||||||
UseDefaultCredentials = second.UseDefaultCredentials
|
UseDefaultCredentials = second.UseDefaultCredentials,
|
||||||
|
RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback,
|
||||||
};
|
};
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Net.Security;
|
||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
using Org.OpenAPITools.Client.Auth;
|
using Org.OpenAPITools.Client.Auth;
|
||||||
|
|
||||||
@ -155,5 +156,11 @@ namespace Org.OpenAPITools.Client
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>X509 Certificate collection.</value>
|
/// <value>X509 Certificate collection.</value>
|
||||||
X509CertificateCollection ClientCertificates { get; }
|
X509CertificateCollection ClientCertificates { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Callback function for handling the validation of remote certificates. Useful for certificate pinning and
|
||||||
|
/// overriding certificate errors in the scope of a request.
|
||||||
|
/// </summary>
|
||||||
|
RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user