[glib-networking/wip/openssl: 6/6] Make the bio a generic source sink
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking/wip/openssl: 6/6] Make the bio a generic source sink
- Date: Tue, 19 Jan 2016 11:40:57 +0000 (UTC)
commit bda07cabb27eca8f0731d2e9440e45a39681e955
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Tue Jan 19 12:15:49 2016 +0100
Make the bio a generic source sink
tls/openssl/gtlsbio.c | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/tls/openssl/gtlsbio.c b/tls/openssl/gtlsbio.c
index 84a5bba..dad0d75 100644
--- a/tls/openssl/gtlsbio.c
+++ b/tls/openssl/gtlsbio.c
@@ -26,8 +26,6 @@
#include <string.h>
-#define G_TLS_BIO_TYPE (999|0x0400|0x0100)
-
typedef struct {
GIOStream *io_stream;
GCancellable *read_cancellable;
@@ -151,20 +149,27 @@ static int
gtls_bio_puts(BIO *bio,
const char *str)
{
- return gtls_bio_write (bio, str, (int)strlen (str));
+ return gtls_bio_write (bio, str, (int)strlen (str));
+}
+
+static int
+gtls_bio_gets(BIO *bio,
+ char *buf,
+ int len)
+{
+ return -1;
}
static BIO_METHOD methods_gtls = {
- G_TLS_BIO_TYPE,
+ BIO_TYPE_SOURCE_SINK,
"gtls",
gtls_bio_write,
gtls_bio_read,
gtls_bio_puts,
- NULL, /* sock_gets, */
+ gtls_bio_gets,
gtls_bio_ctrl,
gtls_bio_create,
- gtls_bio_destroy,
- NULL
+ gtls_bio_destroy
};
static BIO_METHOD *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]