<font size=2 face="sans-serif">I changed from:</font>
<br><font size=2 face="Courier New"> public
static Stream TcpUpgrade(Stream tcpStream, SslOption sslOption)</font>
<br><font size=2 face="Courier New"> {</font>
<br><font size=2 face="Courier New">
SslHelper helper = new SslHelper(sslOption);</font>
<br><font size=2 face="Courier New">
SslStream sslStream = new SslStream(tcpStream, false,</font>
<br><font size=2 face="Courier New">
new RemoteCertificateValidationCallback(helper.CertificateValidationCallback),</font>
<br><font size=2 face="Courier New">
new LocalCertificateSelectionCallback(helper.CertificateSelectionCallback));</font>
<br>
<br><font size=2 face="Courier New">
sslStream.AuthenticateAsClient(sslOption.ServerName,</font>
<br><font size=2 face="Courier New">
sslOption.Certs,</font>
<br><font size=2 face="Courier New">
sslOption.Version,</font>
<br><font size=2 face="Courier New">
false);</font>
<br>
<br><font size=2 face="Courier New">
return sslStream;</font>
<br><font size=2 face="Courier New"> }</font>
<br><font size=2 face="sans-serif">to:</font>
<br><font size=2 face="Courier New"> public
static Stream TcpUpgrade(Stream tcpStream, SslOption sslOption)</font>
<br><font size=2 face="Courier New"> {</font>
<br><font size=2 face="Courier New">
SslHelper helper = new SslHelper(sslOption);</font>
<br><font size=2 face="Courier New">
SslStream sslStream = new SslStream(tcpStream, false,</font>
<br><font size=2 face="Courier New">
new RemoteCertificateValidationCallback(helper.CertificateValidationCallback),</font>
<br><font size=2 face="Courier New">
new LocalCertificateSelectionCallback(helper.CertificateSelectionCallback));</font>
<br>
<br><font size=2 face="Courier New">
if (sslOption.Certs == null || sslOption.Certs.Count == 0)</font>
<br><font size=2 face="Courier New">
{</font>
<br><font size=2 face="Courier New">
sslStream.AuthenticateAsClient(sslOption.ServerName);</font>
<br><font size=2 face="Courier New">
}</font>
<br><font size=2 face="Courier New">
else</font>
<br><font size=2 face="Courier New">
{</font>
<br><font size=2 face="Courier New">
sslStream.AuthenticateAsClient(sslOption.ServerName,</font>
<br><font size=2 face="Courier New">
sslOption.Certs,</font>
<br><font size=2 face="Courier New">
sslOption.Version,</font>
<br><font size=2 face="Courier New">
false);</font>
<br><font size=2 face="Courier New">
}</font>
<br>
<br><font size=2 face="Courier New">
return sslStream;</font>
<br><font size=2 face="Courier New"> }</font>
<br>
<br><font size=2 face="sans-serif">I don't know if this is the proper approach
but this will allow the call to sslStream.AuthenticateAsClient() to NOT
assert if no certs is present.</font>
<br>
<br><font size=2 face="sans-serif">Br,<br>
Michael </font>
<br>