cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP:POST secure connection to the remote host failed

fvestjens
Participant
0 Kudos
2,259

I created the following procedure:

CREATE OR REPLACE FUNCTION usr.MP_PostData( IN in_XML LONG VARCHAR)
RETURNS LONG VARCHAR
URL 'https://mpexport.astrata.eu/submit'
TYPE 'HTTP:POST:application/xml' 
SET 'HTTP(VERSION=1.1)'; 

I call this procedure in I-Sql passing the credentials in the XML.

In SQL Anywhere version 12 I get this error:

There was an error reading the results of the SQL statement.
The displayed results may be incorrect or incomplete.
The secure connection to the remote host failed: A certificate file must
be specified
SQLCODE=-990, ODBC 3 State="HY000"
Line 1, column 1

In SQL Anywhere 17 I get the following error:

Could not execute statement.
The secure connection to the remote host failed: The TLS handshake
failed, error code 0x2000051d
SQLCODE=-990, ODBC 3 State="HY000"
Line 1, column 1

However if I do the post with Postman everything is working fine and I get the result I expect.

What does Postman add or SQL Anywhere does not add in this situation?

Accepted Solutions (1)

Accepted Solutions (1)

VolkerBarth
Contributor

When using HTTPS, you have to specify the root certificate of the web server. Other web clients (like browsers) will usually use the OS certificate store by default and/or have a long builtin list of trusted publishers...

See that FAQ or the docs for details.

For v17, it may be enough to add

certificate 'file=*'

to the web client function declaration.

Answers (0)