📄 process_request_defines.h
字号:
#ifndef _PROCESS_REQUEST_DEFINES_H_#define _PROCESS_REQUEST_DEFINES_H_#include "process_request.h"#ifdef __cplusplusextern "C" {#endif#define pc_malloc(size, pctx)\ (pctx)->allocator->malloc_fn((size), (pctx)->allocator->mctx)#define pc_free(ptr, pctx)\ (pctx)->allocator->free_fn((ptr), (pctx)->allocator->fctx) #define pc_log_error(pctx, error_msg, level) \ (pctx)->logger_fn((error_msg), (level), (pctx)->logger_cb_ctx)struct allocator { /*void *(*malloc_fn)(size_t size, void *cb_ctx);*/ malloc_cb_t malloc_fn; void *mctx; free_cb_t free_fn; void *fctx;};struct process_context { allocator_t *allocator; void *header_container; set_header_cb_t set_header_fn; void *set_header_cb_ctx; logger_cb_t logger_fn; void *logger_cb_ctx; char *key_file; char *ca_file; char **white_list; /*internal use only*/ xmlXPathContext *xpath_ctx;};#define ENC_PFX "enc"#define ENC_HREF "http://www.w3.org/2001/04/xmlenc#"#define ENCRYPTED_DATA "EncryptedData"#define SAML_PFX "saml" /*??*/#define SAML_HREF "urn:oasis:names:tc:SAML:1.0:assertion"#define DSIG_PFX "dsig" /*??*/#define DSIG_HREF "http://www.w3.org/2000/09/xmldsig#"#define MAJOR_VERSION "MajorVersion"#define MINOR_VERSION "MinorVersion"#define ASSERTION "Assertion"#define ASSERTION_ID "AssertionID"#define ISSUER "Issuer"#define ISSUER_SELF "http://schemas.xmlsoap.org/ws/2005/05/identity/issuer/self"#define ISSUE_INSTANT "IssueInstant"#define CONDITIONS "Conditions"#define NOT_BEFORE "NotBefore"#define NOT_ON_OR_AFTER "NotOnOrAfter" #define AUDIENCE_RESTRICTION_CONDITION "AudienceRestrictionCondition"#define AUDIENCE "Audience"#define ATTRIBUTE_STATEMENT "AttributeStatement"#define SUBJECT "Subject"#define SUBJECT_CONFIRMATION "SubjectConfirmation"#define CONFIRMATION_METHOD "ConfirmationMethod"#define ATTRIBUTE "Attribute"#define ATTRIBUTE_NAME "AttributeName"#define ATTRIBUTE_NAMESPACE "AttributeNamespace"#define ATTRIBUTE_VALUE "AttributeValue"#define SIGNATURE "Signature"#define SIGNED_INFO "SignedInfo"#define CANONICALIZATION_METHOD "CanonicalizationMethod"#define SIGNATURE_METHOD "SignatureMethod"#define REFERENCE "Reference"#define TRANSFORMS "Transforms"#define TRANSFORM "Transform"#define DIGEST_METHOD "DigestMethod"#define DIGEST_VALUE "DigestValue"#define SIGNATURE_VALUE "SignatureValue"#define KEY_INFO "KeyInfo"#define KEY_VALUE "KeyValue"#define RSA_KEY_VALUE "RSAKeyValue"#define MODULUS "Modulus"#define EXPONENT "Exponent"#define X509_DATA "X509Data"#define X509_CERT "X509Certificate"static int cspace_strlen(const char *str) { int len = 0; while (*str) { ++len; ++str; } return len;}static char* cspace_strcpy(char *to, const char *from){ char *tmp = to; while ((*to = *from) != '\0') { ++from; ++to; } return tmp;}static char* cspace_strdup(const char *str, const struct allocator *alloc){ char *dup = (char *)(*(alloc->malloc_fn))(cspace_strlen(str) + 1, alloc->mctx); cspace_strcpy(dup, str); return dup;}#ifdef __cplusplus}#endif#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -