/[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.4 by gray, Sat May 10 09:02:30 2003 UTC revision 1.5 by gray, Sat May 10 17:10:14 2003 UTC
# Line 211  start_ssl_server(int sd_client) Line 211  start_ssl_server(int sd_client)
211          gnutls_certificate_allocate_credentials(&x509_cred);          gnutls_certificate_allocate_credentials(&x509_cred);
212          atexit(_tls_cleanup_x509);          atexit(_tls_cleanup_x509);
213          if (secure.cafile) {          if (secure.cafile) {
214                  gnutls_certificate_set_x509_trust_file(x509_cred,                  rs = gnutls_certificate_set_x509_trust_file(xcred,
215                                                         secure.cafile,                                                              secure.cafile,
216                                                         GNUTLS_X509_FMT_PEM);                                                              GNUTLS_X509_FMT_PEM);
217                    if (rs < 0) {
218                            anubis_error(HARD, _("TLS Error reading `%s': %s"),
219                                         secure.cafile,
220                                         gnutls_strerror(rs));
221                            return 0;
222                    }
223          }          }
224          gnutls_certificate_set_x509_key_file(x509_cred,          gnutls_certificate_set_x509_key_file(x509_cred,
225                                               secure.cert, secure.key,                                               secure.cert, secure.key,
# Line 223  start_ssl_server(int sd_client) Line 229  start_ssl_server(int sd_client)
229          gnutls_certificate_set_dh_params(x509_cred, dh_params);          gnutls_certificate_set_dh_params(x509_cred, dh_params);
230    
231          session = initialize_tls_session();          session = initialize_tls_session();
232    
233          gnutls_transport_set_ptr(session, sd_client);          gnutls_transport_set_ptr(session, sd_client);
234          rs = gnutls_handshake(session);          rs = gnutls_handshake(session);
235          if (rs < 0) {          if (rs < 0) {
# Line 416  print_x509_certificate_info(gnutls_sessi Line 423  print_x509_certificate_info(gnutls_sessi
423  #endif /* HAVE_TLS */  #endif /* HAVE_TLS */
424    
425  /* EOF */  /* EOF */
   

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

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