小编lon*_*tra的帖子

IOS相互认证

我正在尝试在IOS 5中实现相互身份验证,但我遇到了麻烦:

{NSUnderlyingError = "Error Domain=kCFErrorDomainCFNetwork Code=-1200 \"An SSL error has occurred and a secure connection to the server cannot be made.\" UserInfo=0x18d830 {NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., _kCFNetworkCFStreamSSLErrorOriginalValue=-9800, _kCFStreamPropertySSLClientCertificateState=0, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, NSErrorFailingURLStringKey=https://192.168.24.110:8081/t01.json, kCFStreamPropertySSLPeerTrust=<SecTrustRef: 0xceaa2d0>, NSErrorFailingURLKey=https://192.168.24.110:8081/t01.json}
Run Code Online (Sandbox Code Playgroud)

我为服务器生成密钥,证书和pkcs12(自签名或假冒CA我总是遇到这个问题)和客户端这样:

openssl genrsa -out client.key 1024
openssl req -new -key client.key -out client.csr

self-signed
openssl req -new -key ca.key -x509 -days 1095 -out ca.crt

CA signed
openssl …
Run Code Online (Sandbox Code Playgroud)

authentication openssl ios mutual-authentication

12
推荐指数
1
解决办法
3833
查看次数

ios Twitter API JSON解析

我正在尝试解析Twitter API收到的JSON字符串以获取用户时间线.我正在使用Jastor将JSON响应转换为目标c对象.一切正常,直到我尝试解析实体对象

entities = {
        hashtags =();
        media = (
                 {
                "display_url" = "pic.twitter.com/...";
                "expanded_url" = "http://...";
                id = ...;
                "id_str" = ...;
                indices =(
                    5,
                    25
                );
                "media_url" = "http://...";
                "media_url_https" = "https://...";
                sizes ={
                    large ={
                        h = 765;
                        resize = fit;
                        w = 1024;
                    };
                    medium ={
                        h = 448;
                        resize = fit;
                        w = 600;
                    };
                    small ={
                        h = 254;
                        resize = fit;
                        w = 340;
                    };
                    thumb ={
                        h = 150;
                        resize …
Run Code Online (Sandbox Code Playgroud)

twitter json ios

3
推荐指数
1
解决办法
1703
查看次数