diff options
Diffstat (limited to 'nanohttp')
-rw-r--r-- | nanohttp/nanohttp-ssl.c | 9 | ||||
-rw-r--r-- | nanohttp/nanohttp-ssl.h | 10 |
2 files changed, 8 insertions, 11 deletions
diff --git a/nanohttp/nanohttp-ssl.c b/nanohttp/nanohttp-ssl.c index b9e4af1..34c00c9 100644 --- a/nanohttp/nanohttp-ssl.c +++ b/nanohttp/nanohttp-ssl.c @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: nanohttp-ssl.c,v 1.25 2006/04/26 17:48:30 mrcsys Exp $ +* $Id: nanohttp-ssl.c,v 1.26 2006/05/15 06:40:47 m0gg Exp $ * * CSOAP Project: A http client/server library in C * Copyright (C) 2001-2005 Rochester Institute of Technology @@ -84,6 +84,7 @@ static SSL_CTX *context = NULL; static int enabled = 0; +static int _hssl_dummy_verify_cert(X509 * cert); int (*_hssl_verify_cert) (X509 * cert) = _hssl_dummy_verify_cert; static void @@ -442,8 +443,8 @@ hssl_client_ssl(hsocket_t * sock) return H_OK; } -long -hssl_bio_read(BIO * b, char *out, int outl) +static int +_hssl_bio_read(BIO * b, char *out, int outl) { return hsocket_select_read(b->num, out, outl);; @@ -477,7 +478,7 @@ hssl_server_ssl(hsocket_t * sock) return NULL; } // BIO_set_callback(sbio, hssl_bio_cb); - sbio->method->bread = hssl_bio_read; + sbio->method->bread = _hssl_bio_read; SSL_set_bio(ssl, sbio, sbio); diff --git a/nanohttp/nanohttp-ssl.h b/nanohttp/nanohttp-ssl.h index 7559c8b..12f3fcf 100644 --- a/nanohttp/nanohttp-ssl.h +++ b/nanohttp/nanohttp-ssl.h @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: nanohttp-ssl.h,v 1.17 2006/04/26 17:48:30 mrcsys Exp $ +* $Id: nanohttp-ssl.h,v 1.18 2006/05/15 06:40:47 m0gg Exp $ * * CSOAP Project: A http client/server library in C * Copyright (C) 2001-2005 Rochester Institute of Technology @@ -84,13 +84,8 @@ extern "C" /* static int verify_cb(int prev_ok, X509_STORE_CTX* ctx); */ -/* - * This function MUST be implemented by user client/server code somewhere - */ void hssl_set_user_verify(int func(X509 * cert)); - static int _hssl_dummy_verify_cert(X509 * cert); - #ifdef __cplusplus } #endif @@ -119,6 +114,7 @@ hssl_client_ssl(hsocket_t * sock) { return H_OK; } + static inline herror_t hssl_server_ssl(hsocket_t * sock) { @@ -137,7 +133,7 @@ hssl_cleanup(hsocket_t * sock) extern "C" { #endif - long hssl_bio_read(BIO * b, char *out, int outl); + herror_t hssl_read(hsocket_t * sock, char *buf, size_t len, size_t * received); herror_t hssl_write(hsocket_t * sock, const char *buf, size_t len, |