2008-01-28 21:37:16 +00:00
|
|
|
/* source: xio-openssl.h */
|
2016-07-22 06:54:31 +00:00
|
|
|
/* Copyright Gerhard Rieger and contributors (see file CHANGES) */
|
2008-01-27 12:00:08 +00:00
|
|
|
/* Published under the GNU General Public License V.2, see file COPYING */
|
|
|
|
|
|
|
|
#ifndef __xio_openssl_included
|
|
|
|
#define __xio_openssl_included 1
|
|
|
|
|
|
|
|
#if WITH_OPENSSL /* make this address configure dependend */
|
|
|
|
|
|
|
|
#define SSLIO_BASE 0x53530000 /* "SSxx" */
|
|
|
|
#define SSLIO_MASK 0xffff0000
|
|
|
|
|
2020-12-30 18:46:42 +00:00
|
|
|
extern const struct addrdesc xioaddr_openssl;
|
|
|
|
extern const struct addrdesc xioaddr_openssl_listen;
|
|
|
|
extern const struct addrdesc xioaddr_openssl_dtls_client;
|
|
|
|
extern const struct addrdesc xioaddr_openssl_dtls_server;
|
2008-01-27 12:00:08 +00:00
|
|
|
|
|
|
|
extern const struct optdesc opt_openssl_cipherlist;
|
|
|
|
extern const struct optdesc opt_openssl_method;
|
2020-12-27 19:25:10 +00:00
|
|
|
extern const struct optdesc opt_openssl_min_proto_version;
|
|
|
|
extern const struct optdesc opt_openssl_max_proto_version;
|
2008-01-27 12:00:08 +00:00
|
|
|
extern const struct optdesc opt_openssl_verify;
|
|
|
|
extern const struct optdesc opt_openssl_certificate;
|
|
|
|
extern const struct optdesc opt_openssl_key;
|
|
|
|
extern const struct optdesc opt_openssl_dhparam;
|
|
|
|
extern const struct optdesc opt_openssl_cafile;
|
|
|
|
extern const struct optdesc opt_openssl_capath;
|
|
|
|
extern const struct optdesc opt_openssl_egd;
|
2023-10-26 14:43:20 +00:00
|
|
|
#if HAVE_SSL_CTX_set_tlsext_max_fragment_length || defined(SSL_CTX_set_tlsext_max_fragment_length)
|
|
|
|
extern const struct optdesc opt_openssl_maxfraglen;
|
|
|
|
#endif
|
|
|
|
#if HAVE_SSL_CTX_set_max_send_fragment || defined(SSL_CTX_set_max_send_fragment)
|
|
|
|
extern const struct optdesc opt_openssl_maxsendfrag;
|
|
|
|
#endif
|
2008-01-27 12:00:08 +00:00
|
|
|
extern const struct optdesc opt_openssl_pseudo;
|
2011-11-26 13:27:02 +00:00
|
|
|
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
|
|
|
|
extern const struct optdesc opt_openssl_compress;
|
|
|
|
#endif
|
2008-01-27 12:00:08 +00:00
|
|
|
#if WITH_FIPS
|
|
|
|
extern const struct optdesc opt_openssl_fips;
|
|
|
|
#endif
|
2015-01-12 22:34:47 +00:00
|
|
|
extern const struct optdesc opt_openssl_commonname;
|
2020-12-31 13:30:04 +00:00
|
|
|
extern const struct optdesc opt_openssl_no_sni;
|
|
|
|
extern const struct optdesc opt_openssl_snihost;
|
2008-01-27 12:00:08 +00:00
|
|
|
|
|
|
|
extern int
|
|
|
|
_xioopen_openssl_prepare(struct opt *opts, struct single *xfd,
|
|
|
|
bool server, bool *opt_ver, const char *opt_cert,
|
2020-12-30 18:46:42 +00:00
|
|
|
SSL_CTX **ctx, bool *use_dtls);
|
2008-01-27 12:00:08 +00:00
|
|
|
extern int
|
|
|
|
_xioopen_openssl_connect(struct single *xfd, bool opt_ver,
|
2015-01-12 22:34:47 +00:00
|
|
|
const char *opt_commonname,
|
2020-12-31 13:30:04 +00:00
|
|
|
bool no_sni, const char *snihost,
|
2008-01-27 12:00:08 +00:00
|
|
|
SSL_CTX *ctx, int level);
|
|
|
|
extern int
|
|
|
|
_xioopen_openssl_listen(struct single *xfd, bool opt_ver,
|
2015-01-12 22:34:47 +00:00
|
|
|
const char *opt_commonname,
|
2008-01-27 12:00:08 +00:00
|
|
|
SSL_CTX *ctx, int level);
|
|
|
|
extern int xioclose_openssl(xiofile_t *xfd);
|
2021-01-10 12:32:27 +00:00
|
|
|
extern int xioshutdown_openssl(struct single *sfd, int how);
|
2008-01-27 12:00:08 +00:00
|
|
|
extern ssize_t xioread_openssl(struct single *file, void *buff, size_t bufsiz);
|
|
|
|
extern ssize_t xiopending_openssl(struct single *pipe);
|
|
|
|
extern ssize_t xiowrite_openssl(struct single *file, const void *buff, size_t bufsiz);
|
|
|
|
|
|
|
|
#if WITH_FIPS
|
|
|
|
extern int xio_reset_fips_mode(void);
|
|
|
|
#endif /* WITH_FIPS */
|
|
|
|
|
|
|
|
#endif /* WITH_OPENSSL */
|
|
|
|
|
|
|
|
#endif /* !defined(__xio_openssl_included) */
|