Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 675060 | Differences between
and this patch

Collapse All | Expand All

(-)a/qmail-remote.c (-3 / +3 lines)
Lines 270-277 char *append; Link Here
270
{
270
{
271
#ifdef TLS
271
#ifdef TLS
272
  /* shouldn't talk to the client unless in an appropriate state */
272
  /* shouldn't talk to the client unless in an appropriate state */
273
  int state = ssl ? ssl->state : SSL_ST_BEFORE;
273
  int state = ssl ? SSL_get_state(ssl) : TLS_ST_BEFORE;
274
  if (state & SSL_ST_OK || (!smtps && state & SSL_ST_BEFORE))
274
  if (state & TLS_ST_OK || (!smtps && state & TLS_ST_BEFORE))
275
#endif
275
#endif
276
  substdio_putsflush(&smtpto,"QUIT\r\n");
276
  substdio_putsflush(&smtpto,"QUIT\r\n");
277
  /* waiting for remote side is just too ridiculous */
277
  /* waiting for remote side is just too ridiculous */
Lines 499-505 int tls_init() Link Here
499
      X509_NAME *subj = X509_get_subject_name(peercert);
499
      X509_NAME *subj = X509_get_subject_name(peercert);
500
      i = X509_NAME_get_index_by_NID(subj, NID_commonName, -1);
500
      i = X509_NAME_get_index_by_NID(subj, NID_commonName, -1);
501
      if (i >= 0) {
501
      if (i >= 0) {
502
        const ASN1_STRING *s = X509_NAME_get_entry(subj, i)->value;
502
        const ASN1_STRING *s = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subj, i));
503
        if (s) { peer.len = s->length; peer.s = s->data; }
503
        if (s) { peer.len = s->length; peer.s = s->data; }
504
      }
504
      }
505
      if (peer.len <= 0) {
505
      if (peer.len <= 0) {
(-)a/qmail-smtpd.c (-1 / +1 lines)
Lines 887-893 int tls_verify() Link Here
887
    subj = X509_get_subject_name(peercert);
887
    subj = X509_get_subject_name(peercert);
888
    n = X509_NAME_get_index_by_NID(subj, NID_pkcs9_emailAddress, -1);
888
    n = X509_NAME_get_index_by_NID(subj, NID_pkcs9_emailAddress, -1);
889
    if (n >= 0) {
889
    if (n >= 0) {
890
      const ASN1_STRING *s = X509_NAME_get_entry(subj, n)->value;
890
      const ASN1_STRING *s = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subj, n));
891
      if (s) { email.len = s->length; email.s = s->data; }
891
      if (s) { email.len = s->length; email.s = s->data; }
892
    }
892
    }
893
893
(-)a/ssl_timeoutio.c (-2 / +2 lines)
Lines 74-83 int ssl_timeoutrehandshake(int t, int rfd, int wfd, SSL *ssl) Link Here
74
74
75
  SSL_renegotiate(ssl);
75
  SSL_renegotiate(ssl);
76
  r = ssl_timeoutio(SSL_do_handshake, t, rfd, wfd, ssl, NULL, 0);
76
  r = ssl_timeoutio(SSL_do_handshake, t, rfd, wfd, ssl, NULL, 0);
77
  if (r <= 0 || ssl->type == SSL_ST_CONNECT) return r;
77
  if (r <= 0 || SSL_get_state(ssl) == SSL_ST_CONNECT) return r;
78
78
79
  /* this is for the server only */
79
  /* this is for the server only */
80
  ssl->state = SSL_ST_ACCEPT;
80
  SSL_set_accept_state(ssl);
81
  return ssl_timeoutio(SSL_do_handshake, t, rfd, wfd, ssl, NULL, 0);
81
  return ssl_timeoutio(SSL_do_handshake, t, rfd, wfd, ssl, NULL, 0);
82
}
82
}
83
83

Return to bug 675060