Defines | Functions

certificates.c File Reference

eurephiadm certs command, for managing the eurephia certificates. More...

#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
#include <assert.h>
#include <libxml/tree.h>
#include <libxml/xpath.h>
#include <eurephia_nullsafe.h>
#include <eurephia_context.h>
#include <eurephia_log.h>
#include <eurephia_xml.h>
#include <eurephia_values_struct.h>
#include <eurephiadb_session_struct.h>
#include <eurephiadb_mapping.h>
#include <eurephiadb_driver.h>
#include <certinfo.h>
#include "../argparser.h"
#include "../get_console_input.h"
#include "../parse_certificate_files.h"
#include "../xsltparser.h"
Include dependency graph for certificates.c:

Go to the source code of this file.

Defines

#define MODULE   "eurephia::Certificates"

Functions

void display_certs_help (int page)
void help_Certificates ()
int help_Certificates2 (eurephiaCTX *ctx, eurephiaSESSION *sess, eurephiaVALUES *cfg, int argc, char **argv)
int register_certificate (eurephiaCTX *ctx, int depth, const char *digest, const char *cname, const char *org, const char *email)
int add_cert (eurephiaCTX *ctx, eurephiaSESSION *sess, eurephiaVALUES *cfg, int argc, char **argv)
int delete_cert (eurephiaCTX *ctx, eurephiaSESSION *sess, eurephiaVALUES *cfg, int argc, char **argv)
int list_certs (eurephiaCTX *ctx, eurephiaSESSION *sess, eurephiaVALUES *cfg, int argc, char **argv)
int cmd_Certificates (eurephiaCTX *ctx, eurephiaSESSION *sess, eurephiaVALUES *cfg, int argc, char **argv)

Detailed Description

eurephiadm certs command, for managing the eurephia certificates.

Author:
David Sommerseth <dazo@users.sourceforge.net>
Date:
2008-12-20

Definition in file certificates.c.


Define Documentation

#define MODULE   "eurephia::Certificates"

Need to define the active module before including argparser.h

Definition at line 47 of file certificates.c.


Function Documentation

int add_cert ( eurephiaCTX ctx,
eurephiaSESSION sess,
eurephiaVALUES cfg,
int  argc,
char **  argv 
)

certs add mode. Registers a new certificate.

Parameters:
ctx eurephiaCTX
sess eurephiaSESSION of the current logged in user
cfg eurephiaVALUES struct of the current configuration
argc argument count for the eurephiadm command
argv argument table for the eurephiadm command
Returns:
returns 0 on success, otherwise 1.

Definition at line 241 of file certificates.c.

Here is the call graph for this function:

int cmd_Certificates ( eurephiaCTX ctx,
eurephiaSESSION sess,
eurephiaVALUES cfg,
int  argc,
char **  argv 
)

Main function of the certs command.

Parameters:
ctx eurephiaCTX
sess eurephiaSESSION of the current logged in user
cfg eurephiaVALUES struct of the current configuration
argc argument count for the eurephiadm command
argv argument table for the eurephiadm command
Returns:
returns 0 on success, otherwise 1.

Definition at line 630 of file certificates.c.

Here is the call graph for this function:

int delete_cert ( eurephiaCTX ctx,
eurephiaSESSION sess,
eurephiaVALUES cfg,
int  argc,
char **  argv 
)

certs delete mode. Removes a registered certificate from the eurephia database.

Parameters:
ctx eurephiaCTX
sess eurephiaSESSION of the current logged in user
cfg eurephiaVALUES struct of the current configuration
argc argument count for the eurephiadm command
argv argument table for the eurephiadm command
Returns:
returns 0 on success, otherwise 1.

Definition at line 396 of file certificates.c.

Here is the call graph for this function:

void display_certs_help ( int  page  ) 

Help screens for the certs command

Parameters:
page which help screen to display

Definition at line 69 of file certificates.c.

Here is the caller graph for this function:

void help_Certificates (  ) 

Help screen wrapper. Used by cmd_Help()

Definition at line 126 of file certificates.c.

Here is the call graph for this function:

int help_Certificates2 ( eurephiaCTX ctx,
eurephiaSESSION sess,
eurephiaVALUES cfg,
int  argc,
char **  argv 
)

Help screen wrapper for the certs help function.

Parameters:
ctx eurephiaCTX
sess eurephiaSESSION of the current logged in user
cfg eurephiaVALUES struct of the current configuration
argc argument count for the eurephiadm command
argv argument table for the eurephiadm command
Returns:
returns 0 on success, otherwise 1.

Definition at line 142 of file certificates.c.

Here is the call graph for this function:

int list_certs ( eurephiaCTX ctx,
eurephiaSESSION sess,
eurephiaVALUES cfg,
int  argc,
char **  argv 
)

certs list mode. Lists all registered certificate.

Parameters:
ctx eurephiaCTX
sess eurephiaSESSION of the current logged in user
cfg eurephiaVALUES struct of the current configuration
argc argument count for the eurephiadm command
argv argument table for the eurephiadm command
Returns:
returns 0 on success, otherwise 1.

Definition at line 551 of file certificates.c.

Here is the call graph for this function:

int register_certificate ( eurephiaCTX ctx,
int  depth,
const char *  digest,
const char *  cname,
const char *  org,
const char *  email 
)

Internal certs command, does the proper register request against the eurephia database.

Parameters:
ctx eurephiaCTX
depth Certificate depth of the certificate
digest Certificate SHA1 fingerprint (digest)
cname X.509 Common Name value of the certificate
org X.509 Organisation value of the certificate
email X.509 emailAddress value of the certificate
Returns:
Returns the certid reference to the certificate on successful registration, otherwise 0.

Definition at line 167 of file certificates.c.

Here is the call graph for this function:

Here is the caller graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines