NAME

catcert_version - get certificate version as a string

SYNOPSIS

#include <cat/cat.h>

int catcert_version(const cat_cert *cert, char **version);

DESCRIPTION

This function extracts the version from cert and returns a pointer to the result in *version. For version 3 certificates, the returned string will be "V3".

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