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) { |