如何建立 SSL 连接 (iphone)

发布于 2024-10-01 10:59:40 字数 160 浏览 1 评论 0原文

我正在制作一个需要金钱交易的应用程序...

为此我必须以安全的方式将 SOAP xml 发送到服务器...

我被告知我必须先创建 SSL 连接然后发送那条肥皂消息...

我非常了解 SOAP,但不知道 SSL 连接...

请提供一些帮助...

i am making an app in which there is a need of money transaction...

for this i have to send SOAP xml to server but in secure way....

i have been told that i have to create SSL connection first and then send that soap message.....

I know about SOAP very well but no idea about SSL connection...

please provide some help...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

美人迟暮 2024-10-08 10:59:40

查看苹果网站上的 NSURLConnection 文档: NSURLConnection

编辑:添加更多信息。

您需要设置身份验证。快速搜索 SO 产生以下结果:
NSURLConnection SSL HTTP 基本身份验证
HTTPS with NSURLConnection - NSURLErrorServerCertificateUntrusted

您需要设置服务器来处理身份验证,然后发出质询到设备。正如您在上面的帖子中看到的,有一个函数:didReceiveAuthenticationChallenge:
您需要使用它来处理身份验证挑战。您可以通过上述帖子了解如何进行操作。

您的服务器还需要设置为处理身份验证。我不知道你的服务器使用什么语言,但由于我使用 PHP,这里是有关身份验证的 PHP 手册链接:
PHP 身份验证

一开始是一件很棘手的事情,但是一旦你进入它还不错(并且创建更多 https 连接很容易)。然而,在这里写出您需要做的所有事情有点太多了。如果您浏览了这些帖子,您就可以大致了解如何进行操作。这需要一些工作才能完成。

Check out NSURLConnection docs on the apple site: NSURLConnection

EDIT: added more info.

You need to set up authentication. A quick search of SO produced these results:
NSURLConnection SSL HTTP Basic Auth and
HTTPS with NSURLConnection - NSURLErrorServerCertificateUntrusted

You need to set up your server to handle authentication, then issue a challenge to the device. As you can see in the above posts, there is a function: didReceiveAuthenticationChallenge:
You need to use this to handle authentication challenges. You can get a good idea of how to go about it using the above posts.

Your server needs to be set up to handle authentication, as well. I don't know what language you use with your server, but as I use PHP, here is the PHP manual link on authentication:
PHP authentication

It is a tricky thing to do at first, but once you get into it isn't bad (and creating more https connections comes easily). However, writing out everything you would need to do here is a bit much. If you scope out those posts, you can get a general idea about how to go about it. It'll take some working to get it done.

小草泠泠 2024-10-08 10:59:40

大多数情况下,这仅仅意味着您必须将数据发送到 HTTPS 端点。这也意味着客户端和服务器之间存在安全连接(自动为您完成),以便消息的有效负载(正文)被加密,而不是以明文形式传输(HTTP 就是这种情况)。

基本上,大多数时候,只需确保您使用的是 HTTPS 就足够了:)

看看 http: //en.wikipedia.org/wiki/Secure_Sockets_Layer

Most often this simply means that you have to send data to an HTTPS endpoint. What this also means is that there is a secure connection (done for you automatically) between the client and the server so that the payload (body) of the message is encrypted rather than transmitted in clear text (which is the case with HTTP).

Basically, most times, it is enough just to make sure you're using HTTPS :)

Have a look at http://en.wikipedia.org/wiki/Secure_Sockets_Layer

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文