Article View: news.software.nntp
Article #76109Re: SSL support in INN 2.5
From: Kachun Lee
Date: Fri, 04 May 2007 23:09
Date: Fri, 04 May 2007 23:09
90 lines
4104 bytes
4104 bytes
Hi,
We ran a heavy modified INN branched out before v2. However, I browered the
SSL code from v2.4.3. Before I posted, I did a quick check and verify the
code in v2.5 was similar. I was trying to create the diff with v2.5, but I
put the closing bracket into the wrong line. These are the lines in my
source...
#ifdef HAVE_SSL
/* wait for activity on stdin, updating timer stats as we
* go */
if (tls_conn == NULL) {
#endif
do {
struct timeval t;
FD_ZERO(&rmask);
FD_SET(STDIN_FILENO, &rmask);
t.tv_sec = timeout;
t.tv_usec = 0;
/*TMRstart(TMR_IDLE);*/
i = select(STDIN_FILENO + 1, &rmask, NULL, NULL, &t);
/*TMRstop(TMR_IDLE);*/
if (i == -1 && errno != EINTR) {
syslog(LOG_WARNING, "%s can't select", ClientHost);
return RTtimeout;
}
} while (i == -1);
/* if stdin didn't select, we must have timed out */
if (i == 0 || !FD_ISSET(STDIN_FILENO, &rmask))
return RTtimeout;
#ifdef HAVE_SSL
}
#endif
"Julien ÉLIE" <iulius@nom-de-mon-site.com.invalid> wrote in message
news:f1fv9o$v5h$1@news.trigofacile.com...
> En réponse à Kachun Lee :
>> *** line.c.orig Thu May 3 02:07:33 2007
>> --- line.c Thu May 3 15:01:39 2007
>
> Well, I tried to patch my INN CURRENT version but it failed.
> Indeed, nntp worked very well, but not nntp/ssl: I couldn't
> connect any longer and timeouted.
Hi,
We ran a heavy modified INN branched out before v2. However, I browered the
SSL code from v2.4.3. Before I posted, I did a quick check and verify the
code in v2.5 was similar. I was trying to create the diff with v2.5, and put
the closing bracket into the wrong line... sorry about that.
You need to move the closing bracket few lines down. I copy and pasted the
loop from my working source code below.
Kachun
#ifdef HAVE_SSL
if (tls_conn == NULL) {
#endif
/* wait for activity on stdin, updating timer stats as we
* go */
do {
struct timeval t;
FD_ZERO(&rmask);
FD_SET(STDIN_FILENO, &rmask);
t.tv_sec = timeout;
t.tv_usec = 0;
/*TMRstart(TMR_IDLE);*/
i = select(STDIN_FILENO + 1, &rmask, NULL, NULL, &t);
/*TMRstop(TMR_IDLE);*/
if (i == -1 && errno != EINTR) {
syslog(LOG_WARNING, "%s can't select", ClientHost);
return RTtimeout;
}
} while (i == -1);
/* if stdin didn't select, we must have timed out */
if (i == 0 || !FD_ISSET(STDIN_FILENO, &rmask))
return RTtimeout;
#ifdef HAVE_SSL
}
#endif
[...]
Technical Details
Message-ID:
<f1geen02osf@news2.newsguy.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!news3.google.com!out03b.usenetserver.com!news.usenetserver.com!in01.usenetserver.com!news.usenetserver.com!spln!extra.newsguy.com!newsp.newsguy.com!news2References:
<f0g32k$83v$1@guepard.ecp.fr> <f1dptn05nb@news5.newsguy.com> <f1fv9o$v5h$1@news.trigofacile.com>Show Full Headers
Complete Article Headers
Message-ID: <f1geen02osf@news2.newsguy.com> Subject: Re: SSL support in INN 2.5 Date: Fri, 4 May 2007 16:09:39 -0700 From: "Kachun Lee" <kachun@newsguy.com> References: <f0g32k$83v$1@guepard.ecp.fr> <f1dptn05nb@news5.newsguy.com> <f1fv9o$v5h$1@news.trigofacile.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!news3.google.com!out03b.usenetserver.com!news.usenetserver.com!in01.usenetserver.com!news.usenetserver.com!spln!extra.newsguy.com!newsp.newsguy.com!news2 Newsgroups: news.software.nntp Organization: NewsGuy - Unlimited Usenet $19.95 Lines: 90 NNTP-Posting-Host: p6337bfbfff0000006120c0fe806d31a60626e8c4798acdde.newsdawg.com X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3028 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028