(DataFlex) Require that the Web Server's SSL Certificate is Non-Expired and the Signature is Valid
Demonstrates setting the RequireSslCertVerify property to require that the web server's SSL/TLS certificate is non-expired and that the certificate's signature is valid.
Use ChilkatAx-win32.pkg
Procedure Test
String sUrl
Handle hoHttp
String sHtml
String sTemp1
Boolean bTemp1
// This example assumes the Chilkat HTTP API to have been previously unlocked.
// See Global Unlock Sample for sample code.
Move "https://chilkatsoft.com" To sUrl
Get Create (RefClass(cComChilkatHttp)) To hoHttp
If (Not(IsComObjectCreated(hoHttp))) Begin
Send CreateComObject of hoHttp
End
Set ComRequireSslCertVerify Of hoHttp To True
Get ComQuickGetStr Of hoHttp sUrl To sHtml
Get ComLastMethodSuccess Of hoHttp To bTemp1
If (bTemp1 <> True) Begin
Get ComLastErrorText Of hoHttp To sTemp1
Showln sTemp1
Procedure_Return
End
Showln "Success."
End_Procedure
|