DataScript: avi.ssl.client_cert_verified

DataScript

Function avi.ssl.client_cert_verified()
Description This DataScript function is used to find if the client certificate verification is complete
Events VS_DATASCRIPT_EVT_SSL_HANDSHAKE_DONE
VS_DATASCRIPT_EVT_HTTP_REQ
VS_DATASCRIPT_EVT_HTTP_REQ_DATA
Parameters None
Returns This DataScript function returns one of the following values:
  • False indicates
    • The connection is not SSL enabled
    • Avi did not request for a client certificate
    • Client did not present a certificate
    • Client certificate validation has failed
  • True indicates that the client certificate validation has passed
Example

if avi.ssl.server_name() == "secure.example.com" && avi.ssl.client_cert_verified() == true then 
   avi.ssl.set_pki_profile(avi.CLIENT_VERIFY_REQUIRE, "pkiprofile-ca", avi.AUTHENTICATE_ONLY_ONCE)
   avi.ssl.renegotiate()
end