25 #ifndef _SSS_CERTMAP_H_ 26 #define _SSS_CERTMAP_H_ 31 #include <sys/types.h> 45 struct sss_certmap_ctx;
50 #define SSS_CERTMAP_MIN_PRIO UINT32_MAX 56 const char *file,
long line,
58 const char *format, ...);
74 struct sss_certmap_ctx **ctx);
101 uint32_t priority,
const char *match_rule,
102 const char *map_rule,
const char **domains);
118 const uint8_t *der_cert,
size_t der_size);
139 const uint8_t *der_cert,
size_t der_size,
140 char **filter,
char ***domains);
int sss_certmap_add_rule(struct sss_certmap_ctx *ctx, uint32_t priority, const char *match_rule, const char *map_rule, const char **domains)
Add a rule to the certmap context.
int sss_certmap_init(TALLOC_CTX *mem_ctx, sss_certmap_ext_debug *debug, void *debug_priv, struct sss_certmap_ctx **ctx)
Initialize certmap context.
int sss_certmap_get_search_filter(struct sss_certmap_ctx *ctx, const uint8_t *der_cert, size_t der_size, char **filter, char ***domains)
Get the LDAP filter string for a certificate.
void() sss_certmap_ext_debug(void *pvt, const char *file, long line, const char *function, const char *format,...)
Definition: sss_certmap.h:55
void sss_certmap_free_ctx(struct sss_certmap_ctx *ctx)
Free certmap context.
void sss_certmap_free_filter_and_domains(char *filter, char **domains)
Free data returned by sss_certmap_get_search_filter.
int sss_certmap_match_cert(struct sss_certmap_ctx *ctx, const uint8_t *der_cert, size_t der_size)
Check if a certificate matches any of the applied rules.