Functions for working with the openvpn_usercerts table. More...
#include <string.h>#include <unistd.h>#include <assert.h>#include <libxml/tree.h>#include <sqlite3.h>#include <eurephia_nullsafe.h>#include <eurephia_context.h>#include <eurephia_log.h>#include <eurephia_xml.h>#include <eurephia_values.h>#include <eurephiadb_session_struct.h>#include <eurephiadb_mapping.h>#include "../sqlite.h"#include "../fieldmapping.h"
Include dependency graph for usercerts.c:Go to the source code of this file.
Functions | |
| xmlDoc * | usercerts_search (eurephiaCTX *ctx, eDBfieldMap *where_m, const char *sortkeys) |
| xmlDoc * | usercerts_add_del (eurephiaCTX *ctx, const char *mode, eDBfieldMap *usrcrt_m) |
| xmlDoc * | usercerts_update (eurephiaCTX *ctx, const char *uicid, eDBfieldMap *usrcrt_m) |
| xmlDoc * | eDBadminUserCertsLink (eurephiaCTX *ctx, xmlDoc *usrcrt_xml) |
Functions for working with the openvpn_usercerts table.
Definition in file usercerts.c.
| xmlDoc* eDBadminUserCertsLink | ( | eurephiaCTX * | ctx, | |
| xmlDoc * | usrcrt_xml | |||
| ) |
Retrieve, add, modify or delete user/certificate links
| ctx | eurephiaCTX | |
| usrcrt_xml | XML document containing operation information |
Skeleton of needed XML document
<eurephia format="1"> <usercerts mode="{search|register|remove|update}" [uicid="{uicid}"]> <fieldMapping table="usercerts"> <{field name}>{search value}</{field name}> </fieldMapping> [<sortfields>{field name}[, {field name},...]</sortfields>] <!-- Only for mode='search' --> </usercerts </eurephia>
In search mode, it can be several field name tags to narrow the search. If mode is 'update' the 'uicid' attribute must be present in the usercerts tag.
< Messages intended when debugging. Only for log level > 10
< The context is used via the eurephiadm console utility
< The context is used via a web based utility
< Alias for LOG_CRITICAL
< Operation failed and might have been aborted. Log level always 0
< Alias for LOG_ERROR, in case it is not defined
< API errors but not sever, program can continue to run
< Alias for LOG_ERROR, in case it is not defined
< API errors but not sever, program can continue to run
< Alias for LOG_ERROR, in case it is not defined
< API errors but not sever, program can continue to run
< Alias for LOG_ERROR, in case it is not defined
< API errors but not sever, program can continue to run
Definition at line 249 of file usercerts.c.
Here is the call graph for this function:| xmlDoc* usercerts_add_del | ( | eurephiaCTX * | ctx, | |
| const char * | mode, | |||
| eDBfieldMap * | usrcrt_m | |||
| ) |
Internal function. Adds or deletes a user-certificate link
| ctx | eurephiaCTX | |
| mode | String containing the operation mode. Must be "register" or "remove" | |
| usrcrt_m | eDBfieldMap containing information about the link to add or remove |
< Messages intended when debugging. Only for log level > 10
< Alias for LOG_ERROR, in case it is not defined
< API errors but not sever, program can continue to run
Definition at line 147 of file usercerts.c.
Here is the call graph for this function:
Here is the caller graph for this function:| xmlDoc* usercerts_search | ( | eurephiaCTX * | ctx, | |
| eDBfieldMap * | where_m, | |||
| const char * | sortkeys | |||
| ) |
Internal function. Queries the database for a list of user-certificate links
| ctx | eurephiaCTX | |
| where_m | eDBfieldMap containing the search criteria | |
| sortkeys | String containing the sort order of the data |
< Messages intended when debugging. Only for log level > 10
< The context is used via the eurephiadm console utility
< The context is used via a web based utility
< Alias for LOG_CRITICAL
< Operation failed and might have been aborted. Log level always 0
< Alias for LOG_ERROR, in case it is not defined
< API errors but not sever, program can continue to run
Definition at line 62 of file usercerts.c.
Here is the call graph for this function:
Here is the caller graph for this function:| xmlDoc* usercerts_update | ( | eurephiaCTX * | ctx, | |
| const char * | uicid, | |||
| eDBfieldMap * | usrcrt_m | |||
| ) |
Internal function. Updates a user-certs link in the database
| ctx | eurephiaCTX | |
| uicid | String containing the numeric record ID (uicid field) of the record to be updated | |
| usrcrt_m | eDBfieldMap containing the new information for the record. Only the fields being changed needs to be set. |
< Messages intended when debugging. Only for log level > 10
< Alias for LOG_ERROR, in case it is not defined
< API errors but not sever, program can continue to run
Definition at line 199 of file usercerts.c.
Here is the call graph for this function:
Here is the caller graph for this function:
1.7.1