Hi everyone.
I am working with 3rd party ssystem, that provides a web interface for their services. Have to use get/put/post for various things. Their examples use curl. I tested the connection on my system using curl. There is an error with the SSL certificate(s) apparently, as curl complains until I add the -k (--unsecure) option. That's fine, there is no private data, and everything will be inside a vpn. BUT. When I try to connect using RMNET, I get an error 7. When I check the NetGetError, the text is: "SSL peer certificate or SSH remote key was not OK". Fine. That's basically what curl said. So I tried the NetSSLVerifyPeer command to turn off the verify. Same error. (Note: The response-LEN is zero when doing the HttpGet)
Flow:
CALL "NetInit" GIVING AIMS-STATUS-CODE.
CALL "NetSSLVerifyPeer" USING 0 GIVING AIMS-STATUS-CODE.
CALL "HttpGet" USING
AIMS-URL
AIMS-RESPONSE-PTR
AIMS-RESPONSE-LEN
AIMS-EXTRA-HDRS
GIVING AIMS-STATUS-CODE.
CALL "NetGetError" USING
AIMS-RESPONSE-PTR
AIMS-RESPONSE-LEN
GIVING AIMS-RESPONSE-CODE-2.
Here's the curl command:
curl -k -X 'GET' \\
'192.168.198.11:9002/.../standardDataMap' \\
-H 'accept: application/json;charset=UTF-8' \\
-H 'api-key: DVIOsWOU.zLhLByGfmXfvsTaxkACbodSKEOMlMPqCKaj'
The output is basically a json string showing the data map that was requested.
Using 10.4.1, with -y librmnet64.so on the command line. ( I used "strings librmnet64.so | fgrep -i acu" to confirm the library is 10.4.1)
Note: I searched the community and found that entry where they had certificat problem but using NetSSLVerifyPeer fixed things. I was already trying that, but the entry is why I now use litarl 0 instead of a numeric variable with value of zero. No difference either way.
No idea what to check next. (Looking into getting the certificate issue fixed. I think it's a self-cert kind of thing. But it would be nice to get this working properly)