<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>23213</bug_id>
          
          <creation_ts>2003-06-21 01:05 0000</creation_ts>
          <short_desc>RSA blinding patch for stunnel breaks client mode</short_desc>
          <delta_ts>2003-10-28 06:55:39 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Applications</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          <bug_file_loc>http://forums.gentoo.org/viewtopic.php?t=61894</bug_file_loc>
          
          
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>yem@y3m.net</reporter>
          <assigned_to>aliz@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>yem@y3m.net</who>
            <bug_when>2003-06-21 01:05:06 0000</bug_when>
            <thetext>The blinding patch on stunnel tries to get the private key in order to
determine whether it is an RSA key and therefore RSA blinding is required.

The problem is that when stunnel is run in client mode, the key/cert is
optional. Stunnel dies because it can&apos;t access the key.

The workaround is to create a client key/cert PEM file and tell stunnel to
use that file (with the -p option or in stunnel.conf) whenever you use
stunnel in client mode.

I&apos;ve attached a diff against the gentoo 3.22 blinding patch
(/usr/portage/net-misc/stunnel/files/stunnel-3.22-blinding.patch)

With this patch, blinding won&apos;t be turned on if a client key/cert
is not being used. Is this acceptable?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>yem@y3m.net</who>
            <bug_when>2003-06-21 01:06:23 0000</bug_when>
            <thetext>Created an attachment (id=13629)
Allow stunnel to be used in client mode without a client cert
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>aliz@gentoo.org</who>
            <bug_when>2003-06-28 15:18:39 0000</bug_when>
            <thetext>patch added to 3.24, please test and let me know how it works so I can unmask it. </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>yem@y3m.net</who>
            <bug_when>2003-06-28 15:47:04 0000</bug_when>
            <thetext>Yes, 3.24 with the patch works as expected.

I was just hoping some SSL expert could confirm that blinding is ONLY required for server mode or in client mode (with an RSA key/cert for auth).

Thanks.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>aliz@gentoo.org</who>
            <bug_when>2003-07-02 13:28:58 0000</bug_when>
            <thetext>Zach, I saw that Brian CCed you in his last mail. I&apos;ve commited 3.24-r1 without your 
blinding patch, could you try that one too? </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>yem@y3m.net</who>
            <bug_when>2003-07-03 01:20:31 0000</bug_when>
            <thetext>Yes, stunnel-3.24-r1 works correctly. The blinding patch is no longer required.

stunnel -f -c -D info -P none -r www.microsoft.com:443
2003.07.03 20:19:36 LOG5[17177:16384]: Using &apos;www.microsoft.com.443&apos; as tcpwrapper service name
2003.07.03 20:19:36 LOG6[17177:16384]: PRNG seeded successfully
2003.07.03 20:19:36 LOG5[17177:16384]: stunnel 3.24 on i686-pc-linux-gnu PTHREAD+LIBWRAP with OpenSSL 0.9.6i Feb 19 2003
2003.07.03 20:19:37 LOG6[17177:16384]: Negotiated ciphers: RC4-MD5                 SSLv3 Kx=RSA      Au=RSA  Enc=RC4(128)  Mac=MD5
HEAD / HTTP/1.0
Host: www.microsoft.com
 
HTTP/1.1 400 Bad Request
Content-Length: 20
Content-Type: text/html
Date: Thu, 03 Jul 2003 08:20:07 GMT
Connection: close
 
2003.07.03 20:19:49 LOG5[17177:16384]: Connection closed: 41 bytes sent to SSL, 129 bytes sent to socket


Thanks to Brian for clarifying.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>aliz@gentoo.org</who>
            <bug_when>2003-10-28 06:55:39 0000</bug_when>
            <thetext>Closing</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>13629</attachid>
            <date>2003-06-21 01:06 0000</date>
            <desc>Allow stunnel to be used in client mode without a client cert</desc>
            <filename>stunnel-3.22-blinding.patch.diff</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIHN0dW5uZWwtMy4yMi1ibGluZGluZy5wYXRjaAkyMDAzLTA2LTIxIDIwOjAxOjEwLjAwMDAw
MDAwMCArMTIwMAorKysgc3R1bm5lbC0zLjIyLWJsaW5kaW5nLnBhdGNoLQkyMDAzLTA2LTIxIDIw
OjAxOjUxLjAwMDAwMDAwMCArMTIwMApAQCAtNDQsNyArNDQsNyBAQAogKyAgICAgICB9IGVsc2Ug
ewogKyAgICAgICAgICAgbG9nKExPR19ERUJVRywgIlByaXZhdGUga2V5IGlzIG5vdCBSU0EsIG5v
IGJsaW5kaW5nIG5lZWRlZCIpOwogKyAgICAgICB9Ci0rICAgICB9IGVsc2UgeworKyAgICAgfSBl
bHNlIGlmIChzc2wtPnR5cGUgPT0gU1NMX1NUX0FDQ0VQVCkgewogKyAgICAgICBsb2coTE9HX0VS
UiwgIlVuYWJsZSB0byBnZXQgYWNjZXNzIHRvIHRoZSBTU0wgcHJpdmF0ZSBrZXkuIik7CiArICAg
ICAgIHNzbGVycm9yKCJTU0xfZ2V0X3ByaXZhdGVrZXkiKTsKICsgICAgICAgZXhpdCgxKTsK
</data>        

          </attachment>
    </bug>

</bugzilla>