aboutsummaryrefslogtreecommitdiffstats
path: root/src/gnutls_io.c
diff options
context:
space:
mode:
authorGravatar Paul Querna 2005-04-24 22:21:50 +0000
committerGravatar Paul Querna 2005-04-24 22:21:50 +0000
commitc301152dbbdf13c4bf212c7982b948c21149468d (patch)
tree311447345aca9ee56f930428843aef6a7e48569d /src/gnutls_io.c
parent46b85d8e3634f34c0142823d92b037dd33b67898 (diff)
- move hooks to gnutls_hooks.c
- use 'mgs_' as the prefix for all symbols, instead of mixed prefixes.
Diffstat (limited to 'src/gnutls_io.c')
-rw-r--r--src/gnutls_io.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/gnutls_io.c b/src/gnutls_io.c
index dee2c4f..acb6095 100644
--- a/src/gnutls_io.c
+++ b/src/gnutls_io.c
@@ -35,7 +35,7 @@ static apr_status_t gnutls_io_filter_error(ap_filter_t * f,
35 apr_bucket_brigade * bb, 35 apr_bucket_brigade * bb,
36 apr_status_t status) 36 apr_status_t status)
37{ 37{
38 mod_gnutls_handle_t *ctxt = (mod_gnutls_handle_t *) f->ctx; 38 mgs_handle_t *ctxt = (mgs_handle_t *) f->ctx;
39 apr_bucket *bucket; 39 apr_bucket *bucket;
40 40
41 switch (status) { 41 switch (status) {
@@ -63,7 +63,7 @@ static apr_status_t gnutls_io_filter_error(ap_filter_t * f,
63 return APR_SUCCESS; 63 return APR_SUCCESS;
64} 64}
65 65
66static int char_buffer_read(mod_gnutls_char_buffer_t * buffer, char *in, 66static int char_buffer_read(mgs_char_buffer_t * buffer, char *in,
67 int inl) 67 int inl)
68{ 68{
69 if (!buffer->length) { 69 if (!buffer->length) {
@@ -87,7 +87,7 @@ static int char_buffer_read(mod_gnutls_char_buffer_t * buffer, char *in,
87 return inl; 87 return inl;
88} 88}
89 89
90static int char_buffer_write(mod_gnutls_char_buffer_t * buffer, char *in, 90static int char_buffer_write(mgs_char_buffer_t * buffer, char *in,
91 int inl) 91 int inl)
92{ 92{
93 buffer->value = in; 93 buffer->value = in;
@@ -181,7 +181,7 @@ static apr_status_t brigade_consume(apr_bucket_brigade * bb,
181} 181}
182 182
183 183
184static apr_status_t gnutls_io_input_read(mod_gnutls_handle_t * ctxt, 184static apr_status_t gnutls_io_input_read(mgs_handle_t * ctxt,
185 char *buf, apr_size_t * len) 185 char *buf, apr_size_t * len)
186{ 186{
187 apr_size_t wanted = *len; 187 apr_size_t wanted = *len;
@@ -310,7 +310,7 @@ static apr_status_t gnutls_io_input_read(mod_gnutls_handle_t * ctxt,
310 return ctxt->input_rc; 310 return ctxt->input_rc;
311} 311}
312 312
313static apr_status_t gnutls_io_input_getline(mod_gnutls_handle_t * ctxt, 313static apr_status_t gnutls_io_input_getline(mgs_handle_t * ctxt,
314 char *buf, apr_size_t * len) 314 char *buf, apr_size_t * len)
315{ 315{
316 const char *pos = NULL; 316 const char *pos = NULL;
@@ -353,7 +353,7 @@ static apr_status_t gnutls_io_input_getline(mod_gnutls_handle_t * ctxt,
353 return APR_SUCCESS; 353 return APR_SUCCESS;
354} 354}
355 355
356static int gnutls_do_handshake(mod_gnutls_handle_t * ctxt) 356static int gnutls_do_handshake(mgs_handle_t * ctxt)
357{ 357{
358 int ret; 358 int ret;
359 int errcode; 359 int errcode;
@@ -403,7 +403,7 @@ tryagain:
403 } 403 }
404} 404}
405 405
406int mod_gnutls_rehandshake(mod_gnutls_handle_t * ctxt) 406int mgs_rehandshake(mgs_handle_t * ctxt)
407{ 407{
408 int rv; 408 int rv;
409 409
@@ -424,14 +424,14 @@ int mod_gnutls_rehandshake(mod_gnutls_handle_t * ctxt)
424} 424}
425 425
426 426
427apr_status_t mod_gnutls_filter_input(ap_filter_t* f, 427apr_status_t mgs_filter_input(ap_filter_t* f,
428 apr_bucket_brigade * bb, 428 apr_bucket_brigade * bb,
429 ap_input_mode_t mode, 429 ap_input_mode_t mode,
430 apr_read_type_e block, 430 apr_read_type_e block,
431 apr_off_t readbytes) 431 apr_off_t readbytes)
432{ 432{
433 apr_status_t status = APR_SUCCESS; 433 apr_status_t status = APR_SUCCESS;
434 mod_gnutls_handle_t *ctxt = (mod_gnutls_handle_t *) f->ctx; 434 mgs_handle_t *ctxt = (mgs_handle_t *) f->ctx;
435 apr_size_t len = sizeof(ctxt->input_buffer); 435 apr_size_t len = sizeof(ctxt->input_buffer);
436 436
437 if (f->c->aborted) { 437 if (f->c->aborted) {
@@ -488,12 +488,12 @@ apr_status_t mod_gnutls_filter_input(ap_filter_t* f,
488 return status; 488 return status;
489} 489}
490 490
491apr_status_t mod_gnutls_filter_output(ap_filter_t * f, 491apr_status_t mgs_filter_output(ap_filter_t * f,
492 apr_bucket_brigade * bb) 492 apr_bucket_brigade * bb)
493{ 493{
494 apr_size_t ret; 494 apr_size_t ret;
495 apr_bucket* e; 495 apr_bucket* e;
496 mod_gnutls_handle_t *ctxt = (mod_gnutls_handle_t *) f->ctx; 496 mgs_handle_t *ctxt = (mgs_handle_t *) f->ctx;
497 apr_status_t status = APR_SUCCESS; 497 apr_status_t status = APR_SUCCESS;
498 apr_read_type_e rblock = APR_NONBLOCK_READ; 498 apr_read_type_e rblock = APR_NONBLOCK_READ;
499 499
@@ -592,10 +592,10 @@ apr_status_t mod_gnutls_filter_output(ap_filter_t * f,
592 return status; 592 return status;
593} 593}
594 594
595ssize_t mod_gnutls_transport_read(gnutls_transport_ptr_t ptr, 595ssize_t mgs_transport_read(gnutls_transport_ptr_t ptr,
596 void *buffer, size_t len) 596 void *buffer, size_t len)
597{ 597{
598 mod_gnutls_handle_t *ctxt = ptr; 598 mgs_handle_t *ctxt = ptr;
599 apr_status_t rc; 599 apr_status_t rc;
600 apr_size_t in = len; 600 apr_size_t in = len;
601 apr_read_type_e block = ctxt->input_block; 601 apr_read_type_e block = ctxt->input_block;
@@ -659,7 +659,7 @@ ssize_t mod_gnutls_transport_read(gnutls_transport_ptr_t ptr,
659} 659}
660 660
661 661
662static ssize_t write_flush(mod_gnutls_handle_t * ctxt) 662static ssize_t write_flush(mgs_handle_t * ctxt)
663{ 663{
664 apr_bucket *e; 664 apr_bucket *e;
665 665
@@ -691,10 +691,10 @@ static ssize_t write_flush(mod_gnutls_handle_t * ctxt)
691 return (ctxt->output_rc == APR_SUCCESS) ? 1 : -1; 691 return (ctxt->output_rc == APR_SUCCESS) ? 1 : -1;
692} 692}
693 693
694ssize_t mod_gnutls_transport_write(gnutls_transport_ptr_t ptr, 694ssize_t mgs_transport_write(gnutls_transport_ptr_t ptr,
695 const void *buffer, size_t len) 695 const void *buffer, size_t len)
696{ 696{
697 mod_gnutls_handle_t *ctxt = ptr; 697 mgs_handle_t *ctxt = ptr;
698 698
699 /* pass along the encrypted data 699 /* pass along the encrypted data
700 * need to flush since we're using SSL's malloc-ed buffer 700 * need to flush since we're using SSL's malloc-ed buffer