4

我正在使用EntireX Broker 9.5.1开发应用程序我正在尝试转换为 tpcip 连接以使用 ssl。来处理 SSL/证书验证,我成功地升级了我的代码来做同样的事情。下的同一服务器/端口时,出现以下错误:
02150403: Certificate expired or invalid

错误消息听起来像是在交流。那么如何让 .Net 成功验证证书呢?

PS: 证书由威瑞信签名。

更新:
IE 和 Firefox 都成功连接https://server.domain:port而不会引发证书错误。我的应用程序实际上正在连接到ssl://server:port?verify_server=y
verify_server=n抛出相同的证书错误。

证书未过期。异常的堆栈跟踪在Broker.Logon();.

在 SoftwareAG.EntireX.NETWrapper.Runtime.Broker.Logon(字符串密码)
在 C:\Users\tfburton\Documents\Visual Studio 2010\Projects\NEW FADCOM\FAServer\EntireXDotNetClasses\EntireXWrapper 的 FAServer.EntireXDotNetClasses.EntireXWrapper.CreateBroker() .cs:第 1302 行

更新:
这是我创建代理对象的方式。

try
{
  Broker mybroker;
  try { mybroker = new Broker(BrokerName, BrokerUser); }
  catch (Exception e)
  {
     Utilities.LogEntry("Error Creating broker instance -- BEFORE LOGON. ", e, true);

     throw new WrapperException("Error Creating broker instance -- BEFORE LOGON. "
                               + Environment.NewLine + e.Message);
  }
  try //{ mybroker.Logon(BrokerPass); }
  {
     mybroker.Password = BrokerPass;
     mybroker.Logon();  //<-- stracktrace points here
  }
  catch (AccessViolationException ave)
  {
     Utilities.LogEntry("Error During Broker Logon.", ave, 
                        EventLogEntryType.Error);

     throw new WrapperException(ave); //wrap and duck
  }
}
catch ( Exception e )
{   
   Utilities.LogEntry("Error Creating broker instance. ", e, true);

   XException be = e as XException; 
   if ( null != be  ) //<-- resolves to true
   {
      String msg = "Certificate error connecting to: " + BrokerName;

      throw new WrapperException(msg, e);
   }
   throw new WrapperException( "Error Creating broker instance. " 
                             + Environment.NewLine + e.Message);  //<-- error caught and re-thrown here

}
4

1 回答 1

2

原来我叫错了树。

我不确定.NET 是否有 JSSE 的等价物。

结果我的解决方案要简单得多,将根证书连接到文本文件中并添加

trust_store=path\to\file\myrrootcerts.pem

作为 url aka 的参数

BROKER-ID
于 2014-03-29T05:43:10.057 回答