This custom trigger function is used to find the validity of server key(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 keys prior (n days) to the expiry date.
See How to Create Custom Trigger Functions for details on installation.
Source code and build instructions
Let me now show you how to implement that.
1. Make sure you have IsServerKeyValid function installed
Before creating a custom trigger using function IsServerKeyValid, you need to have build installed in the server where JSCAPE MFT Server is running.
2. Create a Trigger to Validate Server Key
Login into admin console of JSCAPE MFT Server > Triggers and Click Add to create a Trigger
Give the trigger a Name and then select the Current Time event type from the drop-down list.
Click Next to Step 2 where a condition can be set to execute the trigger. Now Click Functions button to
select the IsServerKeyValid function.
IsServerKeyValid function has the below method signature
- IsServerKeyValid (days)
This method signature is used to validate the server key(s) prior to expiry date.
For example; Consider that you want to validate the certificate expiry before 30 days pass the parameter as 30.
Since the event type is Current Time, on what time the trigger should be executed should be set along with the IsServerKeyValid function.
If the Trigger need to run on every day 10 PM add the condition Hour=22 along with IsServerKeyValid function as shown below.
If the server keys are to be validated before 30 days use the expression as; If the server key(s) are about to expire the function will return false.
Hour=22 And IsServerKeyValid(30)=false
On Step 3 an action has to be added, in order to add an action click Add button 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 the Body text box, enter the message you want to relay.
Click Ok to save the settings.
That's it. Now you know how to use the custom function IsServerKeyValid and send an alert if key(s) are not valid.