add listen-timeout to function as an accept timeout
[socat/sam.git] / xio-openssl.h
blobf3a0a583c6bb5714e5e6cf2f11b6ba5ac7ded93f
1 /* source: xio-openssl.h */
2 /* Copyright Gerhard Rieger 2002-2007 */
3 /* Published under the GNU General Public License V.2, see file COPYING */
5 #ifndef __xio_openssl_included
6 #define __xio_openssl_included 1
8 #if WITH_OPENSSL /* make this address configure dependend */
10 #define SSLIO_BASE 0x53530000 /* "SSxx" */
11 #define SSLIO_MASK 0xffff0000
13 extern const struct addrdesc addr_openssl;
14 extern const struct addrdesc addr_openssl_listen;
16 extern const struct optdesc opt_openssl_cipherlist;
17 extern const struct optdesc opt_openssl_method;
18 extern const struct optdesc opt_openssl_verify;
19 extern const struct optdesc opt_openssl_certificate;
20 extern const struct optdesc opt_openssl_key;
21 extern const struct optdesc opt_openssl_dhparam;
22 extern const struct optdesc opt_openssl_cafile;
23 extern const struct optdesc opt_openssl_capath;
24 extern const struct optdesc opt_openssl_egd;
25 extern const struct optdesc opt_openssl_pseudo;
26 #if WITH_FIPS
27 extern const struct optdesc opt_openssl_fips;
28 #endif
30 extern int
31 _xioopen_openssl_prepare(struct opt *opts, struct single *xfd,
32 bool server, bool *opt_ver, const char *opt_cert,
33 SSL_CTX **ctx);
34 extern int
35 _xioopen_openssl_connect(struct single *xfd, bool opt_ver,
36 SSL_CTX *ctx, int level);
37 extern int
38 _xioopen_openssl_listen(struct single *xfd, bool opt_ver,
39 SSL_CTX *ctx, int level);
40 extern int xioclose_openssl(xiofile_t *xfd);
41 extern int xioshutdown_openssl(xiofile_t *xfd, int how);
42 extern ssize_t xioread_openssl(struct single *file, void *buff, size_t bufsiz);
43 extern ssize_t xiopending_openssl(struct single *pipe);
44 extern ssize_t xiowrite_openssl(struct single *file, const void *buff, size_t bufsiz);
46 #if WITH_FIPS
47 extern int xio_reset_fips_mode(void);
48 #endif /* WITH_FIPS */
50 #endif /* WITH_OPENSSL */
52 #endif /* !defined(__xio_openssl_included) */