使用inetc发送https请求 [英] sending https request using inetc

查看:206
本文介绍了使用inetc发送https请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我尝试使用以下代码将一些POST数据发送到url:

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"

但是当URL在https中时,以下内容消息始终出现:

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

There was an error submitting information: SendRequest Error

我用http尝试过,它运行平稳。服务器php脚本除了回显POST变量外什么也不做。

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

在使用inetc处理https时我错过了什么吗?

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

谢谢

推荐答案

INetC应该使用 https URL上的SECURITY_FLAG_IGNORE_UNKNOWN_CA + SECURITY_FLAG_IGNORE_REVOCATION 标志,并且那里似乎存在某种身份验证重试代码,因此我不确定为什么它不起作用。

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.

还有其他未使用的标志,例如 SECURITY_FLAG_IGNORE_CERT_CN_INVALID ,也许您可​​以请求一个新的/ nosecurity开关此处 ...

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...

这篇关于使用inetc发送https请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆