LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HTTPS POST

Hi

 

I am not sur if I have understantd everything here. I want to do a simple HTTPS POST with the VI from the palette.

 

On the first page of the topic rolf you wrote that :

 

"The HTTP Cient VIs unter "Protocols/Data Communication/Http Client" in recent LabVIEW versions should be able to handle HTTPS just fine. You may have to add the according certificate to the connection before doing a request, if the site in question doesn't use a certificate that can be traced back to one of the preinstalled root certificates."

 

And it is exactly what I want to do

 

I have a certificate, I have followed these instruction to import it on my PC : http://windows.microsoft.com/en-us/windows/import-export-certificates-private-keys#1TC=windows-7

 

But when I put https in the url, the post VI give me this error :

 

Error 363507 occurred at LabVIEWHTTPClient.lvlib:POSTFile.vi:3390001

Possible reason(s):

LabVIEW:  LabVIEW could not verify the authenticity of the server.


Complete call chain:
     LabVIEWHTTPClient.lvlib:POSTFile.vi:3390001
     Untitled 3

 

Do you have an idea of what can be the problem?

 

Thank you in avdance

 

Kevin

0 Kudos
Message 21 of 25
(1,605 Views)
Is it a privately signed certificate, or one obtained from a verified/trusted certificate authority (e.g. verisign)?

The 'verify server' option of the config ssl VI is used to verify that the server you are communicating with is the server it says it is (e.g. to prevent against man in the middle attacks). To do this, you also need to specify the path to the certificate authority certificates so that they can be used to verify the data from the server.

If you just want to encrypt the data, but are not worried about interception, just turn off the 'verify server' option of config SSL.

LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 22 of 25
(1,590 Views)

The HTTPS VIs do not make use of the standard Windows certificate store. This is quite understandable since they need to work on other platforms than Windows too. They are implemented using an independent SSL library, either the OpenSSL library or another one that NI might have purchased a license for. You will need to import the certificate directly into the session through the use of the Securty->ConfigSSL VI.

Rolf Kalbermatter
My Blog
Message 23 of 25
(1,584 Views)

Thanks to both of you for your answer, Rolf, it was exactly what I was looking for

 

 

0 Kudos
Message 24 of 25
(1,570 Views)

@smercurio_fc wrote:

You'll need to search around on the net for an example on using .NET to do an HTTPS POST and then you should be able to duplicate the code in LabVIEW. A quick Google turned up this example: http://www.terminally-incoherent.com/blog/2008/05/05/send-a-https-post-request-with-c. Attached is a VI that tries to implement this, but I have no way of testing it, so you'll need to play around with it. 


This saved me so much trouble thank you, sorry I could only give one kudo.  That being said I do have an issue.  I have times when my request will get sent back an error code, and in the body of the response there will be details of the error.  What I am seeing is the LabVIEW error 1172 will be generated from the GetResponse Invoke Node with some details of what the error is.  But the GetResponse reference will be null in the response.  This means I can't read the body of the response to see the details of the error.

 

I know this is many years later, but is there a way to read the body of a response when there is an error?  Alternatively has there been any improvement in sending HTTPS Post, or Get requests?  I couldn't get the LabVIEW HTTP Client functions to work with the HTTPS address I was working with.  Thanks again.

0 Kudos
Message 25 of 25
(515 Views)