summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2002-02-15 18:43:14 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2002-02-15 18:43:14 +0000
commit9b4e06e4e0ab490dad483b80153734702b4ba799 (patch)
treebe28c1400197d7dadde7b99f871f63eb8a14f872
parent21edeccceeac440c27c1c358651f5e669dde89d2 (diff)
downloadgnutls-9b4e06e4e0ab490dad483b80153734702b4ba799.tar.gz
*** empty log message ***
-rw-r--r--doc/tex/Makefile.am2
-rw-r--r--doc/tex/errors.tex2
-rw-r--r--doc/tex/ex1.tex4
-rw-r--r--doc/tex/ex2.tex4
-rw-r--r--doc/tex/layers.tex4
-rw-r--r--doc/tex/serv1.tex4
-rw-r--r--doc/tex/srp1.tex4
-rw-r--r--lib/gnutls.h.in.in8
-rw-r--r--lib/gnutls_record.c8
-rw-r--r--src/cli.c4
-rw-r--r--src/serv.c6
11 files changed, 25 insertions, 25 deletions
diff --git a/doc/tex/Makefile.am b/doc/tex/Makefile.am
index f2d1686d7a..69ec34f887 100644
--- a/doc/tex/Makefile.am
+++ b/doc/tex/Makefile.am
@@ -2,7 +2,7 @@ EXTRA_DIST = gnutls.tex gnutls.ps gnutls.html \
ex1.tex ex2.tex ex3.tex srp1.tex serv1.tex gnutls.css \
nx_grp_g.png prev_g.png up_g.png fdl.tex macros.tex \
cover.tex.in img1.png img3.png img5.png img2.png img4.png \
- img6.png gnutls-logo.ps layers.ps
+ img6.png img7.png gnutls-logo.ps layers.ps
TEX_OBJECTS = gnutls.tex ../../lib/gnutls-api.tex serv1.tex ex1.tex ex2.tex ex3.tex fdl.tex \
macros.tex cover.tex ciphersuites.tex resumedb.tex translayer.tex asn1.tex ../../lib/asn1-api.tex \
diff --git a/doc/tex/errors.tex b/doc/tex/errors.tex
index b3d20c454c..e69d55e016 100644
--- a/doc/tex/errors.tex
+++ b/doc/tex/errors.tex
@@ -12,7 +12,7 @@ a fatal error code is GNUTLS\_E\_MAC\_FAILED. Non-fatal errors
may warn about something (ie a warning alert was received), or
indicate the some action has to be taken. This is the case with
the error code GNUTLS\_E\_REHANDSHAKE returned by
-\hyperref{gnutls\_record\_read()}{gnutls\_record\_read() (see Section }{)}{gnutls_record_read}.
+\hyperref{gnutls\_record\_recv()}{gnutls\_record\_recv() (see Section }{)}{gnutls_record_recv}.
This error code indicates that the server requests a rehandshake. The client
may ignore this request, or may reply with an alert.
You can test if an error code is a fatal one by using the
diff --git a/doc/tex/ex1.tex b/doc/tex/ex1.tex
index 5833ba2418..3ab3d9c8c2 100644
--- a/doc/tex/ex1.tex
+++ b/doc/tex/ex1.tex
@@ -130,9 +130,9 @@ int main()
*/
print_info(state);
- gnutls_record_write( state, MSG, strlen(MSG));
+ gnutls_record_send( state, MSG, strlen(MSG));
- ret = gnutls_record_read( state, buffer, MAX_BUF);
+ ret = gnutls_record_recv( state, buffer, MAX_BUF);
if (gnutls_error_is_fatal(ret) == 1 || ret == 0) {
if (ret == 0) {
printf("- Peer has closed the GNUTLS connection\n");
diff --git a/doc/tex/ex2.tex b/doc/tex/ex2.tex
index 9409f03376..46f0a051ce 100644
--- a/doc/tex/ex2.tex
+++ b/doc/tex/ex2.tex
@@ -102,9 +102,9 @@ int main()
printf("- Handshake was completed\n");
}
- gnutls_record_write( state, MSG, strlen(MSG));
+ gnutls_record_send( state, MSG, strlen(MSG));
- ret = gnutls_record_read( state, buffer, MAX_BUF);
+ ret = gnutls_record_recv( state, buffer, MAX_BUF);
if (gnutls_error_is_fatal(ret) == 1 || ret == 0) {
if (ret == 0) {
printf("- Peer has closed the GNUTLS connection\n");
diff --git a/doc/tex/layers.tex b/doc/tex/layers.tex
index 6c7485d054..e5c6edd630 100644
--- a/doc/tex/layers.tex
+++ b/doc/tex/layers.tex
@@ -6,8 +6,8 @@ the Handshake Protocol and the Alert Protocol. The Record Protocol
is to serve all other protocols and is above the transport layer.
The Record protocol offers symmetric encryption, and data authenticity.
In \gnutls{} the record protocol is accessed using the
-\hyperref{gnutls\_record\_read()}{gnutls\_record\_read() (see Section }{)}{gnutls_record_read} and
-\hyperref{gnutls\_record\_write()}{gnutls\_record\_write() (see Section }{)}{gnutls_record_write}
+\hyperref{gnutls\_record\_recv()}{gnutls\_record\_recv() (see Section }{)}{gnutls_record_recv} and
+\hyperref{gnutls\_record\_send()}{gnutls\_record\_send() (see Section }{)}{gnutls_record_send}
functions.
\par
diff --git a/doc/tex/serv1.tex b/doc/tex/serv1.tex
index bb6d7b1b52..cbbb84d6b9 100644
--- a/doc/tex/serv1.tex
+++ b/doc/tex/serv1.tex
@@ -210,7 +210,7 @@ int main()
i = 0;
for (;;) {
bzero(buffer, MAX_BUF + 1);
- ret = gnutls_record_read( state, buffer, MAX_BUF);
+ ret = gnutls_record_recv( state, buffer, MAX_BUF);
if (gnutls_error_is_fatal(ret) == 1 || ret == 0) {
if (ret == 0) {
@@ -228,7 +228,7 @@ int main()
if (ret > 0) {
/* echo data back to the client
*/
- gnutls_record_write( state, buffer,
+ gnutls_record_send( state, buffer,
strlen(buffer));
}
if (ret == GNUTLS_E_WARNING_ALERT_RECEIVED || ret == GNUTLS_E_FATAL_ALERT_RECEIVED) {
diff --git a/doc/tex/srp1.tex b/doc/tex/srp1.tex
index d9e5c68d8c..ee6103b3cb 100644
--- a/doc/tex/srp1.tex
+++ b/doc/tex/srp1.tex
@@ -99,9 +99,9 @@ int main()
printf("- Handshake was completed\n");
}
- gnutls_record_write( state, MSG, strlen(MSG));
+ gnutls_record_send( state, MSG, strlen(MSG));
- ret = gnutls_record_read( state, buffer, MAX_BUF);
+ ret = gnutls_record_recv( state, buffer, MAX_BUF);
if (gnutls_error_is_fatal(ret) == 1 || ret == 0) {
if (ret == 0) {
printf("- Peer has closed the GNUTLS connection\n");
diff --git a/lib/gnutls.h.in.in b/lib/gnutls.h.in.in
index b02ffd27be..2872175a98 100644
--- a/lib/gnutls.h.in.in
+++ b/lib/gnutls.h.in.in
@@ -127,10 +127,10 @@ int gnutls_error_is_fatal( int error);
void gnutls_perror( int error);
const char* gnutls_strerror( int error);
-ssize_t gnutls_record_write( GNUTLS_STATE state, void *data, size_t sizeofdata);
-ssize_t gnutls_record_read( GNUTLS_STATE state, void *data, size_t sizeofdata);
-#define gnutls_read gnutls_record_read
-#define gnutls_write gnutls_record_write
+ssize_t gnutls_record_send( GNUTLS_STATE state, 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 */
int gnutls_cipher_set_priority( GNUTLS_STATE state, GNUTLS_LIST);
diff --git a/lib/gnutls_record.c b/lib/gnutls_record.c
index 809c5c65ec..3ffba7331d 100644
--- a/lib/gnutls_record.c
+++ b/lib/gnutls_record.c
@@ -906,7 +906,7 @@ gnutls_check_version( const char *req_version )
/**
- * gnutls_record_write - sends to the peer the specified data
+ * gnutls_record_send - sends to the peer the specified data
* @state: is a &GNUTLS_STATE structure.
* @data: contains the data to send
* @sizeofdata: is the length of the data
@@ -924,12 +924,12 @@ gnutls_check_version( const char *req_version )
* Returns the number of bytes sent, or a negative error code.
*
**/
-ssize_t gnutls_record_write( GNUTLS_STATE state, const void *data, size_t sizeofdata) {
+ssize_t gnutls_record_send( GNUTLS_STATE state, const void *data, size_t sizeofdata) {
return gnutls_send_int( state, GNUTLS_APPLICATION_DATA, -1, data, sizeofdata);
}
/**
- * gnutls_record_read - reads data from the TLS record protocol
+ * gnutls_record_recv - reads data from the TLS record protocol
* @state: is a &GNUTLS_STATE structure.
* @data: contains the data to send
* @sizeofdata: is the length of the data
@@ -944,7 +944,7 @@ ssize_t gnutls_record_write( GNUTLS_STATE state, const void *data, size_t sizeof
* or perform a handshake again. (only a client may receive this message)
*
**/
-ssize_t gnutls_record_read( GNUTLS_STATE state, void *data, size_t sizeofdata) {
+ssize_t gnutls_record_recv( GNUTLS_STATE state, void *data, size_t sizeofdata) {
return gnutls_recv_int( state, GNUTLS_APPLICATION_DATA, -1, data, sizeofdata);
}
diff --git a/src/cli.c b/src/cli.c
index c6eb42356b..730e909941 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -351,7 +351,7 @@ int main(int argc, char **argv)
if (FD_ISSET(sd, &rset)) {
bzero(buffer, MAX_BUF + 1);
do {
- ret = gnutls_read(state, buffer, MAX_BUF);
+ ret = gnutls_record_recv(state, buffer, MAX_BUF);
} while (ret == GNUTLS_E_INTERRUPTED
|| ret == GNUTLS_E_AGAIN);
/* remove new line */
@@ -426,7 +426,7 @@ int main(int argc, char **argv)
}
do {
ret =
- gnutls_write(state, buffer,
+ gnutls_record_send(state, buffer,
strlen(buffer));
} while (ret == GNUTLS_E_AGAIN
|| ret == GNUTLS_E_INTERRUPTED);
diff --git a/src/serv.c b/src/serv.c
index defc1e558e..6020011fbd 100644
--- a/src/serv.c
+++ b/src/serv.c
@@ -249,7 +249,7 @@ int read_request(GNUTLS_STATE state, char *data, int data_size, int rnl)
ptr = data;
for (n = 1; n < data_size; n++) {
do {
- rc = gnutls_read(state, &c, 1);
+ rc = gnutls_record_recv(state, &c, 1);
} while (rc == GNUTLS_E_INTERRUPTED
|| rc == GNUTLS_E_AGAIN);
@@ -453,7 +453,7 @@ int main(int argc, char **argv)
strlen(buffer));
do {
ret =
- gnutls_write(state,
+ gnutls_record_send(state,
buffer,
strlen
(buffer));
@@ -469,7 +469,7 @@ int main(int argc, char **argv)
strcat(http_buffer, HTTP_END);
do {
ret =
- gnutls_write(state,
+ gnutls_record_send(state,
http_buffer,
strlen
(http_buffer));