x509.h

Name

x509.h -- The X509 certificates functions.

Synopsis



xmlSecX509DataPtr xmlSecX509DataCreate      (void);
void        xmlSecX509DataDestroy           (xmlSecX509DataPtr x509Data);
size_t      xmlSecX509DataGetCertsNumber    (xmlSecX509DataPtr x509Data);
size_t      xmlSecX509DataGetCrlsNumber     (xmlSecX509DataPtr x509Data);
int         xmlSecX509DataReadDerCert       (xmlSecX509DataPtr x509Data,
                                             xmlChar *buf,
                                             size_t size,
                                             int base64);
xmlChar*    xmlSecX509DataWriteDerCert      (xmlSecX509DataPtr x509Data,
                                             int pos);
int         xmlSecX509DataReadDerCrl        (xmlSecX509DataPtr x509Data,
                                             xmlChar *buf,
                                             size_t size,
                                             int base64);
xmlChar*    xmlSecX509DataWriteDerCrl       (xmlSecX509DataPtr x509Data,
                                             int pos);
int         xmlSecX509DataReadPemCert       (xmlSecX509DataPtr x509Data,
                                             const char *filename);
xmlSecX509DataPtr xmlSecX509DataDup         (xmlSecX509DataPtr x509Data);
xmlSecKeyPtr xmlSecX509DataCreateKey        (xmlSecX509DataPtr x509Data);
void        xmlSecX509DataDebugDump         (xmlSecX509DataPtr x509Data,
                                             FILE *output);
xmlSecX509StorePtr xmlSecX509StoreCreate    (void);
void        xmlSecX509StoreDestroy          (xmlSecX509StorePtr store);
xmlSecX509DataPtr xmlSecX509StoreFind       (xmlSecX509StorePtr store,
                                             xmlChar *subjectName,
                                             xmlChar *issuerName,
                                             xmlChar *issuerSerial,
                                             xmlChar *ski,
                                             xmlSecX509DataPtr x509Data);
int         xmlSecX509StoreVerify           (xmlSecX509StorePtr store,
                                             xmlSecX509DataPtr x509Data);
int         xmlSecX509StoreLoadPemCert      (xmlSecX509StorePtr store,
                                             const char *filename,
                                             int trusted);
int         xmlSecX509StoreAddCertsDir      (xmlSecX509StorePtr store,
                                             const char *path);
xmlSecKeyPtr xmlSecPKCS12ReadKey            (const char *filename,
                                             const char *pwd);

Description

Details

xmlSecX509DataCreate ()

xmlSecX509DataPtr xmlSecX509DataCreate      (void);

Creates new x509 data.


xmlSecX509DataDestroy ()

void        xmlSecX509DataDestroy           (xmlSecX509DataPtr x509Data);

Destroys x509 data.


xmlSecX509DataGetCertsNumber ()

size_t      xmlSecX509DataGetCertsNumber    (xmlSecX509DataPtr x509Data);

Gets the number of certs in x509Data.


xmlSecX509DataGetCrlsNumber ()

size_t      xmlSecX509DataGetCrlsNumber     (xmlSecX509DataPtr x509Data);

Gets the number of crls in x509Data.


xmlSecX509DataReadDerCert ()

int         xmlSecX509DataReadDerCert       (xmlSecX509DataPtr x509Data,
                                             xmlChar *buf,
                                             size_t size,
                                             int base64);

Reads certificates the from a DER binary data in buf.


xmlSecX509DataWriteDerCert ()

xmlChar*    xmlSecX509DataWriteDerCert      (xmlSecX509DataPtr x509Data,
                                             int pos);

Writes pos certificate from x509Data into allocated buffer in DER + base64 encode format. The caller is responsible for freeing the returned buffer using xmlFree() function.


xmlSecX509DataReadDerCrl ()

int         xmlSecX509DataReadDerCrl        (xmlSecX509DataPtr x509Data,
                                             xmlChar *buf,
                                             size_t size,
                                             int base64);

Reads crls the from a DER binary data in buf.


xmlSecX509DataWriteDerCrl ()

xmlChar*    xmlSecX509DataWriteDerCrl       (xmlSecX509DataPtr x509Data,
                                             int pos);

Writes pos crl from x509Data into allocated buffer in DER + base64 encode format. The caller is responsible for freeing the returned buffer using xmlFree() function.


xmlSecX509DataReadPemCert ()

int         xmlSecX509DataReadPemCert       (xmlSecX509DataPtr x509Data,
                                             const char *filename);

Reads cert from PEM file filename into x509Data.


xmlSecX509DataDup ()

xmlSecX509DataPtr xmlSecX509DataDup         (xmlSecX509DataPtr x509Data);

Duplicates the x509Data structure.


xmlSecX509DataCreateKey ()

xmlSecKeyPtr xmlSecX509DataCreateKey        (xmlSecX509DataPtr x509Data);

Creates the key from x509Data.


xmlSecX509DataDebugDump ()

void        xmlSecX509DataDebugDump         (xmlSecX509DataPtr x509Data,
                                             FILE *output);

Prints the information about x509Data to output.


xmlSecX509StoreCreate ()

xmlSecX509StorePtr xmlSecX509StoreCreate    (void);

Creates new x509 store.


xmlSecX509StoreDestroy ()

void        xmlSecX509StoreDestroy          (xmlSecX509StorePtr store);

Destroys the xmlSecX509Store structure.


xmlSecX509StoreFind ()

xmlSecX509DataPtr xmlSecX509StoreFind       (xmlSecX509StorePtr store,
                                             xmlChar *subjectName,
                                             xmlChar *issuerName,
                                             xmlChar *issuerSerial,
                                             xmlChar *ski,
                                             xmlSecX509DataPtr x509Data);

Searches for matching certificate in the keys manager.


xmlSecX509StoreVerify ()

int         xmlSecX509StoreVerify           (xmlSecX509StorePtr store,
                                             xmlSecX509DataPtr x509Data);

Verifies the cert(s) from x509Data against store.


xmlSecX509StoreLoadPemCert ()

int         xmlSecX509StoreLoadPemCert      (xmlSecX509StorePtr store,
                                             const char *filename,
                                             int trusted);

Reads cert from PEM filename and adds to the list of trusted or known untrusted certs in store.


xmlSecX509StoreAddCertsDir ()

int         xmlSecX509StoreAddCertsDir      (xmlSecX509StorePtr store,
                                             const char *path);

Adds all certs in the path to the list of trusted certs in store.


xmlSecPKCS12ReadKey ()

xmlSecKeyPtr xmlSecPKCS12ReadKey            (const char *filename,
                                             const char *pwd);

Reads the key from pkcs12 file filename.