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,
|
||||
Proxy = configuration.Proxy,
|
||||
UserAgent = configuration.UserAgent,
|
||||
UseDefaultCredentials = configuration.UseDefaultCredentials
|
||||
UseDefaultCredentials = configuration.UseDefaultCredentials,
|
||||
RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback
|
||||
};
|
||||
|
||||
RestClient client = new RestClient(clientOptions)
|
||||
|
@ -12,6 +12,7 @@ using System.Reflection;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Net.Http;
|
||||
using System.Net.Security;
|
||||
{{#useRestSharp}}
|
||||
{{#hasOAuthMethods}}using {{packageName}}.Client.Auth;
|
||||
{{/hasOAuthMethods}}
|
||||
@ -627,6 +628,11 @@ namespace {{packageName}}.Client
|
||||
set { _HttpSigningConfiguration = value; }
|
||||
}
|
||||
{{/hasHttpSignatureMethods}}
|
||||
|
||||
/// <summary>
|
||||
/// Gets and Sets the RemoteCertificateValidationCallback
|
||||
/// </summary>
|
||||
public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; }
|
||||
|
||||
#endregion Properties
|
||||
|
||||
@ -714,7 +720,8 @@ namespace {{packageName}}.Client
|
||||
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
||||
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
||||
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
||||
UseDefaultCredentials = second.UseDefaultCredentials
|
||||
UseDefaultCredentials = second.UseDefaultCredentials,
|
||||
RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback,
|
||||
};
|
||||
return config;
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
{{#useRestSharp}}
|
||||
{{#hasOAuthMethods}}using {{packageName}}.Client.Auth;
|
||||
@ -161,5 +162,11 @@ namespace {{packageName}}.Client
|
||||
/// </summary>
|
||||
HttpSigningConfiguration HttpSigningConfiguration { get; }
|
||||
{{/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,
|
||||
Proxy = configuration.Proxy,
|
||||
UserAgent = configuration.UserAgent,
|
||||
UseDefaultCredentials = configuration.UseDefaultCredentials
|
||||
UseDefaultCredentials = configuration.UseDefaultCredentials,
|
||||
RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback
|
||||
};
|
||||
|
||||
RestClient client = new RestClient(clientOptions)
|
||||
|
@ -18,6 +18,7 @@ using System.Reflection;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Net.Http;
|
||||
using System.Net.Security;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
{
|
||||
@ -515,6 +516,11 @@ namespace Org.OpenAPITools.Client
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets and Sets the RemoteCertificateValidationCallback
|
||||
/// </summary>
|
||||
public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; }
|
||||
|
||||
#endregion Properties
|
||||
|
||||
@ -591,7 +597,8 @@ namespace Org.OpenAPITools.Client
|
||||
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
||||
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
||||
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
||||
UseDefaultCredentials = second.UseDefaultCredentials
|
||||
UseDefaultCredentials = second.UseDefaultCredentials,
|
||||
RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback,
|
||||
};
|
||||
return config;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
@ -130,5 +131,11 @@ namespace Org.OpenAPITools.Client
|
||||
/// </summary>
|
||||
/// <value>X509 Certificate collection.</value>
|
||||
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,
|
||||
Proxy = configuration.Proxy,
|
||||
UserAgent = configuration.UserAgent,
|
||||
UseDefaultCredentials = configuration.UseDefaultCredentials
|
||||
UseDefaultCredentials = configuration.UseDefaultCredentials,
|
||||
RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback
|
||||
};
|
||||
|
||||
RestClient client = new RestClient(clientOptions)
|
||||
|
@ -18,6 +18,7 @@ using System.Reflection;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Net.Http;
|
||||
using System.Net.Security;
|
||||
using Org.OpenAPITools.Client.Auth;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
@ -649,6 +650,11 @@ namespace Org.OpenAPITools.Client
|
||||
get { return _HttpSigningConfiguration; }
|
||||
set { _HttpSigningConfiguration = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets and Sets the RemoteCertificateValidationCallback
|
||||
/// </summary>
|
||||
public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; }
|
||||
|
||||
#endregion Properties
|
||||
|
||||
@ -730,7 +736,8 @@ namespace Org.OpenAPITools.Client
|
||||
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
||||
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
||||
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
||||
UseDefaultCredentials = second.UseDefaultCredentials
|
||||
UseDefaultCredentials = second.UseDefaultCredentials,
|
||||
RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback,
|
||||
};
|
||||
return config;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using Org.OpenAPITools.Client.Auth;
|
||||
|
||||
@ -160,5 +161,11 @@ namespace Org.OpenAPITools.Client
|
||||
/// Gets the HttpSigning configuration
|
||||
/// </summary>
|
||||
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.Text;
|
||||
using System.Net.Http;
|
||||
using System.Net.Security;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
{
|
||||
@ -624,6 +625,11 @@ namespace Org.OpenAPITools.Client
|
||||
get { return _HttpSigningConfiguration; }
|
||||
set { _HttpSigningConfiguration = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets and Sets the RemoteCertificateValidationCallback
|
||||
/// </summary>
|
||||
public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; }
|
||||
|
||||
#endregion Properties
|
||||
|
||||
@ -701,7 +707,8 @@ namespace Org.OpenAPITools.Client
|
||||
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
||||
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
||||
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
||||
UseDefaultCredentials = second.UseDefaultCredentials
|
||||
UseDefaultCredentials = second.UseDefaultCredentials,
|
||||
RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback,
|
||||
};
|
||||
return config;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
@ -135,5 +136,11 @@ namespace Org.OpenAPITools.Client
|
||||
/// Gets the HttpSigning configuration
|
||||
/// </summary>
|
||||
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,
|
||||
Proxy = configuration.Proxy,
|
||||
UserAgent = configuration.UserAgent,
|
||||
UseDefaultCredentials = configuration.UseDefaultCredentials
|
||||
UseDefaultCredentials = configuration.UseDefaultCredentials,
|
||||
RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback
|
||||
};
|
||||
|
||||
RestClient client = new RestClient(clientOptions)
|
||||
|
@ -18,6 +18,7 @@ using System.Reflection;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Net.Http;
|
||||
using System.Net.Security;
|
||||
using Org.OpenAPITools.Client.Auth;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
@ -654,6 +655,11 @@ namespace Org.OpenAPITools.Client
|
||||
get { return _HttpSigningConfiguration; }
|
||||
set { _HttpSigningConfiguration = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets and Sets the RemoteCertificateValidationCallback
|
||||
/// </summary>
|
||||
public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; }
|
||||
|
||||
#endregion Properties
|
||||
|
||||
@ -735,7 +741,8 @@ namespace Org.OpenAPITools.Client
|
||||
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
||||
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
||||
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
||||
UseDefaultCredentials = second.UseDefaultCredentials
|
||||
UseDefaultCredentials = second.UseDefaultCredentials,
|
||||
RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback,
|
||||
};
|
||||
return config;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using Org.OpenAPITools.Client.Auth;
|
||||
|
||||
@ -160,5 +161,11 @@ namespace Org.OpenAPITools.Client
|
||||
/// Gets the HttpSigning configuration
|
||||
/// </summary>
|
||||
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,
|
||||
Proxy = configuration.Proxy,
|
||||
UserAgent = configuration.UserAgent,
|
||||
UseDefaultCredentials = configuration.UseDefaultCredentials
|
||||
UseDefaultCredentials = configuration.UseDefaultCredentials,
|
||||
RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback
|
||||
};
|
||||
|
||||
RestClient client = new RestClient(clientOptions)
|
||||
|
@ -18,6 +18,7 @@ using System.Reflection;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Net.Http;
|
||||
using System.Net.Security;
|
||||
using Org.OpenAPITools.Client.Auth;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
@ -654,6 +655,11 @@ namespace Org.OpenAPITools.Client
|
||||
get { return _HttpSigningConfiguration; }
|
||||
set { _HttpSigningConfiguration = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets and Sets the RemoteCertificateValidationCallback
|
||||
/// </summary>
|
||||
public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; }
|
||||
|
||||
#endregion Properties
|
||||
|
||||
@ -735,7 +741,8 @@ namespace Org.OpenAPITools.Client
|
||||
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
||||
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
||||
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
||||
UseDefaultCredentials = second.UseDefaultCredentials
|
||||
UseDefaultCredentials = second.UseDefaultCredentials,
|
||||
RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback,
|
||||
};
|
||||
return config;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using Org.OpenAPITools.Client.Auth;
|
||||
|
||||
@ -160,5 +161,11 @@ namespace Org.OpenAPITools.Client
|
||||
/// Gets the HttpSigning configuration
|
||||
/// </summary>
|
||||
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,
|
||||
Proxy = configuration.Proxy,
|
||||
UserAgent = configuration.UserAgent,
|
||||
UseDefaultCredentials = configuration.UseDefaultCredentials
|
||||
UseDefaultCredentials = configuration.UseDefaultCredentials,
|
||||
RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback
|
||||
};
|
||||
|
||||
RestClient client = new RestClient(clientOptions)
|
||||
|
@ -18,6 +18,7 @@ using System.Reflection;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Net.Http;
|
||||
using System.Net.Security;
|
||||
using Org.OpenAPITools.Client.Auth;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
@ -654,6 +655,11 @@ namespace Org.OpenAPITools.Client
|
||||
get { return _HttpSigningConfiguration; }
|
||||
set { _HttpSigningConfiguration = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets and Sets the RemoteCertificateValidationCallback
|
||||
/// </summary>
|
||||
public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; }
|
||||
|
||||
#endregion Properties
|
||||
|
||||
@ -735,7 +741,8 @@ namespace Org.OpenAPITools.Client
|
||||
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
||||
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
||||
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
||||
UseDefaultCredentials = second.UseDefaultCredentials
|
||||
UseDefaultCredentials = second.UseDefaultCredentials,
|
||||
RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback,
|
||||
};
|
||||
return config;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using Org.OpenAPITools.Client.Auth;
|
||||
|
||||
@ -160,5 +161,11 @@ namespace Org.OpenAPITools.Client
|
||||
/// Gets the HttpSigning configuration
|
||||
/// </summary>
|
||||
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.Text;
|
||||
using System.Net.Http;
|
||||
using System.Net.Security;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
{
|
||||
@ -624,6 +625,11 @@ namespace Org.OpenAPITools.Client
|
||||
get { return _HttpSigningConfiguration; }
|
||||
set { _HttpSigningConfiguration = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets and Sets the RemoteCertificateValidationCallback
|
||||
/// </summary>
|
||||
public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; }
|
||||
|
||||
#endregion Properties
|
||||
|
||||
@ -701,7 +707,8 @@ namespace Org.OpenAPITools.Client
|
||||
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
||||
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
||||
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
||||
UseDefaultCredentials = second.UseDefaultCredentials
|
||||
UseDefaultCredentials = second.UseDefaultCredentials,
|
||||
RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback,
|
||||
};
|
||||
return config;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
@ -135,5 +136,11 @@ namespace Org.OpenAPITools.Client
|
||||
/// Gets the HttpSigning configuration
|
||||
/// </summary>
|
||||
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,
|
||||
Proxy = configuration.Proxy,
|
||||
UserAgent = configuration.UserAgent,
|
||||
UseDefaultCredentials = configuration.UseDefaultCredentials
|
||||
UseDefaultCredentials = configuration.UseDefaultCredentials,
|
||||
RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback
|
||||
};
|
||||
|
||||
RestClient client = new RestClient(clientOptions)
|
||||
|
@ -18,6 +18,7 @@ using System.Reflection;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Net.Http;
|
||||
using System.Net.Security;
|
||||
using Org.OpenAPITools.Client.Auth;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
@ -649,6 +650,11 @@ namespace Org.OpenAPITools.Client
|
||||
get { return _HttpSigningConfiguration; }
|
||||
set { _HttpSigningConfiguration = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets and Sets the RemoteCertificateValidationCallback
|
||||
/// </summary>
|
||||
public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; }
|
||||
|
||||
#endregion Properties
|
||||
|
||||
@ -730,7 +736,8 @@ namespace Org.OpenAPITools.Client
|
||||
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
||||
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
||||
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
||||
UseDefaultCredentials = second.UseDefaultCredentials
|
||||
UseDefaultCredentials = second.UseDefaultCredentials,
|
||||
RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback,
|
||||
};
|
||||
return config;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using Org.OpenAPITools.Client.Auth;
|
||||
|
||||
@ -160,5 +161,11 @@ namespace Org.OpenAPITools.Client
|
||||
/// Gets the HttpSigning configuration
|
||||
/// </summary>
|
||||
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,
|
||||
Proxy = configuration.Proxy,
|
||||
UserAgent = configuration.UserAgent,
|
||||
UseDefaultCredentials = configuration.UseDefaultCredentials
|
||||
UseDefaultCredentials = configuration.UseDefaultCredentials,
|
||||
RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback
|
||||
};
|
||||
|
||||
RestClient client = new RestClient(clientOptions)
|
||||
|
@ -18,6 +18,7 @@ using System.Reflection;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Net.Http;
|
||||
using System.Net.Security;
|
||||
using Org.OpenAPITools.Client.Auth;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
@ -654,6 +655,11 @@ namespace Org.OpenAPITools.Client
|
||||
get { return _HttpSigningConfiguration; }
|
||||
set { _HttpSigningConfiguration = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets and Sets the RemoteCertificateValidationCallback
|
||||
/// </summary>
|
||||
public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; }
|
||||
|
||||
#endregion Properties
|
||||
|
||||
@ -735,7 +741,8 @@ namespace Org.OpenAPITools.Client
|
||||
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
||||
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
||||
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
||||
UseDefaultCredentials = second.UseDefaultCredentials
|
||||
UseDefaultCredentials = second.UseDefaultCredentials,
|
||||
RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback,
|
||||
};
|
||||
return config;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using Org.OpenAPITools.Client.Auth;
|
||||
|
||||
@ -160,5 +161,11 @@ namespace Org.OpenAPITools.Client
|
||||
/// Gets the HttpSigning configuration
|
||||
/// </summary>
|
||||
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,
|
||||
Proxy = configuration.Proxy,
|
||||
UserAgent = configuration.UserAgent,
|
||||
UseDefaultCredentials = configuration.UseDefaultCredentials
|
||||
UseDefaultCredentials = configuration.UseDefaultCredentials,
|
||||
RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback
|
||||
};
|
||||
|
||||
RestClient client = new RestClient(clientOptions)
|
||||
|
@ -18,6 +18,7 @@ using System.Reflection;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Net.Http;
|
||||
using System.Net.Security;
|
||||
using Org.OpenAPITools.Client.Auth;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
@ -540,6 +541,11 @@ namespace Org.OpenAPITools.Client
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets and Sets the RemoteCertificateValidationCallback
|
||||
/// </summary>
|
||||
public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; }
|
||||
|
||||
#endregion Properties
|
||||
|
||||
@ -620,7 +626,8 @@ namespace Org.OpenAPITools.Client
|
||||
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
||||
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
||||
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
||||
UseDefaultCredentials = second.UseDefaultCredentials
|
||||
UseDefaultCredentials = second.UseDefaultCredentials,
|
||||
RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback,
|
||||
};
|
||||
return config;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using Org.OpenAPITools.Client.Auth;
|
||||
|
||||
@ -155,5 +156,11 @@ namespace Org.OpenAPITools.Client
|
||||
/// </summary>
|
||||
/// <value>X509 Certificate collection.</value>
|
||||
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