HTTPS信任SSL证书和自签名证书
songminzh / ymhttpstest Goto Github PK
View Code? Open in Web Editor NEWiOS https trust CA(Certificate Authority)
iOS https trust CA(Certificate Authority)
HTTPS信任SSL证书和自签名证书
请问这两个证书是怎么生成的?
如下:
2016-08-29 10:00:49.045 HttpsTest[1493:51322] *** Assertion failure in -ViewController connection:didReceiveAuthenticationChallenge:, /Users/issuser/Downloads/HttpsTest-master/HttpsTest/ViewController.m:65
2016-08-29 10:00:49.048 HttpsTest[1493:51322] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'caCert is nil'
*** First throw call stack:
(
0 CoreFoundation 0x0000000100abad85 exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010052edeb objc_exception_throw + 48
2 CoreFoundation 0x0000000100ababea +[NSException raise:format:arguments:] + 106
3 Foundation 0x0000000100178e1e -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 169
4 HttpsTest 0x000000010002521d -[ViewController connection:didReceiveAuthenticationChallenge:] + 1437
5 CFNetwork 0x0000000102c56a36 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke + 69
6 CFNetwork 0x0000000102c569da -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 199
7 CFNetwork 0x0000000102c56b2f -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 48
8 CFNetwork 0x0000000102c2a8c2 -[NSURLConnectionInternalConnection(Internal) sendCFChallenge:toSelector:] + 84
9 CFNetwork 0x0000000102ac526c ___ZN27URLConnectionClient_Classic51_delegate_willSendRequestForAuthenticationChallengeEP19_CFURLAuthChallenge_block_invoke + 731
10 CFNetwork 0x0000000102bb1d75 ___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 100
11 libdispatch.dylib 0x00000001032603eb _dispatch_client_callout + 8
12 libdispatch.dylib 0x000000010324248b _dispatch_block_invoke + 716
13 CFNetwork 0x0000000102aaa60a _ZN19RunloopBlockContext13_invoke_blockEPKvPv + 24
14 CoreFoundation 0x00000001009b3894 CFArrayApplyFunction + 68
15 CFNetwork 0x0000000102aaa503 _ZN19RunloopBlockContext7performEv + 137
16 CFNetwork 0x0000000102aaa3bc _ZN17MultiplexerSource7performEv + 282
17 CFNetwork 0x0000000102aaa1de _ZN17MultiplexerSource8_performEPv + 72
18 CoreFoundation 0x00000001009e0301 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
19 CoreFoundation 0x00000001009d622c __CFRunLoopDoSources0 + 556
20 CoreFoundation 0x00000001009d56e3 __CFRunLoopRun + 867
21 CoreFoundation 0x00000001009d50f8 CFRunLoopRunSpecific + 488
22 GraphicsServices 0x000000010433aad2 GSEventRunModal + 161
23 UIKit 0x0000000100f3cf09 UIApplicationMain + 171
24 HttpsTest 0x000000010002669f main + 111
25 libdyld.dylib 0x000000010329492d start + 1
26 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.