ikev2: add support for custom ipsec-over-udp port
[vpp.git] / src / plugins / quic / certs.h
1 /*
2  * Copyright (c) 2019 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15
16 #ifndef __included_quic_certs_h__
17 #define __included_quic_certs_h__
18
19
20 #include <picotls/openssl.h>
21 #include <picotls/pembase64.h>
22
23 int ptls_compare_separator_line (const char *line, const char *begin_or_end,
24                                  const char *label);
25
26 int ptls_get_bio_pem_object (BIO * bio, const char *label,
27                              ptls_buffer_t * buf);
28
29 int ptls_load_bio_pem_objects (BIO * bio, const char *label,
30                                ptls_iovec_t * list, size_t list_max,
31                                size_t * nb_objects);
32
33 int ptls_load_bio_certificates (ptls_context_t * ctx, BIO * bio);
34
35 int load_bio_certificate_chain (ptls_context_t * ctx, const char *cert_data);
36
37 int load_bio_private_key (ptls_context_t * ctx, const char *pk_data);
38
39
40 #endif /* __included_quic_certs_h__ */
41
42 /*
43  * fd.io coding-style-patch-verification: ON
44  *
45  * Local Variables:
46  * eval: (c-set-style "gnu")
47  * End:
48  */