Not logged in. · Lost password · Register
Forum: MatriX and XmppDotNet RSS
How to use TLS 1.2 from Matrix
Bhush.bhadane #1
Member since Sep 2022 · 6 posts · Location: India
Group memberships: Members
Show profile · Link to this post
Subject: Unable to connect to CISCO Finesse secure port 5223
We are trying to connect to CISCO finesse secure port 5223 using Matrix Library for Notifications. Using Pidgin it is working prfectly but from our application its not.

When we comare wireshark logs for both then we can see that Pidgin request using TLS1.2 where as Matrix request using TLSv1.
So as per the post in this forum we are setting the TLS12 explicitely but its still not working.

Here is the code:

  1. this.xmppClient.SetUsername(username);
  2. this.xmppClient.Password = password.ToUnsecureString();
  3. this.xmppClient.SetXmppDomain(domain);
  4. this.xmppClient.Port = 5223;
  5. this.xmppClient.OldStyleSsl = true;
  6. this.xmppClient.TlsProtocols = SslProtocols.Tls12;


Can you help us what we are missing here so that matrix will use the TLS 1.2
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Are you using the latest release of Matrix?

Alex
Bhush.bhadane #3
Member since Sep 2022 · 6 posts · Location: India
Group memberships: Members
Show profile · Link to this post
Using 2.1.0.5
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
This is not the latest. Please update and try again.
There was work done for direct TLS in the recent releases.

Alex
Bhush.bhadane #5
Member since Sep 2022 · 6 posts · Location: India
Group memberships: Members
Show profile · Link to this post
Where can I find the document related to direct TLS ?
Avatar
Alex #6
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
There is no specific document for this.
The code you posted above is correct.

In previous days it was called old style TLS/SSL when StartTLS was preferred. It became popular again now because compared to StartTLS it saves roundtrips and therefore setting up the stream is faster. And these days its called direct TLS. But its exactly the same.
We have not renamed the property in legacy Matrix.

Alex
Bhush.bhadane #7
Member since Sep 2022 · 6 posts · Location: India
Group memberships: Members
Show profile · Link to this post
Thank you Alex!

As suggested we will update to latest Nuget Package version 2.1.8 and will verify if its working.
Bhush.bhadane #8
Member since Sep 2022 · 6 posts · Location: India
Group memberships: Members
Show profile · Link to this post
Hi Alex,

We upgraded nuget to the latest 2.1.0.8.

After upgrading we are getting following error on XmppClient.Open()

System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
   at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
   at System.Windows.Forms.Form.ShowDialog()
   at Matrix.License.LicenseManager.CheckLicense()
   at Matrix.XmppStream.Open()
   at Matrix.Xmpp.Client.XmppClient.Open()

Do we need to update the License as well when we upgrade to latest MatriX nuget ?
If so can you please help.
Avatar
Alex #9
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I assume your license is not valid for the latest builds. Please get a demo license from here for your tests:
https://www.ag-software.net/matrix-xmpp-sdk/request-demo-l…

Alex
Bhush.bhadane #10
Member since Sep 2022 · 6 posts · Location: India
Group memberships: Members
Show profile · Link to this post
Hi Alex,
Thank you for reply.

Can we use this license on our production environment?
Avatar
Alex #11
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
demo licenses are valid for 30 days. You can use it to verify if it solves your problem. When you move that code to production then you must use a valid license, otherwise your production code will stop working after some days.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters: