/[anubis]/anubis/src/tls.c
ViewVC logotype

Diff of /anubis/src/tls.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by gray, Wed May 28 05:55:25 2003 UTC revision 1.8 by gray, Tue Jul 1 15:23:36 2003 UTC
# Line 112  _tls_fd_pull(gnutls_transport_ptr fd, vo Line 112  _tls_fd_pull(gnutls_transport_ptr fd, vo
112  {  {
113          int rc;          int rc;
114          do {          do {
115                  rc = read(fd, buf, size);                  rc = read((int) fd, buf, size);
116          } while (rc == -1 && errno == EAGAIN);          } while (rc == -1 && errno == EAGAIN);
117          return rc;          return rc;
118  }  }
# Line 122  _tls_fd_push(gnutls_transport_ptr fd, co Line 122  _tls_fd_push(gnutls_transport_ptr fd, co
122  {  {
123          int rc;          int rc;
124          do {          do {
125                  rc = write(fd, buf, size);                  rc = write((int) fd, buf, size);
126          } while (rc == -1 && errno == EAGAIN);          } while (rc == -1 && errno == EAGAIN);
127          return rc;          return rc;
128  }  }
# Line 177  start_ssl_client(int sd_server) Line 177  start_ssl_client(int sd_server)
177                  gnutls_transport_set_pull_function(session, _tls_fd_pull);                  gnutls_transport_set_pull_function(session, _tls_fd_pull);
178                  gnutls_transport_set_push_function(session, _tls_fd_push);                  gnutls_transport_set_push_function(session, _tls_fd_push);
179          }          }
180          gnutls_transport_set_ptr(session, sd_server);          gnutls_transport_set_ptr(session, (void*) sd_server);
181    
182          rs = gnutls_handshake(session);          rs = gnutls_handshake(session);
183          if (rs < 0) {          if (rs < 0) {
# Line 262  start_ssl_server(int sd_client) Line 262  start_ssl_server(int sd_client)
262                  gnutls_transport_set_pull_function(session, _tls_fd_pull);                  gnutls_transport_set_pull_function(session, _tls_fd_pull);
263                  gnutls_transport_set_push_function(session, _tls_fd_push);                  gnutls_transport_set_push_function(session, _tls_fd_push);
264          }          }
265          gnutls_transport_set_ptr(session, sd_client);          gnutls_transport_set_ptr(session, (gnutls_transport_ptr) sd_client);
266          rs = gnutls_handshake(session);          rs = gnutls_handshake(session);
267          if (rs < 0) {          if (rs < 0) {
268                  gnutls_deinit(session);                  gnutls_deinit(session);

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26