🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
13 messages
13 total messages Started by Etian Fri, 29 May 2009 03:30
Does SSL actually work with nnrpd INN2.5-RC2?
#81111
Author: Etian
Date: Fri, 29 May 2009 03:30
36 lines
2807 bytes
I got innd running on port 119, with a perl authentication script 
functioning through the wonderfully elegant perl_auth hook. With innd 
running, I start nnrpd on port 563 with SSL using this (logged on as 
user 'news'):
/usr/local/inn/bin/nnrpd -D -p 563 -S
And it starts without error, but when I try to SSH to port 563, the 
connection is instantly cut off, and I find this in the logs:
error initializing TLS: [CA_file: ] [CA_path: ] [cert_file: 
/usr/local/inn/lib/cert.pem] [key_file: /usr/local/inn/lib/key.pem]

I had created the certificate first with 'make cert', and got the error 
message. I made the certificates over again meticulously following the 
directions in man nnrpd from the openssl command line, plus chmod'ing 
and chown'ing. And I got the same error.

Googling the error text led me back to this newsgroup, where another 
user, who couldn't make it work either, had something for CA_file and 
CA_path.  So I did likewise, and it still doesn't work, but now I get a 
2-line error message in the logs:
  bad ownership or permissions on private key 
"/usr/local/inn/lib/cert.pem': private key must be mode 600 and owned by 
uid 9
error initializing TLS: [CA_file: /usr/local/inn/lib/cert.pem] [CA_path: 
/usr/local/inn/lib] [cert_file: /usr/local/inn/lib/cert.pem] [key_file: 
/usr/local/inn/lib/key.pem]

I've checked and double-checked the mode and ownership of cert.pem, and 
it is as it should be.

I've also tried starting it from innd by setting inn.conf with port 563 
and the -S flag for nnrpdflags, and had the same error.

Any suggestions?

Etian
sonic-news
Re: Does SSL actually work with nnrpd INN2.5-RC2?
#81112
Author: Antti-Juhani Kaijanaho
Date: Fri, 29 May 2009 05:32
10 lines
1464 bytes
Etian kirjoitti:
> And it starts without error, but when I try to SSH to port 563, the 
> connection is instantly cut off, and I find this in the logs:
> error initializing TLS: [CA_file: ] [CA_path: ] [cert_file: 
> /usr/local/inn/lib/cert.pem] [key_file: /usr/local/inn/lib/key.pem]

AFAIK, ssh does not do TLS.  You want gnutls-cli or the openssl client.

-- 
Mr. Antti-Juhani Kaijanaho, Jyväskylä, Finland
Re: Does SSL actually work with nnrpd INN2.5-RC2?
#81113
Author: Julien ÉLIE
Date: Fri, 29 May 2009 06:38
59 lines
3470 bytes
Hi Etian,

> /usr/local/inn/bin/nnrpd -D -p 563 -S
> And it starts without error, but when I try to SSH to port 563

In order to test, you should use something like:

openssl s_client -connect your.news.server.com:563


> the connection is instantly cut off, and I find this in the logs:
> error initializing TLS: [CA_file: ] [CA_path: ] [cert_file: /usr/local/inn/lib/cert.pem] [key_file: /usr/local/inn/lib/key.pem]

It shows that you did not parameter inn.conf.
I for one use:

tlscertfile:            /home/news/lib/cert.pem
tlskeyfile:             /home/news/lib/key.pem
tlscapath:              /home/news/lib
#tlscafile:             /home/news/lib/cert.pem

(after having generated the certificates with "make cert")

    http://www.eyrie.org/~eagle/software/inn/docs/inn.conf.html



> I had created the certificate first with 'make cert', and got the error message. I made the certificates over again meticulously 
> following the directions in man nnrpd from the openssl command line, plus chmod'ing and chown'ing. And I got the same error.

I think we forgot to explain in the "TLS SUPPORT" section of the nnrpd
man page that inn.conf should also be updated, and INN restarted.
Thanks for having seen that!

CHECKLIST and INSTALL are not more verbose at all on that bit of
configuration...


> bad ownership or permissions on private key "/usr/local/inn/lib/cert.pem': private key must be mode 600 and owned by uid 9
> error initializing TLS: [CA_file: /usr/local/inn/lib/cert.pem] [CA_path: /usr/local/inn/lib] [cert_file: 
> /usr/local/inn/lib/cert.pem] [key_file: /usr/local/inn/lib/key.pem]
>
> I've checked and double-checked the mode and ownership of cert.pem, and it is as it should be.

I have:

% ll lib/*.pem
-rw-r----- 1 news news 1,2K 2009-04-25 14:52 lib/cert.pem
-rw------- 1 news news  887 2009-04-25 14:52 lib/key.pem

But note that I do not define tlscafile in inn.conf; maybe it is the problem
you have (?)

-- 
Julien ÉLIE

« La moitié des hommes politiques sont des bons à rien.
  Les autres sont prêts à tout. » (Coluche) 
Re: Does SSL actually work with nnrpd INN2.5-RC2?
#81116
Author: Etian
Date: Fri, 29 May 2009 12:29
65 lines
3600 bytes
Julien ÉLIE wrote:
> Hi Etian,
> 
>> /usr/local/inn/bin/nnrpd -D -p 563 -S
>> And it starts without error, but when I try to SSH to port 563
> 
> In order to test, you should use something like:
> 
> openssl s_client -connect your.news.server.com:563
> 
> 
>> the connection is instantly cut off, and I find this in the logs:
>> error initializing TLS: [CA_file: ] [CA_path: ] [cert_file: 
>> /usr/local/inn/lib/cert.pem] [key_file: /usr/local/inn/lib/key.pem]
> 
> It shows that you did not parameter inn.conf.
> I for one use:
> 
> tlscertfile:            /home/news/lib/cert.pem
> tlskeyfile:             /home/news/lib/key.pem
> tlscapath:              /home/news/lib
> #tlscafile:             /home/news/lib/cert.pem
> 
> (after having generated the certificates with "make cert")
> 
>    http://www.eyrie.org/~eagle/software/inn/docs/inn.conf.html
> 
> 
> 
>> I had created the certificate first with 'make cert', and got the 
>> error message. I made the certificates over again meticulously 
>> following the directions in man nnrpd from the openssl command line, 
>> plus chmod'ing and chown'ing. And I got the same error.
> 
> I think we forgot to explain in the "TLS SUPPORT" section of the nnrpd
> man page that inn.conf should also be updated, and INN restarted.
> Thanks for having seen that!
> 
> CHECKLIST and INSTALL are not more verbose at all on that bit of
> configuration...
> 
> 
>> bad ownership or permissions on private key 
>> "/usr/local/inn/lib/cert.pem': private key must be mode 600 and owned 
>> by uid 9
>> error initializing TLS: [CA_file: /usr/local/inn/lib/cert.pem] 
>> [CA_path: /usr/local/inn/lib] [cert_file: /usr/local/inn/lib/cert.pem] 
>> [key_file: /usr/local/inn/lib/key.pem]
>>
>> I've checked and double-checked the mode and ownership of cert.pem, 
>> and it is as it should be.
> 
> I have:
> 
> % ll lib/*.pem
> -rw-r----- 1 news news 1,2K 2009-04-25 14:52 lib/cert.pem
> -rw------- 1 news news  887 2009-04-25 14:52 lib/key.pem
> 
> But note that I do not define tlscafile in inn.conf; maybe it is the 
> problem
> you have (?)
> 
Yes, that solved it--nothing more than removing the tlscafile line, but 
keeping the tlscapath line (Those two lines are all that's not explained 
in the documentation.  It's intuitive to update inn.conf and restart.)
Re: Does SSL actually work with nnrpd INN2.5-RC2?
#81426
Author: Julien ÉLIE
Date: Sat, 20 Jun 2009 14:08
29 lines
2387 bytes
Hi Etian,

>> It shows that you did not parameter inn.conf.
>> I for one use:
>>
>> tlscertfile:            /home/news/lib/cert.pem
>> tlskeyfile:             /home/news/lib/key.pem
>> tlscapath:              /home/news/lib
>> #tlscafile:             /home/news/lib/cert.pem
>>
>> (after having generated the certificates with "make cert")
>>
>> I think we forgot to explain in the "TLS SUPPORT" section of the nnrpd
>> man page that inn.conf should also be updated, and INN restarted.
>> Thanks for having seen that!
>> you have (?)
>
> Yes, that solved it--nothing more than removing the tlscafile line, but keeping the tlscapath line (Those two lines are all that's 
> not explained in the documentation.  It's intuitive to update inn.conf and restart.)

Fixed in INN 2.5.1.  The documentation has been improved and a default
value for tlscapath: has been added.  <pathetc> is now used instead of
<pathlib>.

-- 
Julien ÉLIE

« On ne va jamais si loin que lorsque l'on ne sait pas où l'on va. » 
Re: Does SSL actually work with nnrpd INN2.5-RC2?
#81432
Author: D. Stussy
Date: Sun, 21 Jun 2009 03:52
30 lines
2339 bytes
"Julien ÉLIE" <iulius@nom-de-mon-site.com.invalid> wrote in message
news:h1iqgc$tml$1@news.trigofacile.com...
> >> It shows that you did not parameter inn.conf.
> >> I for one use:
> >>
> >> tlscertfile:            /home/news/lib/cert.pem
> >> tlskeyfile:             /home/news/lib/key.pem
> >> tlscapath:              /home/news/lib
> >> #tlscafile:             /home/news/lib/cert.pem
> >>
> >> (after having generated the certificates with "make cert")
> >>
> >> I think we forgot to explain in the "TLS SUPPORT" section of the nnrpd
> >> man page that inn.conf should also be updated, and INN restarted.
> >> Thanks for having seen that!
> >> you have (?)
> >
> > Yes, that solved it--nothing more than removing the tlscafile line, but
keeping the tlscapath line (Those two lines are all that's
> > not explained in the documentation.  It's intuitive to update inn.conf
and restart.)
>
> Fixed in INN 2.5.1.  The documentation has been improved and a default
> value for tlscapath: has been added.  <pathetc> is now used instead of
> <pathlib>.

Do we yet have override values for these in "readers.conf" so one can
create virtual secured reading servers?

Re: Does SSL actually work with nnrpd INN2.5-RC2?
#81437
Author: Julien ÉLIE
Date: Sun, 21 Jun 2009 08:07
17 lines
1933 bytes
Hi D. Stussy,

>> Fixed in INN 2.5.1.  The documentation has been improved and a default
>> value for tlscapath: has been added.  <pathetc> is now used instead of
>> <pathlib>.
>
> Do we yet have override values for these in "readers.conf" so one can
> create virtual secured reading servers?

No, that's not readers based.  You should use certificates with subject
alternative names.

-- 
Julien ÉLIE

« Quand tu auras lu ces lignes, le papyrus s'autodétruira. » (Astérix) 
Re: Does SSL actually work with nnrpd INN2.5-RC2?
#81444
Author: Russ Allbery
Date: Sun, 21 Jun 2009 19:22
14 lines
1750 bytes
"D. Stussy" <spam@bde-arc.ampr.org> writes:

> Do we yet have override values for these in "readers.conf" so one can
> create virtual secured reading servers?

Ideally, clients would send the name of the host to which they're
connecting using the TLS extensions protocol so that nnrpd could present
the appropriate certificate, but I bet no clients support that.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: Does SSL actually work with nnrpd INN2.5-RC2?
#81445
Author: D. Stussy
Date: Sun, 21 Jun 2009 20:29
27 lines
2717 bytes
"Russ Allbery" <rra@stanford.edu> wrote in message
news:87skhtwfxa.fsf@windlord.stanford.edu...
> "D. Stussy" <spam@bde-arc.ampr.org> writes:
> > Do we yet have override values for these in "readers.conf" so one can
> > create virtual secured reading servers?
>
> Ideally, clients would send the name of the host to which they're
> connecting using the TLS extensions protocol so that nnrpd could present
> the appropriate certificate, but I bet no clients support that.

The way I'd be implementing it is that different virtual hosts would have
different IP addresses, so either there would be different "readers.conf"
files (with a global setting in each file indicating the certificates and
multiple NNRPDs), or one would have to place this into the access part of
the settings along with the localaddress directive (more difficult to
implement as there would be a single NNRPD process reading from
INADDR_ANY).  Therefore, this would be akin to the implementation in
Apache's SSL service for web servers.  Having two (or more) virtual hosts
sharing an IP doesn't work under SSL - where the encryption layer comes
before knowing which VH is being contacted.

However, I'm not sufficiently familar with SSL/TLS internal encoding to
even know where to start hacking the source.  Therefore, I can only pitch
the idea.  We do have non-encrypted virtual hosting, so this is the next
logical step.

Re: Does SSL actually work with nnrpd INN2.5-RC2?
#81449
Author: Jeffrey M. Vinocur
Date: Mon, 22 Jun 2009 04:50
21 lines
1926 bytes
In article <h1m56r$9n3$1@snarked.org>,
D. Stussy <replies@newsgroups.kd6lvw.ampr.org> wrote:
>
>The way I'd be implementing it is that different virtual hosts would have
>different IP addresses [...] this would be akin to the implementation in
>Apache's SSL service for web servers.  Having two (or more) virtual hosts
>sharing an IP doesn't work under SSL - where the encryption layer comes
>before knowing which VH is being contacted.

This was indeed the story with the original SSL.  However
subsequent revisions (as TLS) have included a method for
IP-independent encrypted virtual hosting (whereby the client
includes its intended destination hostname in the negotiation) to
resolve this issue.  

See RFC 4642, section 2.2.2, paragraph 7.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: Does SSL actually work with nnrpd INN2.5-RC2?
#81451
Author: D. Stussy
Date: Mon, 22 Jun 2009 06:27
25 lines
2244 bytes
"Jeffrey M. Vinocur" <jeff@litech.org> wrote in message
news:h1n2j8$7ig$1@puck.litech.org...
> In article <h1m56r$9n3$1@snarked.org>,
> D. Stussy <replies@newsgroups.kd6lvw.ampr.org> wrote:
> >
> >The way I'd be implementing it is that different virtual hosts would
have
> >different IP addresses [...] this would be akin to the implementation in
> >Apache's SSL service for web servers.  Having two (or more) virtual
hosts
> >sharing an IP doesn't work under SSL - where the encryption layer comes
> >before knowing which VH is being contacted.
>
> This was indeed the story with the original SSL.  However
> subsequent revisions (as TLS) have included a method for
> IP-independent encrypted virtual hosting (whereby the client
> includes its intended destination hostname in the negotiation) to
> resolve this issue.
>
> See RFC 4642, section 2.2.2, paragraph 7.

TLS isn't exactly the same - as it starts as an unencrypted session that is
promoted to encrypted.  An SSL session is encrypted from packet 1.

Re: Does SSL actually work with nnrpd INN2.5-RC2?
#81452
Author: Russ Allbery
Date: Mon, 22 Jun 2009 06:50
34 lines
2675 bytes
"D. Stussy" <spam@bde-arc.ampr.org> writes:
> "Jeffrey M. Vinocur" <jeff@litech.org> wrote:

>> This was indeed the story with the original SSL.  However subsequent
>> revisions (as TLS) have included a method for IP-independent
>> encrypted virtual hosting (whereby the client includes its intended
>> destination hostname in the negotiation) to resolve this issue.

>> See RFC 4642, section 2.2.2, paragraph 7.

> TLS isn't exactly the same - as it starts as an unencrypted session
> that is promoted to encrypted.  An SSL session is encrypted from
> packet 1.

TLS is just the name for the IETF-standardized version of SSL.  What
you're referring to is the difference between STARTTLS and TLS on a
separate port, but both mechanisms can use either TLS or SSL.
Sloppily-named configuration options in clients have unfortunately
confused this a great deal.  You're not the only one who makes that
mistake.

It is true that having the client specify the hostname is a TLS
extension and therefore requires TLS rather than SSLv2 or SSLv3, but you
can still do the encryption negotiation as the first traffic on the port
if you want.

Of course, per the general IETF direction and the NNTP standards, you
should use STARTTLS on port 119 instead.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: Does SSL actually work with nnrpd INN2.5-RC2?
#81458
Author: D. Stussy
Date: Mon, 22 Jun 2009 20:39
38 lines
3038 bytes
"Russ Allbery" <rra@stanford.edu> wrote in message
news:87hby892ym.fsf@windlord.stanford.edu...
> "D. Stussy" <spam@bde-arc.ampr.org> writes:
> > "Jeffrey M. Vinocur" <jeff@litech.org> wrote:
> >> This was indeed the story with the original SSL.  However subsequent
> >> revisions (as TLS) have included a method for IP-independent
> >> encrypted virtual hosting (whereby the client includes its intended
> >> destination hostname in the negotiation) to resolve this issue.
>
> >> See RFC 4642, section 2.2.2, paragraph 7.
>
> > TLS isn't exactly the same - as it starts as an unencrypted session
> > that is promoted to encrypted.  An SSL session is encrypted from
> > packet 1.
>
> TLS is just the name for the IETF-standardized version of SSL.  What
> you're referring to is the difference between STARTTLS and TLS on a
> separate port, but both mechanisms can use either TLS or SSL.
> Sloppily-named configuration options in clients have unfortunately
> confused this a great deal.  You're not the only one who makes that
> mistake.

Yes, I am used to starting a TLS session by issuing a command from an
unencrypted session vs. an SSL session which starts encrypted, because
that's how these terms are commonly used.

> It is true that having the client specify the hostname is a TLS
> extension and therefore requires TLS rather than SSLv2 or SSLv3, but you
> can still do the encryption negotiation as the first traffic on the port
> if you want.
>
> Of course, per the general IETF direction and the NNTP standards, you
> should use STARTTLS on port 119 instead.

Still, it would be nice of we could offer different certificates for
different IP/port combinations somehow.

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads