blob: 13ac702367e26c92b891f6d5fa9588551dc0d42f [file] [log] [blame]
William Lallemand6e9556b2020-05-12 17:52:44 +02001/*
Willy Tarreau52d88722020-06-04 14:29:23 +02002 * include/haproxy/ssl_crtlist.h
Ilya Shipitsin47d17182020-06-21 21:42:57 +05003 * crt-list function prototypes
William Lallemand6e9556b2020-05-12 17:52:44 +02004 *
5 * Copyright (C) 2020 HAProxy Technologies, William Lallemand <wlallemand@haproxy.com>
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation, version 2.1
10 * exclusively.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
Willy Tarreau52d88722020-06-04 14:29:23 +020022#ifndef _HAPROXY_SSL_CRTLIST_H
23#define _HAPROXY_SSL_CRTLIST_H
William Lallemand6e9556b2020-05-12 17:52:44 +020024#ifdef USE_OPENSSL
25
Willy Tarreau52d88722020-06-04 14:29:23 +020026#include <haproxy/ssl_crtlist-t.h>
William Lallemand6e9556b2020-05-12 17:52:44 +020027
28
29/* crt-list entry functions */
30void ssl_sock_free_ssl_conf(struct ssl_bind_conf *conf);
31char **crtlist_dup_filters(char **args, int fcount);
32void crtlist_free_filters(char **args);
33void crtlist_entry_free(struct crtlist_entry *entry);
34struct crtlist_entry *crtlist_entry_new();
35
36/* crt-list functions */
37void crtlist_free(struct crtlist *crtlist);
38struct crtlist *crtlist_new(const char *filename, int unique);
39
40/* file loading */
41int crtlist_parse_line(char *line, char **crt_path, struct crtlist_entry *entry, const char *file, int linenum, char **err);
42int crtlist_parse_file(char *file, struct bind_conf *bind_conf, struct proxy *curproxy, struct crtlist **crtlist, char **err);
43int crtlist_load_cert_dir(char *path, struct bind_conf *bind_conf, struct crtlist **crtlist, char **err);
William Lallemandee8530c2020-06-23 18:19:42 +020044
45void crtlist_deinit();
46
William Lallemand6e9556b2020-05-12 17:52:44 +020047#endif /* USE_OPENSSL */
Willy Tarreau52d88722020-06-04 14:29:23 +020048#endif /* _HAPROXY_SSL_CRTLIST_H */