Skip to content

Add Secure WebSockets (wss://) support #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
samsharp99 opened this issue Nov 28, 2019 · 4 comments
Closed

Add Secure WebSockets (wss://) support #2

samsharp99 opened this issue Nov 28, 2019 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@samsharp99
Copy link
Contributor

The current implementation of the library uses the native LabVIEW TCP/IP VIs which do not support TLS/SSL communications required for Secure WebSockets.

@samsharp99 samsharp99 added the enhancement New feature or request label Nov 28, 2019
@samsharp99 samsharp99 self-assigned this Nov 28, 2019
@samsharp99 samsharp99 added this to the LV2020 / NXG 4.0 Release milestone Nov 28, 2019
@samsharp99
Copy link
Contributor Author

The move to an OO-based Socket API was designed to allow wss:// support to be added by creating additional Socket classes that encapsulate the SSL/TLS layer.

Two methods have been investigated/prototyped so far:

  1. Using the .NET Secure Socket library - this would be for Windows targets only and the behaviour of the .NET Socket functions is not easily compatible with the native TCP/IP functions (e.g. timeouts).
  2. Wrapping the NI-provided OpenSSL implementation - some prototyping on this has been done and some WebSocket client support functionality has been implemented but was not fully debugged and difficult to implement (due to the number of different ways of using OpenSSL e.g. SSL / BIO functions) and wanting to use a non-blocking socket. The other approach for this would be to wrap the OpenSSL functions to make them more easily usable in LabVIEW but not much progress was made in this regard.

At NI Days Europe 2019 in November, NI announced that SSL/TLS support would be added to the TCP/IP palette in LabVIEW 2020.

The intention is to develop wss:// support using the LV2020 Beta and release in time for the full release of LabVIEW 2020.

@samsharp99
Copy link
Contributor Author

Initial experiments with the TLS/SSL support added to LabVIEW 2020 are promising but there are a number of small issues related to their timeout / error code behaviour.

I am intending to develop/release the TLS/SSL support as an addon package to allow continued support for older LabVIEW versions (>= LV2013) and the addon package will be for >=LV2020.

@samsharp99
Copy link
Contributor Author

Secure WebSockets Support has been added as an addon library for LabVIEW 2020. The package is available on GitHub at https://github.com/MediaMongrels-Ltd/LabVIEW-Secure-WebSockets-Addon

@Maddest
Copy link

Maddest commented Dec 23, 2020

I'm trying to setup a connection as a client to a public wss address, but it doesn't work. Do I need to select a certificate? And how do I get one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants