sending https request using inetc

时光怂恿深爱的人放手 提交于 2019-12-13 00:20:04

问题


So I tried to send some POST data to an url using this code:

StrCpy $PostStr "a=input1&c=input2"
inetc::post $PostStr "https://url/index.php" "$INSTDIR\result.html" /END

Pop $0
StrCmpS $0 "OK" success failedToSubmit
failedToSubmit:
  MessageBox MB_OK|MB_ICONEXCLAMATION "There was an error submitting information: $0"
Abort

success:
  MessageBox MB_OK|MB_ICONINFORMATION "Your information was successfully received"

but when the url is in https, the following message always appeared:

There was an error submitting information: SendRequest Error

I tried this with http, and it run smoothly. The server php script does nothing but echo the POST variable.

Have I missed something in dealing with the https with inetc?

Thanks


回答1:


INetC should be using the SECURITY_FLAG_IGNORE_UNKNOWN_CA + SECURITY_FLAG_IGNORE_REVOCATION flags on https URLs and there seems to be some kind of auth retry code in there so I'm not sure why it is not working.

There are other flags like SECURITY_FLAG_IGNORE_CERT_CN_INVALID that it is not using, maybe you could request a new /nosecurity switch here...



来源:https://stackoverflow.com/questions/23467843/sending-https-request-using-inetc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!