LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble encrypting an http request to a webservice

I have a webservice client in Labview. Initially I used the .NET wrapper to communicate with the SOAP webservice. A year ago I switched to the native Labview HTTP library and got much better performance. After some tinkering I also got it to work through an HTTP proxy.

 

Soon the webservice will only accept requests over https and I have trouble implementing the encryption. The http library provides only one VI to encrypt the http connection: ConfigSSL.vi By using Fiddler as a proxy I can check whether the http VI ConfigSSL.vi is actually encrypting the data. I have tried a couple of things but have not managed to get the HTTP POST request to become encrypted.

 

I am pretty sure I am doing things wrong. Unfortunately I have not found meaningful information or examples on the subject yet. I need your help!

 

create an encrypted HTTP request.png

 

------------------------------------------------------------------------------------
Seriously concerned about the Labview subscription model
0 Kudos
Message 1 of 6
(4,036 Views)

Besides the fact that ConfigSSL doesn't encrypt, I suspect that adding the port number 443 after the host name doesn't work well either.

------------------------------------------------------------------------------------
Seriously concerned about the Labview subscription model
0 Kudos
Message 2 of 6
(4,014 Views)

After some further reading in the O'Reilly defintive HHTP guide, I came to the sad conclusion that the Labview HTTP toolkit can't possibly support proxies in combination with encryption.

 

Since the http headers become encrypted, the proxy can't possibly know where to forward the request to. Therefore the client must first issue a plaintext CONNECT request to the proxy. This should set up the SSL tunnel for the HTTP session. Since the http toolkit does not contain such a method it will not fly. 

 

Remains the attempt to encrypt the data using a direct connection. Anyone have an idea how to correctly wire ConfigSSL.vi?

------------------------------------------------------------------------------------
Seriously concerned about the Labview subscription model
0 Kudos
Message 3 of 6
(3,985 Views)

Hi aartjan,

 

Have you tried wiring a True constant to the verify server input of the Open Handle VI? You have the correct False constant wired to the ConfigureSSL VI's verify server input, which will allow for private certificates to be used. According to the Help, the OpenHandle VI input needs to be True to allow https communication.

 

 

Zach P.

Staff Software Engineer | LabVIEW R&D | National Instruments
0 Kudos
Message 4 of 6
(3,898 Views)

I have tried multiple things. Not sure whether I tried true on openhandle and false on configssl. The real issue is that I cannot use it in combination with a proxy. As this has become a requirement, I have to abandon this solution with the HTTP library. Smiley Mad

------------------------------------------------------------------------------------
Seriously concerned about the Labview subscription model
0 Kudos
Message 5 of 6
(3,883 Views)

From my understanding, I thought just specifying 'https' instead of 'http' in the URL is enough to get it to use SSL.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 6 of 6
(3,835 Views)