summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2001-12-08 22:54:34 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2001-12-08 22:54:34 +0000
commit745b110197d9a1af0354a5607bdbe49eda4012a7 (patch)
treea9cc171d45cea9f579d8ac1c1dae752a9aa35215
parent51c5be488bae246ab8bb33b50a377aaf554feca8 (diff)
downloadgnutls-745b110197d9a1af0354a5607bdbe49eda4012a7.tar.gz
added gnutls_transport_get_ptr() and gnutls_db_get_ptr() functions.
-rw-r--r--NEWS5
-rw-r--r--lib/gnutls.h.in2
-rw-r--r--lib/gnutls_db.c12
-rw-r--r--lib/gnutls_int.h4
-rw-r--r--lib/gnutls_record.c12
5 files changed, 33 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 2950fb54ad..32a825e339 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,8 @@
+Version ?.?.?
+- Fixes in MPI handling (fixes possible with signed integers)
+- Removed name indication extension
+- Added gnutls_transport_get_ptr() and gnutls_db_get_ptr()
+
Version 0.2.90 (7/12/2001)
- gnutls_handshake(), gnutls_read() etc. functions no longer require
the 'SOCKET cd' argument. This argument is set using the function
diff --git a/lib/gnutls.h.in b/lib/gnutls.h.in
index 2ca373d8fb..fb45b4de8d 100644
--- a/lib/gnutls.h.in
+++ b/lib/gnutls.h.in
@@ -150,6 +150,7 @@ void gnutls_db_set_retrieve_func( GNUTLS_STATE, DB_RETR_FUNC);
void gnutls_db_set_remove_func( GNUTLS_STATE, DB_REMOVE_FUNC);
void gnutls_db_set_store_func( GNUTLS_STATE, DB_STORE_FUNC);
void gnutls_db_set_ptr( GNUTLS_STATE, void* db_ptr);
+void* gnutls_db_get_ptr( GNUTLS_STATE);
int gnutls_db_check_entry( GNUTLS_STATE state, gnutls_datum session_entry);
void gnutls_set_max_handshake_data_buffer_size( GNUTLS_STATE state, int max);
@@ -227,6 +228,7 @@ int gnutls_dh_generate_params( gnutls_datum* prime, gnutls_datum* generator, int
typedef ssize_t (*GNUTLS_PULL_FUNC)(GNUTLS_SOCKET_PTR, void*, size_t);
typedef ssize_t (*GNUTLS_PUSH_FUNC)(GNUTLS_SOCKET_PTR, const void*, size_t);
void gnutls_transport_set_ptr(GNUTLS_STATE state, GNUTLS_SOCKET_PTR ptr);
+GNUTLS_SOCKET_PTR gnutls_transport_get_ptr(GNUTLS_STATE state);
typedef void (*LOG_FUNC)( const char*);
diff --git a/lib/gnutls_db.c b/lib/gnutls_db.c
index 5815a67dbb..becb38287d 100644
--- a/lib/gnutls_db.c
+++ b/lib/gnutls_db.c
@@ -106,6 +106,18 @@ void gnutls_db_set_ptr( GNUTLS_STATE state, void* ptr) {
}
/**
+ * gnutls_db_get_ptr - Returns the pointer which is sent to db functions
+ * @state: is a &GNUTLS_STATE structure.
+ *
+ * Returns the pointer that will be sent to db store, retrieve and delete functions, as
+ * the first argument. Should only be used if not using the default (gdbm) backend.
+ *
+ **/
+void* gnutls_db_get_ptr( GNUTLS_STATE state) {
+ return state->gnutls_internals.db_ptr;
+}
+
+/**
* gnutls_set_cache_expiration - Sets the expiration time for resumed sessions.
* @state: is a &GNUTLS_STATE structure.
* @seconds: is the number of seconds.
diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h
index f33d12172b..dd271e9f13 100644
--- a/lib/gnutls_int.h
+++ b/lib/gnutls_int.h
@@ -31,9 +31,9 @@
#define WRITE_DEBUG
#define READ_DEBUG
#define HANDSHAKE_DEBUG // Prints some information on handshake
-#define RECORD_DEBUG*/
+#define RECORD_DEBUG
#define DEBUG
-
+*/
/* It might be a good idea to replace int with void*
* here.
diff --git a/lib/gnutls_record.c b/lib/gnutls_record.c
index cbde6b6306..4fb47990b5 100644
--- a/lib/gnutls_record.c
+++ b/lib/gnutls_record.c
@@ -84,6 +84,18 @@ void gnutls_transport_set_ptr(GNUTLS_STATE state, GNUTLS_SOCKET_PTR ptr) {
state->gnutls_internals.transport_ptr = ptr;
}
+/**
+ * gnutls_transport_get_ptr - Used to return the first argument of the transport functions
+ * @state: is a &GNUTLS_STATE structure.
+ *
+ * Used to get the first argument of the transport function (like PUSH and
+ * PULL). This must have been set using gnutls_transport_set_ptr().
+ *
+ **/
+GNUTLS_SOCKET_PTR gnutls_transport_get_ptr(GNUTLS_STATE state) {
+ return state->gnutls_internals.transport_ptr;
+}
+
#define _gnutls_free(x) if(x!=NULL) gnutls_free(x)
/**
* gnutls_init - This function initializes the state to null (null encryption etc...).