This custom trigger function is used to find the validity of host certificate(s) installed in JSCAPE MFT Server. This function use number of days as a parameter where the number of days say “n” is used to check the validity of the certificate prior (n days) to the expiry date.
SeeHow to Create Custom Trigger Functionsfor details on installation.
Downloads
Source code and build instructions
How to validate a Host Certificates using IsCertificateValid Function
Let me now show you how to implement that.
1. Make sure you have IsCertificateValid function installed
Before creating a custom trigger using function IsCertificateValid, you need to havebuildinstalled in theserver where JSCAPE MFT Server is running.
2. Create a Trigger to Validate Certificate
Login into admin console of JSCAPE MFT Server > Triggers and ClickAddto create a Trigger
Give the trigger aNameand then select the Current Timeevent type from the drop-down list.

Click Next to Step 2 where a condition can be set to execute the trigger.Now ClickFunctionsbutton to
select the IsCertificateValidfunction.

IsCertificateValidfunction has the below method signature
– IsCertificateValid(days)
This method signature is used to validate the certificate(s) prior to expiry date.
For example; Consider that you want to validate the certificate expiry before 30 days. Pass the argument as 30 to the function.
Since the event type is Current Time, on what time the trigger should be executed should be also set along with the IsCertificateValid function.
If the Trigger need to run on every day 10 PM add the condition Hour=22 along with IsCertificateValidfunction as shown below.
If the certficate(s)are to be validated before 30 days use the expression as;
Hour=22 And IsCertificateValid(30)=false
If thecertficate(s)are about to expire the function will return false.

On Step 3 an action has to be added, in order to add an action clickAddbutton and select the action “Send Email” from drop down list and Click OK

On OK to add and input the required parameters.

Enter all necessary parameters for sending that email notification, including the hostname of your SMTP server, the port number, connection type, etc.In theBodytext box, enter the message you want to relay.
ClickOkto save the settings.
That’s it. Now you know how to use the custom function IsCertificateValidand send an alert if certificate(s) are not valid.




