Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected override WebRequest GetWebRequest(Uri address)
- {
- var request = base.GetWebRequest(address) as HttpWebRequest;
- request.ServerCertificateValidationCallback +=
- (sender, certificate, chain, sslPolicyErrors) => { return true; };
- if (Certificate != null)
- {
- request.ClientCertificates.Add(Certificate);
- LAST_CERTIFICATE_HASH = string.Format("{0} client certificates, hash {1}",
- request.ClientCertificates.Count, Certificate.GetCertHashString());
- }
- if (SOAPAction != null)
- {
- request.Headers.Add("SOAPAction", SOAPAction);
- }
- return request;
- }
- 2015-10-07 01:06:02.446: Certificate Hash: DCE9A718132403C7B8F1690EE7E4A6E1A99D2C74
- 2015-10-07 01:06:02.446: LAST_CERTIFICATE_HASH: 1 client certificates, hash DCE9A718132403C7B8F1690EE7E4A6E1A99D2C74
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement