Chapter 5 Advanced Expressions: Working with Dates, Times, and Numbers 105

Operations on Certificate (client.ssl.client_cert) Dates and Times

SSL Certificate Operation

Description

 

 

certificate.

Calculates the number of seconds between the current

VALID_NOT_AFTER.

system time and the specified time and returns an

RELATIVE_NOW

integer. If the time is in the past, the integer is negative;

 

if it is in the future, the integer is positive.

certificate.

Extracts the last second that the certificate is valid and

VALID_NOT_AFTER.SECONDS

returns that value as an integer from 0 to 59.

certificate.

Extracts the last weekday that the certificate is valid.

VALID_NOT_AFTER.WEEKDAY

Returns a number between 0 (Sunday) and 6 (Saturday)

 

to give the weekday in the time value.

certificate.

Returns a Boolean TRUE if the time lies within all the

VALID_NOT_AFTER.

ranges defined by the elements in time1, time2.

WITHIN(time1, time2)

If you omit an element of time from time1, it is assumed

 

to have the lowest value in its range. If you omit an

 

element from time2, it is assumed to have the highest

 

value of its range. If you specify a year in time1, you

 

must specify it in time2.

 

The ranges for elements of time are as follows: month

 

1-12, day 1-31, weekday 0-6, hour 0-23, minutes 0-59

 

and seconds 0-59. For the result to be TRUE, each

 

element in the time must exist in the corresponding

 

range that you specify in time1, time2.

 

For example, if time is GMT 2005 May 10 10h 15m

 

30s, and it is the second Tuesday of the month, you can

 

specify the following (evaluation results are in

 

parentheses):

 

. . .within(GMT 2004, GMT 2006)

 

 

(TRUE)

 

. . .within(GMT 2004 Jan, GMT 2006

 

 

Mar) (FALSE, May is not in the range of January

 

 

to March.)

 

. . .within(GMT Feb, GMT) (TRUE, May

 

 

is in the range for February to December)

 

. . .within(GMT Sun_1, GMT Sun_3)

 

 

(TRUE, the second Tuesday lies within the range of

 

 

the first Sunday through the third Sunday)

 

. . .within(GMT 2005 May 1 10h, GMT

 

 

May 2005 1 17h) (TRUE)

 

. . .within(LOCAL 2005 May 1, LOCAL

 

 

May 2005 1) (TRUE or FALSE, depending on

 

 

the NetScaler system time zone)

certificate.

Extracts the last year that the certificate is valid and

VALID_NOT_AFTER.YEAR

returns a four-digit integer.

certificate.

Returns the date that the client certificate becomes

VALID_NOT_BEFORE

valid.

 

The return format is the number of seconds since GMT

 

January 1, 1970 (0 hours, 0 minutes, 0 seconds).

 

 

 

Page 119
Image 119
Citrix Systems 9.2 System time and the specified time and returns an, If it is in the future, the integer is positive