DataScript: avi.ssl.clear_client_cert_verify_error

DataScript

Function avi.ssl.clear_client_cert_verify_error()
Description This function can be used to clear the SSL client certificate verification error on the TLS connection. Internally, the API sets 'X509_V_OK' for verify_result on the TLS connection.
Events VS_DATASCRIPT_EVT_SSL_HANDSHAKE_DONE
VS_DATASCRIPT_EVT_HTTP_REQ
VS_DATASCRIPT_EVT_HTTP_REQ_DATA
Parameters None
Returns No value
Example

if avi.ssl.server_name() == "secure.example.com" && avi.ssl.get_client_cert_verify_mode() == 0 then ​

   avi.ssl.set_pki_profile(avi.CLIENT_VERIFY_REQUIRE, "pkiprofile-ca", avi.AUTHENTICATE_ONLY_ONCE)​

   avi.ssl.renegotiate()​

   verify_err, err_code = avi.ssl.client_cert_verify_error()​

   if err_code ~= 0 and avi.ssl.client_cert_verify_error_string(err_code) == 'X509_V_ERR_CRL_HAS_EXPIRED' then ​

         avi.ssl.clear_client_cert_verify_error()​

   end​

end​