William Lallemand | 6e9556b | 2020-05-12 17:52:44 +0200 | [diff] [blame] | 1 | /* |
| 2 | * include/proto/ssl_crtlist.h |
| 3 | * crt-list function prototyes |
| 4 | * |
| 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 | |
| 22 | #ifndef _PROTO_SSL_CRTLIST_H |
| 23 | #define _PROTO_SSL_CRTLIST_H |
| 24 | #ifdef USE_OPENSSL |
| 25 | |
| 26 | #include <types/ssl_crtlist.h> |
| 27 | |
| 28 | |
| 29 | /* crt-list entry functions */ |
| 30 | void ssl_sock_free_ssl_conf(struct ssl_bind_conf *conf); |
| 31 | char **crtlist_dup_filters(char **args, int fcount); |
| 32 | void crtlist_free_filters(char **args); |
| 33 | void crtlist_entry_free(struct crtlist_entry *entry); |
| 34 | struct crtlist_entry *crtlist_entry_new(); |
| 35 | |
| 36 | /* crt-list functions */ |
| 37 | void crtlist_free(struct crtlist *crtlist); |
| 38 | struct crtlist *crtlist_new(const char *filename, int unique); |
| 39 | |
| 40 | /* file loading */ |
| 41 | int crtlist_parse_line(char *line, char **crt_path, struct crtlist_entry *entry, const char *file, int linenum, char **err); |
| 42 | int crtlist_parse_file(char *file, struct bind_conf *bind_conf, struct proxy *curproxy, struct crtlist **crtlist, char **err); |
| 43 | int crtlist_load_cert_dir(char *path, struct bind_conf *bind_conf, struct crtlist **crtlist, char **err); |
| 44 | #endif /* USE_OPENSSL */ |
| 45 | #endif /* _PROTO_SSL_CRTLIST_H */ |