2 * Copyright (c) 2018 Intel 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:
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 #include <openssl/ssl.h>
17 #include <openssl/conf.h>
18 #include <openssl/err.h>
19 #include <openssl/engine.h>
20 #include <vnet/plugin/plugin.h>
21 #include <vpp/app/version.h>
22 #include <vnet/tls/tls.h>
24 typedef struct tls_ctx_openssl_
26 tls_ctx_t ctx; /**< First */
27 u32 openssl_ctx_index;
34 typedef struct tls_listen_ctx_opensl_
36 u32 openssl_lctx_index;
41 } openssl_listen_ctx_t;
43 typedef struct openssl_main_
45 openssl_ctx_t ***ctx_pool;
46 openssl_listen_ctx_t *lctx_pool;
48 X509_STORE *cert_store;
54 typedef struct openssl_tls_callback_
56 int (*callback) (SSL * ssl, void *arg);
58 } openssl_tls_callback_t;
60 typedef int openssl_resume_handler (tls_ctx_t * ctx,
61 stream_session_t * tls_session);
63 tls_ctx_t *openssl_ctx_get_w_thread (u32 ctx_index, u8 thread_index);
64 openssl_tls_callback_t *vpp_add_async_pending_event (tls_ctx_t * ctx,
65 openssl_resume_handler *
67 int vpp_add_async_run_event (tls_ctx_t * ctx, openssl_resume_handler *
69 int tls_async_openssl_callback (SSL * s, void *evt);
70 void openssl_polling_start (ENGINE * engine);
71 int openssl_engine_register (char *engine, char *alg);
72 void openssl_async_node_enable_disable (u8 is_en);
75 * fd.io coding-style-patch-verification: ON
78 * eval: (c-set-style "gnu")