NAME

catcert_parse - parse certificate to internal form

SYNOPSIS

#include <cat/cat.h>

int catcert_parse(const cat_data *codedcert, cat_cert **cert);

DESCRIPTION

This function parses a DER or base64 certificate to the internal cat_cert representation.

The codedcert argument is the certificate as a cat_data structure, defined as follows:

  typedef struct cat_data {
      int len;
      void *data;
  } cat_data;

The function allocates space for a new cat_cert structure. The caller must free the structure by calling catcert_free()

The input DER/base64 certificate is left intact.

RETURN VALUES

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

SEE ALSO

cat, catcert

catcert_free