Ti.Network.createHTTPClient SSL

时间:2013-07-02 20:28:37

标签: tidesdk

当我尝试将我的应用程序连接到我的apache sslv3服务器时,tidesdk报告:“SSL connect error”

var url = 'https://www.sipmeeting.com/';
var client = Ti.Network.createHTTPClient({
    onload: function(e) {
        //request complete do something with data
        //assuming that we are not working with XML
        alert('Response received '+this.responseText);
    },
    onerror: function(e) {
        //error received, do something
    }
});
client.open('GET',url,true);
client.send();

tidesdk sslv3兼容吗?其他网站打开正常,如https://mail.google.com/mail

感谢您的帮助!

- 约翰

1 个答案:

答案 0 :(得分:1)

如果有人在座位的边缘,我解决了这个问题。问题出在我的apache服务器上,我需要在我的apache ssl vhost中将ServerName设置为与我的SSL证书上的公用名相同。

要调试我打开了ssl调试:

ErrorLog /var/log/apache2/ssl_engine.log
LogLevel debug

当我输入

时,日志中没有显示任何内容
curl https://www.sipmeeting.com

但卷曲会返回:

server:~ john$ curl -v https://www.sipmeeting.com
* About to connect() to www.sipmeeting.com port 443 (#0)
*   Trying 208.126.100.54...
* connected
* Connected to www.sipmeeting.com (208.126.100.54) port 443 (#0)
* SSLv3, TLS handshake, Client hello (1):
* error:14077458:SSL routines:SSL23_GET_SERVER_HELLO:reason(1112)
* Closing connection #0
curl: (35) error:14077458:SSL routines:SSL23_GET_SERVER_HELLO:reason(1112)

但是当我将-3添加到curl命令时:I.E。

curl -v -3 https://www.sipmeeting.com

一切都显示出来。然后我推断出两个证书之间没有关联的东西,CN是最可能的。我改变了CN,它被修复了curl和tidesdk。

谢谢!

- 约翰