Tag: 自签名

与iOS 7.1持续集成 – 无法安装在服务器上链接的产品

我们一直在用Xcode 5.0运行CI一段时间没有问题。 现在iOS 7.1已经发布了,似乎安装CI产生的产品需要在https上,但似乎自签名的证书是可以的。 我已经切换到https(自签名)加载的机器人网页罚款,但是当你去安装产品从链接说,无法连接到服务器 尝试在http上安装它会导致错误Cannot install applications because the certificate for 'server' is not valid. 。 我是否必须获得适当的证书,或者我是否在自签名证书方面做错了什么?

如何在iOS 10中安装自签名证书

看来,苹果已经取消了信任在iOS 10中自签名的SSL证书的能力。 我创build了自己的自签名证书,并拥有一个使用我的证书签名的本地Web服务器。 我必须在iOS上安装我的证书以进行本地testing,因为我开发了一个需要信任我的证书的iOS应用程序。 我如何安装我的自签名证书?

Objective-C:在TLS TCP连接上清除由我们自己的PKI(根CA)签署的服务器证书

* 解决 * 我的问题是参考以下问题: Objective-C:如何用签名者的公钥validationSecCertificateRef? 我们有自己的PKI,所以我们信任自己的rootCA。 通过这个rootCA,我们签署了传递给个人服务器的证书。 现在我想连接iOS应用程序,并检查从服务器传递的证书是否与我们的CA签名。 我的应用程序应该能够使用由GCDAsyncSocketbuild立的TCP连接来连接到具有此证书的n台服务器 (可能使用零configuration服务)。 我有我的应用程序中的证书的公共部分,我想添加到我的“CertChain”,所以应用程序将信任他们连接。 我尝试了很多,但是我仍然无法通过SecTrustEvaluate(trust, &result); 有效的结果。 (我想在生产中使用它,所以请不要告诉我有关停用validation的任何事情) 我的证书: 在app:rootCA,oldServerCA(cer) 在服务器上(通过信任):homeServer,oldServer 我的证书链: 根CA签署的家庭服务器 oldServerCA签署了oldServer 我的代码部分: 添加更新 – (void)socket:(GCDAsyncSocket *)sock didConnectToHost:(NSString *)host port:(uint16_t)port; { // Configure SSL/TLS settings NSMutableDictionary *settings = [NSMutableDictionary dictionaryWithCapacity:3]; // Allow self-signed certificates [settings setObject:[NSNumber numberWithBool:YES] forKey:GCDAsyncSocketManuallyEvaluateTrust]; [sock startTLS:settings]; // get the certificates as data […]

使用自签名证书在iOS 9中制作HTTPS请求

我想使用自签名证书向自定义服务器发出HTTPS请求。 我正在使用NSURLConnection类和处理身份validation的挑战,但始终在控制台中收到错误消息: NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802) 那么方法“connection:didFailWithError:”被调用,出现以下错误: Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x150094100>, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802, NSErrorPeerCertificateChainKey=<CFArray 0x1500ddd90 [0x19f6dab68]>{type = immutable, count = 1, values = ( 0 : <cert(0x14e6fb370) s: […]

在iOS中,如何使用https在服务器上使用自签名证书连接到服务器?

我正在开发的iOS 5,真的不想使用un-ARCed代码,所以我select自己实现而不是使用AFNetworking。 这也可能是一个大问题,所以我把它分成两个小部分。 1)在iOS 5中使用https连接到服务器。我使用从“iOS 5 Programming Pushing the Limits”中提取的代码。 因为我正在为iOS 5开发,所以我不使用我的项目中的弃用方法。 “RNSecTrustEvaluateAsX509”是一种将证书重新评估为简单的X.509证书而不是SSL握手的一部分的方法。 – (void)connection:(NSURLConnection *)connection willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge { NSURLProtectionSpace *protSpace = challenge.protectionSpace; SecTrustRef trust = protSpace.serverTrust; SecTrustResultType result = kSecTrustResultFatalTrustFailure; OSStatus status = SecTrustEvaluate(trust, &result); if (status == errSecSuccess && result == kSecTrustResultRecoverableTrustFailure) { SecCertificateRef cert = SecTrustGetCertificateAtIndex(trust, 0); CFStringRef subject = SecCertificateCopySubjectSummary(cert); NSLog(@"Trying […]

如何使用iOS 7的NSURLSession接受自签名的SSL证书

我有以下代码(快速实施): func connection(connection: NSURLConnection, canAuthenticateAgainstProtectionSpace protectionSpace: NSURLProtectionSpace) -> Bool { return protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust } func connection(connection: NSURLConnection, didReceiveAuthenticationChallenge challenge: NSURLAuthenticationChallenge) { if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { if challenge.protectionSpace.host == "myDomain" { let credentials = NSURLCredential(forTrust: challenge.protectionSpace.serverTrust) challenge.sender.useCredential(credentials, forAuthenticationChallenge: challenge) } } challenge.sender.continueWithoutCredentialForAuthenticationChallenge(challenge) } 它在iOS 8.x中完美工作 , 但不起作用的iOS 7.x在iOS 7.x我有错误: NSURLConnection / CFURLConnection HTTP加载失败(kCFStreamErrorDomainSSL,-9813) 任何想法? […]

在WKWebView中允许未经validation的SSL证书

我试图在WKWebView for iOS 8中加载带有自签名证书的HTTPS URL,并且一直保持失败状态。 用于UIWebView的解决方法(使用NSUrlRequest的setAllowsAnyHTTPSCertificate)似乎不起作用。 有谁知道任何解决方法? 我不需要一个适用于AppStore的解决scheme,因为我只需要在开发阶段而不是在生产阶段访问自签名证书站点,但这对于开发和testing服务器实例来说确实是一个问题。 先谢谢你。