I’m making an API call as per the below code snippet:
if (ServicePointManager.SecurityProtocol.HasFlag(SecurityProtocolType.Tls12) == false)
{
ServicePointManager.SecurityProtocol = ServicePointManager.SecurityProtocol || SecurityProtocolType.Tls12;
}
HttpWebRequest webRequest = HttpWebRequest.Create(EndPoint);
Token = GetAuthToken();
HttpWebRequest webRequest = HttpWebRequest.Create(EndPoint);
webRequest.Method = "GET";
webRequest.Accept = "application/vnd.hmrc.1.0+json";
webRequest.Headers.Add(HttpRequestHeader.Authorization, "Bearer " + Token);
var webResponse = (HttpWebResponse)webRequest.GetResponse();
StreamReader StreamReader = new StreamReader(webResponse.GetResponseStream());
string responseJson = StreamReader.ReadToEnd();
if (webResponse.StatusCode == HttpStatusCode.OK)
{
// process response
}
However, the API host recently stopped accepting CBC Ciphers. How do I adapt the code above to exclude CBC Ciphers? Thanks in advance for your help.
I found a utility called IISCrypto that does this manually via a GUI, but now I’m looking to do it in C#.