Sha256: ece41d70f230e6bbbbf2c9d8c1f82bfee68e1d04d81c889485a949a110d6b325

Contents?: true

Size: 1.9 KB

Versions: 136

Compression:

Stored size: 1.9 KB

Contents

/*
 * Copyright (c) 2004-2005 Sergey Lyubka <valenok@gmail.com>
 * All rights reserved
 *
 * "THE BEER-WARE LICENSE" (Revision 42):
 * Sergey Lyubka wrote this file.  As long as you retain this notice you
 * can do whatever you want with this stuff. If we meet some day, and you think
 * this stuff is worth it, you can buy me a beer in return.
 */

/*
 * Snatched from OpenSSL includes. I put the prototypes here to be independent
 * from the OpenSSL source installation. Having this, shttpd + SSL can be
 * built on any system with binary SSL libraries installed.
 */

typedef struct ssl_st SSL;
typedef struct ssl_method_st SSL_METHOD;
typedef struct ssl_ctx_st SSL_CTX;

#define	SSL_ERROR_WANT_READ	2
#define	SSL_ERROR_WANT_WRITE	3
#define SSL_FILETYPE_PEM	1

/*
 * Dynamically loaded SSL functionality
 */
struct ssl_func {
	const char	*name;		/* SSL function name	*/
	union variant	ptr;		/* Function pointer	*/
};

extern struct ssl_func	ssl_sw[];

#define	FUNC(x)	ssl_sw[x].ptr.v_func

#define	SSL_free(x)	(* (void (*)(SSL *)) FUNC(0))(x)
#define	SSL_accept(x)	(* (int (*)(SSL *)) FUNC(1))(x)
#define	SSL_connect(x)	(* (int (*)(SSL *)) FUNC(2))(x)
#define	SSL_read(x,y,z)	(* (int (*)(SSL *, void *, int)) FUNC(3))((x),(y),(z))
#define	SSL_write(x,y,z) \
	(* (int (*)(SSL *, const void *,int)) FUNC(4))((x), (y), (z))
#define	SSL_get_error(x,y)(* (int (*)(SSL *, int)) FUNC(5))((x), (y))
#define	SSL_set_fd(x,y)	(* (int (*)(SSL *, int)) FUNC(6))((x), (y))
#define	SSL_new(x)	(* (SSL * (*)(SSL_CTX *)) FUNC(7))(x)
#define	SSL_CTX_new(x)	(* (SSL_CTX * (*)(SSL_METHOD *)) FUNC(8))(x)
#define	SSLv23_server_method()	(* (SSL_METHOD * (*)(void)) FUNC(9))()
#define	SSL_library_init() (* (int (*)(void)) FUNC(10))()
#define	SSL_CTX_use_PrivateKey_file(x,y,z)	(* (int (*)(SSL_CTX *, \
		const char *, int)) FUNC(11))((x), (y), (z))
#define	SSL_CTX_use_certificate_file(x,y,z)	(* (int (*)(SSL_CTX *, \
		const char *, int)) FUNC(12))((x), (y), (z))

Version data entries

136 entries across 136 versions & 2 rubygems

Version Path
rhodes-7.6.0 platform/shared/shttpd/src/ssl.h
rhodes-7.5.1 platform/shared/shttpd/src/ssl.h
rhodes-7.4.1 platform/shared/shttpd/src/ssl.h
rhodes-7.1.17 platform/shared/shttpd/src/ssl.h
rhodes-6.2.0 platform/shared/shttpd/src/ssl.h
rhodes-6.0.11 platform/shared/shttpd/src/ssl.h
rhodes-5.5.18 platform/shared/shttpd/src/ssl.h
rhodes-5.5.17 platform/shared/shttpd/src/ssl.h
rhodes-5.5.15 platform/shared/shttpd/src/ssl.h
rhodes-5.5.0.22 platform/shared/shttpd/src/ssl.h
rhodes-5.5.2 platform/shared/shttpd/src/ssl.h
rhodes-5.5.0.7 platform/shared/shttpd/src/ssl.h
rhodes-5.5.0.3 platform/shared/shttpd/src/ssl.h
rhodes-5.5.0 platform/shared/shttpd/src/ssl.h
tauplatform-1.0.3 platform/shared/shttpd/src/ssl.h
tauplatform-1.0.2 platform/shared/shttpd/src/ssl.h
tauplatform-1.0.1 platform/shared/shttpd/src/ssl.h
rhodes-3.5.1.12 platform/shared/shttpd/src/ssl.h
rhodes-3.3.5 platform/shared/shttpd/src/ssl.h
rhodes-3.4.2 platform/shared/shttpd/src/ssl.h