热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

使用HttpClient4通过WiFi进行HTTPS身份验证-HTTPSauthenticationoverWiFiusingHttpClient4

IhaveAndroidpet-projectDroidInwhichutilizesHttpClient4(builtintoAndroid)todosomeform

I have Android pet-project DroidIn which utilizes HttpClient 4 (built into Android) to do some form based authentication. I started noticing that people who are using WiFi are reporting connection problems. It also doesn't help that site I'm accessing has self-assigned certificate. Well - the question is (I'm quite vague on WiFi details) If WiFi at the hotspot doesn't support HTTPS would that be a good enough reason for connection to fail and is there anything that I can do beside proxying into another appserver using HTTP which then would call HTTPS site?

我有Android宠物项目DroidIn,它利用HttpClient 4(内置于Android)进行基于形式的身份验证。我开始注意到使用WiFi的人报告连接问题。它也无法帮助我访问的网站具有自我分配的证书。好吧 - 问题是(我对WiFi细节很模糊)如果热点上的WiFi不支持HTTPS,那么连接失败就足够了,除了代理到另一个应用服务器之外我还能做什么HTTP然后会调用HTTPS站点?

3 个解决方案

#1


wifi is just a low level protocol, you are dealing with HTTP & TCP/IP which is unaware of wifi. So you can ignore the fact that you are using wifi, just try to see if the server is accessible from the client side. (try a telnet on the https port which is 443 by default)

wifi只是一个低级协议,你正在处理不知道wifi的HTTP和TCP / IP。因此,您可以忽略使用wifi的事实,只是尝试查看服务器是否可以从客户端访问。 (在https端口上尝试使用telnet,默认为443)

#2


I have the same problem in my Air app. It's called Postal, a mail tracking app for Brazilian service. (I'd appreciate if you try it in wifi and feed me back). It always works on 2G/3G but rarely works when connected to wi-fi. Everything else works but AIR APPS! Sometimes it works, sometimes it doesnt in the same phone and/or access point. And when it's not working, any other AIR app is not working also.

我的Air应用程序中存在同样的问题。它被称为Postal,一个巴西服务的邮件跟踪应用程序。 (我很感激,如果你在wifi上尝试它并喂我回来)。它始终适用于2G / 3G,但在连接到Wi-Fi时很少有效。其他所有工作但AIR APPS!有时它可以工作,有时它不在同一个电话和/或接入点。当它无法正常工作时,任何其他AIR应用程序也无法正常工作。

Even the Tour de Flex Mobile AMF Remoting test app stops working.

甚至Tour de Flex Mobile AMF Remoting测试应用也停止工作。

Neither HTTPRequests or AMF Remoting works. It just gives Error 404 - Page not found.

HTTPRequests和AMF Remoting都不起作用。它只是给出错误404 - 找不到页面。

It's not a router thing because sometimes it works. I believe it's a problem in AIR when active network adapter changes it keeps trying to go through 2G/3G. It's something Adobe should take a look at.

它不是路由器的东西,因为它有时会起作用。我相信,当有源网络适配器发生变化时,它一直存在问题,它一直试图通过2G / 3G。这是Adobe应该关注的内容。

#3


The wifi could be blocking the 443 port - but I'd be surprised since https is a pretty commonly used protocol by standard users. It if were blocked that could be your problem. slmix's answer would detect that case - but since you aren't with the client it probably isn't practical to run that telnet (even if android supported it).

wifi可以阻止443端口 - 但我很惊讶,因为https是标准用户非常常用的协议。如果被阻止可能是你的问题。 slmix的答案会检测到这种情况 - 但由于你不在客户端,因此运行该telnet可能是不切实际的(即使android支持它)。


推荐阅读
author-avatar
森__林蘑菇
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有