2 * libwebsockets - small server side websockets and web server implementation
4 * Copyright (C) 2010 - 2019 Andy Green <andy@warmcat.com>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation:
9 * version 2.1 of the License.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21 * gencrypto openssl-specific helper declarations
25 * one of these per different client context
26 * cc_owner is in lws_context.lws_context_tls
29 struct lws_tls_client_reuse {
30 lws_tls_ctx *ssl_client_ctx;
32 struct lws_dll2 cc_list;
37 typedef int (*next_proto_cb)(SSL *, const unsigned char **out,
38 unsigned char *outlen, const unsigned char *in,
39 unsigned int inlen, void *arg);
41 struct lws_x509_cert {
42 X509 *cert; /* X509 is opaque, this has to be a pointer */
46 lws_gencrypto_openssl_hash_to_NID(enum lws_genhash_types hash_type);
49 lws_gencrypto_openssl_hash_to_EVP_MD(enum lws_genhash_types hash_type);
51 #if !defined(LWS_HAVE_BN_bn2binpad)
52 int BN_bn2binpad(const BIGNUM *a, unsigned char *to, int tolen);