通过ABAP发送HTTPS POST请求

时间:2019-04-23 14:48:12

标签: https sap abap

我正在尝试使用FM HTTP_POST或CL_HTTP_CLIENT类发送https发布请求,但是我还没有成功。

为了测试我的代码,我使用了https://ptsv2.com

当发布到HTTP时,一切正常,但是当我向HTTPS发送请求时,我得到了:

  • rfc目标SAPHTTP的“ OpenSSL不可用”。
  • “ rapc”默认目标的“ SapSSL错误:SSSLERR_SSL_CONNECT”- SAPHTTPA

我认为问题可能出在BASIS网站上,我已经尝试使用SM59 / STRUST做一些魔术,但是这些并没有改变,所以我可能只是在弄乱。

如果任何人有任何提示或示例代码(最好使用地址进行测试),我很乐意尝试一下:)

1 个答案:

答案 0 :(得分:2)

You need to install the server SSL certificate root CA with t-code STRUST into the PSE SSL Client (Anonymous). Also you need to know the exact handshake configuration with your server. If your server only supports TLS 1.2, your SAP system must have commoncryptolib (sapcryptolib) at least 8.431 and the profile parameter ssl/client_ciphersuites must be configured. You can check the commoncryptolib version with the program SSF02.

If you need to investigate in details, you can go to t-code SMICM. Configure the trace level as 2 (Goto -> Trace Level -> Set). Reset trace file (Goto -> Trace File -> Reset) for removing old logs. Run your program again and check trace file (Goto -> Trace File -> Display All).