簡體   English   中英

什么是.NET(C#)的JSSE等價物?

[英]what is the JSSE equivalent for .NET (C#)?

我正在使用EntireX Broker 9.5.1開發應用程序。我正在嘗試轉換為tpcip連接以使用ssl。 由於Java / Software AG使用處理SSL / 驗證,我成功地升級了我的代碼以執行相同的操作。 但是,當連接到下的同一服務器/端口時,我收到以下錯誤:
02150403: Certificate expired or invalid

錯誤消息聽起來像是正在通信。 那么如何讓.Net成功驗證證書呢?

PS:證書由Verisign簽署。

更新:
IE和Firefox都成功連接到https://server.domain:port而不會丟失證書錯誤。 我的應用程序實際連接到ssl://server:port?verify_server=y
verify_server=n拋出相同的證書錯誤。

證書未過期。 來自異常的堆棧跟蹤在Broker.Logon();處停止Broker.Logon();

在SoftwareAG.EntireX.NETWrapper.Runtime.Broker.Logon(String password)
在C:\\ Users \\ tfburton \\ Documents \\ Visual Studio 2010 \\ Projects \\ NEW FADCOM \\ FAServer \\ EntireXDotNetClasses \\ EntireXWrapper.cs中的FAServer.EntireXDotNetClasses.EntireXWrapper.CreateBroker():第1302行

更新:
這是我如何創建我的Broker對象。

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

}

事實證明我正在咆哮錯誤的樹。

我不確定.NET是否具有JSSE的等價物。

我的解決方案變得更加簡單,在文本文件中合並根證書並添加

trust_store=path\to\file\myrrootcerts.pem

作為url aka的參數

BROKER-ID

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM