NAME

catcert_validity - get certificate validity as a string

SYNOPSIS

#include <cat/cat.h>

int catcert_validity(const cat_cert *cert, char **validity);

DESCRIPTION

This function extracts the certificate validity from cert and returns a pointer to the result in *validity. The format for dates is ``YYYY-MM-DD''. A typical return value might look as follows:

 Not before: 1999-01-31 09:00 UTC
 Not after: 2000-01-31 09:00 UTC

The result is allocated and must be freed by the caller.

RETURN VALUES

The function returns 0 if successful, or a negative code on error.

SEE ALSO

cat, catcert, catcert_issuername