summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2002-06-08 12:38:24 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2002-06-08 12:38:24 +0000
commitd0bbe6e61ddd9304022d4965879a7b3ebfd67210 (patch)
tree5531b00d5744fe04cebf663504db02b264d65abd /lib
parentcdfbbf6eae3e783520b13a52b5138061300818d7 (diff)
downloadgnutls-d0bbe6e61ddd9304022d4965879a7b3ebfd67210.tar.gz
Created gnutls_handshake_set_private_extensions() function.
Diffstat (limited to 'lib')
-rw-r--r--lib/gnutls.h.in.in25
-rw-r--r--lib/gnutls_algorithms.c4
-rw-r--r--lib/gnutls_int.h2
-rw-r--r--lib/gnutls_state.c8
4 files changed, 23 insertions, 16 deletions
diff --git a/lib/gnutls.h.in.in b/lib/gnutls.h.in.in
index fef2943309..89ed3493c9 100644
--- a/lib/gnutls.h.in.in
+++ b/lib/gnutls.h.in.in
@@ -138,14 +138,26 @@ int gnutls_error_is_fatal( int error);
void gnutls_perror( int error);
const char* gnutls_strerror( int error);
+/* Semi-internal functions.
+ */
+void gnutls_handshake_set_private_extensions(GNUTLS_STATE state, int allow);
void gnutls_record_set_cbc_protection(GNUTLS_STATE state, int prot);
void gnutls_handshake_set_rsa_pms_check(GNUTLS_STATE state, int check);
+
+/* Record layer functions.
+ */
ssize_t gnutls_record_send( GNUTLS_STATE state, const void *data, size_t sizeofdata);
ssize_t gnutls_record_recv( GNUTLS_STATE state, void *data, size_t sizeofdata);
#define gnutls_read gnutls_record_recv
#define gnutls_write gnutls_record_send
-/* functions to set priority of cipher suites */
+size_t gnutls_record_get_max_size( GNUTLS_STATE state);
+ssize_t gnutls_record_set_max_size( GNUTLS_STATE state, size_t size);
+
+size_t gnutls_record_check_pending(GNUTLS_STATE state);
+
+/* functions to set priority of cipher suites
+ */
int gnutls_cipher_set_priority( GNUTLS_STATE state, GNUTLS_LIST);
int gnutls_mac_set_priority( GNUTLS_STATE state, GNUTLS_LIST);
int gnutls_compression_set_priority( GNUTLS_STATE state, GNUTLS_LIST);
@@ -186,7 +198,7 @@ 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_handshake_set_max_length( GNUTLS_STATE state, int max);
+void gnutls_handshake_set_max_packet_length( GNUTLS_STATE state, int max);
/* returns libgnutls version */
const char* gnutls_check_version( const char*);
@@ -268,16 +280,11 @@ void gnutls_transport_set_lowat( GNUTLS_STATE state, int num);
void gnutls_transport_set_push_func( GNUTLS_STATE, GNUTLS_PUSH_FUNC push_func);
void gnutls_transport_set_pull_func( GNUTLS_STATE, GNUTLS_PULL_FUNC pull_func);
-/* state specific */
+/* state specific
+ */
void gnutls_state_set_ptr(GNUTLS_STATE state, void* ptr);
void* gnutls_state_get_ptr(GNUTLS_STATE state);
-/* record layer */
-size_t gnutls_record_get_max_size( GNUTLS_STATE state);
-ssize_t gnutls_record_set_max_size( GNUTLS_STATE state, size_t size);
-
-size_t gnutls_record_check_pending(GNUTLS_STATE state);
-
void gnutls_openpgp_send_key(GNUTLS_STATE state, GNUTLS_OpenPGPKeyStatus status);
int gnutls_x509_fingerprint(GNUTLS_DigestAlgorithm algo, const gnutls_datum* data, char* result, size_t* result_size);
diff --git a/lib/gnutls_algorithms.c b/lib/gnutls_algorithms.c
index e9c6a4d446..b3ab01dee9 100644
--- a/lib/gnutls_algorithms.c
+++ b/lib/gnutls_algorithms.c
@@ -1057,7 +1057,7 @@ _gnutls_supported_ciphersuites(GNUTLS_STATE state,
for (i = j = 0; i < count; i++) {
/* remove private cipher suites, if requested.
*/
- if ( state->gnutls_internals.enable_experimental == 0 &&
+ if ( state->gnutls_internals.enable_private == 0 &&
tmp_ciphers[i].CipherSuite[0] == 0xFF)
continue;
@@ -1133,7 +1133,7 @@ _gnutls_supported_compression_methods(GNUTLS_STATE state, uint8 ** comp)
/* remove private compression algorithms, if requested.
*/
- if (tmp == -1 || (state->gnutls_internals.enable_experimental == 0 &&
+ if (tmp == -1 || (state->gnutls_internals.enable_private == 0 &&
tmp >= MIN_PRIVATE_COMP_ALGO)) {
gnutls_assert();
diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h
index 56503208c0..738a70462a 100644
--- a/lib/gnutls_int.h
+++ b/lib/gnutls_int.h
@@ -559,7 +559,7 @@ typedef struct {
void* user_ptr;
- int enable_experimental; /* non zero to
+ int enable_private;/* non zero to
* enable cipher suites
* which have 0xFF status.
*/
diff --git a/lib/gnutls_state.c b/lib/gnutls_state.c
index 9d9daa0003..5e81cee2ec 100644
--- a/lib/gnutls_state.c
+++ b/lib/gnutls_state.c
@@ -168,7 +168,7 @@ int default_protocol_list[] = { GNUTLS_TLS1, 0 };
(*state)->security_parameters.read_compression_algorithm = GNUTLS_COMP_NULL;
(*state)->security_parameters.write_compression_algorithm = GNUTLS_COMP_NULL;
- (*state)->gnutls_internals.enable_experimental = 0;
+ (*state)->gnutls_internals.enable_private = 0;
gnutls_protocol_set_priority( *state, default_protocol_list); /* default */
@@ -429,7 +429,7 @@ void gnutls_record_set_cbc_protection(GNUTLS_STATE state, int prot)
}
/**
- * gnutls_state_allow_private_ciphersuites - Used to enable the private cipher suites
+ * gnutls_handshake_set_private_extensions - Used to enable the private cipher suites
* @state: is a &GNUTLS_STATE structure.
* @allow: is an integer (0 or 1)
*
@@ -444,9 +444,9 @@ void gnutls_record_set_cbc_protection(GNUTLS_STATE state, int prot)
* are not yet defined in any RFC or even internet draft.
*
**/
-void gnutls_state_allow_private_ciphersuites(GNUTLS_STATE state, int allow)
+void gnutls_handshake_set_private_extensions(GNUTLS_STATE state, int allow)
{
- state->gnutls_internals.enable_experimental = allow;
+ state->gnutls_internals.enable_private = allow;
}
/**