pacemaker  2.1.9-49aab99839
Scalable High-Availability cluster resource manager
Macros | Functions
digest.c File Reference
#include <crm_internal.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <md5.h>
#include <crm/crm.h>
#include <crm/common/xml.h>
#include "crmcommon_private.h"
Include dependency graph for digest.c:

Go to the source code of this file.

Macros

#define BEST_EFFORT_STATUS   0
 

Functions

char * calculate_on_disk_digest (xmlNode *input)
 Calculate and return digest of XML tree, suitable for storing on disk. More...
 
char * calculate_operation_digest (xmlNode *input, const char *version)
 Calculate and return digest of XML operation. More...
 
char * calculate_xml_versioned_digest (xmlNode *input, gboolean sort, gboolean do_filter, const char *version)
 Calculate and return digest of XML tree. More...
 
bool pcmk__verify_digest (xmlNode *input, const char *expected)
 
bool pcmk__xa_filterable (const char *name)
 
char * crm_md5sum (const char *buffer)
 
void pcmk__filter_op_for_digest (xmlNode *param_set)
 

Macro Definition Documentation

◆ BEST_EFFORT_STATUS

#define BEST_EFFORT_STATUS   0

Definition at line 22 of file digest.c.

Function Documentation

◆ calculate_on_disk_digest()

char* calculate_on_disk_digest ( xmlNode *  input)

Calculate and return digest of XML tree, suitable for storing on disk.

Parameters
[in]inputRoot of XML to digest
Returns
Newly allocated string containing digest

Definition at line 129 of file digest.c.

◆ calculate_operation_digest()

char* calculate_operation_digest ( xmlNode *  input,
const char *  version 
)

Calculate and return digest of XML operation.

Parameters
[in]inputRoot of XML to digest
[in]versionUnused
Returns
Newly allocated string containing digest

Definition at line 148 of file digest.c.

◆ calculate_xml_versioned_digest()

char* calculate_xml_versioned_digest ( xmlNode *  input,
gboolean  sort,
gboolean  do_filter,
const char *  version 
)

Calculate and return digest of XML tree.

Parameters
[in]inputRoot of XML to digest
[in]sortWhether to sort XML before calculating digest
[in]do_filterWhether to filter certain XML attributes
[in]versionCRM feature set version (used to select v1/v2 digest)
Returns
Newly allocated string containing digest

Definition at line 165 of file digest.c.

◆ crm_md5sum()

char* crm_md5sum ( const char *  buffer)

Definition at line 251 of file digest.c.

◆ pcmk__filter_op_for_digest()

void pcmk__filter_op_for_digest ( xmlNode *  param_set)

Definition at line 303 of file digest.c.

◆ pcmk__verify_digest()

bool pcmk__verify_digest ( xmlNode *  input,
const char *  expected 
)

Definition at line 200 of file digest.c.

◆ pcmk__xa_filterable()

bool pcmk__xa_filterable ( const char *  name)

Definition at line 232 of file digest.c.