~ubuntu-branches/ubuntu/trusty/vsftpd/trusty-proposed

« back to all changes in this revision

Viewing changes to ssl.c

  • Committer: Package Import Robot
  • Author(s): Lorenzo De Liso
  • Date: 2012-12-18 19:59:37 UTC
  • mfrom: (2.3.22 sid)
  • Revision ID: package-import@ubuntu.com-20121218195937-xiwdrfndhhvv87s0
Tags: 3.0.2-1ubuntu1
* Merge from debian unstable (LP: #1092076), remaining changes:
  - Use snakeoil SSL certificates and key.
  - debian/rules, debian/vsftpd.upstart: migrate vsftpd to upstart.
  - Add apport hook:
    + debian/vsftpd.apport: Added.
    + debian/control: Build-depends on dh-apport.
    + debian/rules: Add --with apport.
  - Add debian/watch file.
  - debian/patches/09-disable-anonymous.patch: Disable anonymous login by 
    default.

Show diffs side-by-side

added added

removed removed

Lines of Context:
171
171
    /* Technically, we shouldn't leak such detailed error messages. */
172
172
    str_append_text(&err_str, get_ssl_error());
173
173
    vsf_cmdio_write_str(p_sess, FTP_TLS_FAIL, &err_str);
174
 
    vsf_sysutil_exit(0);
 
174
    vsf_sysutil_exit(1);
175
175
  }
176
176
  p_sess->control_use_ssl = 1;
177
177
}
476
476
void
477
477
ssl_comm_channel_init(struct vsf_session* p_sess)
478
478
{
 
479
  const struct vsf_sysutil_socketpair_retval retval =
 
480
    vsf_sysutil_unix_stream_socketpair();
479
481
  if (p_sess->ssl_consumer_fd != -1)
480
482
  {
481
483
    bug("ssl_consumer_fd active");
484
486
  {
485
487
    bug("ssl_slave_fd active");
486
488
  }
487
 
  const struct vsf_sysutil_socketpair_retval retval =
488
 
    vsf_sysutil_unix_stream_socketpair();
489
489
  p_sess->ssl_consumer_fd = retval.socket_one;
490
490
  p_sess->ssl_slave_fd = retval.socket_two;
491
491
}
552
552
  if (tunable_debug_ssl)
553
553
  {
554
554
    const char* p_ssl_version = SSL_get_cipher_version(p_ssl);
555
 
    SSL_CIPHER* p_ssl_cipher = SSL_get_current_cipher(p_ssl);
 
555
    const SSL_CIPHER* p_ssl_cipher = SSL_get_current_cipher(p_ssl);
556
556
    const char* p_cipher_name = SSL_CIPHER_get_name(p_ssl_cipher);
557
557
    X509* p_ssl_cert = SSL_get_peer_certificate(p_ssl);
558
558
    int reused = SSL_session_reused(p_ssl);