X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=demos%2Feasy_tls%2Feasy-tls.h;h=1c587b861c5cd2a250d44ee9ee28e9b20d1b147b;hp=71ed87aeac2917fe8a67dafc2f5b2e4cf8eb001c;hb=ae5c8664e587f2445c8e4eb436cffbb64af4f6b8;hpb=aae3233e1e08e9f11742f8f351af5c98cd8add16 diff --git a/demos/easy_tls/easy-tls.h b/demos/easy_tls/easy-tls.h index 71ed87aeac..1c587b861c 100644 --- a/demos/easy_tls/easy-tls.h +++ b/demos/easy_tls/easy-tls.h @@ -8,26 +8,26 @@ */ #ifndef HEADER_TLS_H -#define HEADER_TLS_H +# define HEADER_TLS_H -#ifndef HEADER_SSL_H +# ifndef HEADER_SSL_H typedef struct ssl_ctx_st SSL_CTX; -#endif +# endif -#define TLS_INFO_SIZE 512 /* max. # of bytes written to infofd */ +# define TLS_INFO_SIZE 512 /* max. # of bytes written to infofd */ -void tls_set_dhe1024(int i, void* apparg); -/* Generate DHE parameters: - * i >= 0 deterministic (i selects seed), i < 0 random (may take a while). - * tls_create_ctx calls this with random non-negative i if the application - * has never called it.*/ +void tls_set_dhe1024(int i, void *apparg); +/* + * Generate DHE parameters: i >= 0 deterministic (i selects seed), i < 0 + * random (may take a while). tls_create_ctx calls this with random + * non-negative i if the application has never called it. + */ void tls_rand_seed(void); int tls_rand_seed_from_file(const char *filename, size_t n, void *apparg); void tls_rand_seed_from_memory(const void *buf, size_t n); -struct tls_create_ctx_args -{ +struct tls_create_ctx_args { int client_p; const char *certificate_file; const char *key_file; @@ -37,12 +37,13 @@ struct tls_create_ctx_args int export_p; }; struct tls_create_ctx_args tls_create_ctx_defaultargs(void); -/* struct tls_create_ctx_args is similar to a conventional argument list, - * but it can provide default values and allows for future extension. */ +/* + * struct tls_create_ctx_args is similar to a conventional argument list, but + * it can provide default values and allows for future extension. + */ SSL_CTX *tls_create_ctx(struct tls_create_ctx_args, void *apparg); -struct tls_start_proxy_args -{ +struct tls_start_proxy_args { int fd; int client_p; SSL_CTX *ctx; @@ -50,8 +51,10 @@ struct tls_start_proxy_args int *infofd; }; struct tls_start_proxy_args tls_start_proxy_defaultargs(void); -/* tls_start_proxy return value *MUST* be checked! - * 0 means ok, otherwise we've probably run out of some resources. */ +/* + * tls_start_proxy return value *MUST* be checked! 0 means ok, otherwise + * we've probably run out of some resources. + */ int tls_start_proxy(struct tls_start_proxy_args, void *apparg); #endif