🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #66091

Re: SSL and inn -- patch included *ATTN Russ*

#66091
From: cira
Date: Fri, 11 Jul 2003 16:03
53 lines
3477 bytes
cira wrote:

> *fiddles*
> 
> Ok.  couple of problems.  It looks like when you use seperate
> files for the private and public keys that nnrpd-ssl gets
> confused when logging problems about which key is which.
> It says "private key" but then it lists the file which holds
> the public key.  Changing permissions on the real private 
> key heals the situation.  Permissions of 640 on the private
> key is not acceptable to nnrpd-ssl
> 
> Wishlist item: nnrpd-ssl reports that the private key should
> have permissions 600 (or 400).  And that it should report the
> correct file.
> 
> notice:  it didn't matter wheather the public and the private
> keys where stored in the same file or in seperate files.  Only
> that the keys had the correct permissions.

Here is a patch that does what I proposed.

--- nnrpd/tls.c       2003-05-08 22:25:27.000000000 -0600
+++ nnrpd/tls.c.new     2003-07-11 09:51:26.000000000 -0600
@@ -415,13 +415,13 @@
 
        /* check ownership and permissions of key file */
        if (lstat(key_file, &buf) == -1) {
-           syslog(L_ERROR, "unable to stat private key '%s'", cert_file);
+           syslog(L_ERROR, "unable to stat private key '%s'", key_file);
            return (0);
        }
        if (!S_ISREG(buf.st_mode) || (buf.st_mode & 0077) != 0 ||
            buf.st_uid != getuid()) {
-           syslog(L_ERROR, "bad ownership or permissions on private key '%s'", 
-                 cert_file);
+           syslog(L_ERROR, "bad ownership or permissions on private key '%s'.  The private key must be mode 700 or less, and owned by user news.", 
+                 key_file);
            return (0);
        }

Oh, and I'd like to say thanks to Russ & Vincent for working
on inn so much, you guys are the best!

ps. I've never submitted a patch for anything before...
did i do it right?

cira
-- 
   .''`.          /\/'`\    sam_george@comcast.net
  : :' :        .::/:::::..    .  irc://fslc.usu.edu/#cira
  `. `'    ) .//::(:###( )::.._/^  gps:41°45'N 111°49'W
    `- ..:@://"  ,|)   _/.        gpg:1024D/A7AAF777
Technical Details
Message-ID: <IXWdnSwkH_NRQpOiXTWJkw@comcast.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.20140818.mbox.gz!news5.aus1.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!nntp.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail
References: <Wpidnf0j9pAgnJeiXTWJgQ@comcast.com> <bedifp$s6u$2@puck.litech.org> <jmGdndEiKvFGx5aiXTWJjA@comcast.com>

Show Full Headers
Complete Article Headers
Message-ID: <IXWdnSwkH_NRQpOiXTWJkw@comcast.com>
Subject: Re: SSL and inn -- patch included *ATTN Russ*
Date: Fri, 11 Jul 2003 10:03:22 -0600
From: cira <sam_george@comcast.net>
References: <Wpidnf0j9pAgnJeiXTWJgQ@comcast.com> <bedifp$s6u$2@puck.litech.org> <jmGdndEiKvFGx5aiXTWJjA@comcast.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.20140818.mbox.gz!news5.aus1.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!nntp.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail
NNTP-Posting-Date: Fri, 11 Jul 2003 11:03:23 -0500
Newsgroups: news.software.nntp
Organization: Family of George
User-Agent: KNode/0.7.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
Lines: 53
NNTP-Posting-Host: 12.255.11.89
X-Trace: sv3-fhOxol+E6bxSi6AliK/stsZagvY5leBzF0t/W7Ak7NsQnmXcm93NeYAlsyawiel8K1blVkQ7YcuQse1!uduA6aQOQGkcGD9mc/O727B1emgwRIVz0EOkTGFTtiEpkp/x4RZH3lsn2IM9
X-Complaints-To: abuse@comcast.net
X-DMCA-Complaints-To: dmca@comcast.net
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint
 properly
X-Postfilter: 1.1