I'm using GCD AsyncSocket to create client application to connect to server java create by SSLServer Socket with self-sign certificate. With one way authentication, I can init SSL socket and communication well. But with two way authentication, I don't know how to implement it. At iOS client, I will have a client's certificate and server will trust client base on this certificate. I can read certificate from .p12 file well too. Many thanks to any advice.
GCDAsyncSocket two way authentication
1.3k Views Asked by duong dang At
1
There are 1 best solutions below
Related Questions in IOS
- Overlapping UICollectionView in storyboard
- Cannot pod spec lint because of undeclared type errors
- Is the transactionReceipt data present in dataWithContentsOfURL?
- UIWebView Screen Fitting Issue
- ZXingObjC encoding issues
- iOS: None of the valid provisioning profiles allowed the specific entitlements
- How to hide "Now playing url" in control center
- CloudKit: Preventing Duplicate Records
- Slow performance on ipad erasing image
- Swift code with multiple NSDateFormatter - optimization
- iOS 8.3 Safari crashes on input type=file
- TTTTimeIntervalFormatter always returns strings in English
- How do I add multiple in app purchases in Swift Spritekit?
- Setup code for xibs in iOS. -awakFromNb:
- iOS Voice Over only reads out the title of any alert views
Related Questions in SSL
- How to Fix TLS CBC Incorrect Padding Abuse Vulnerability on Windows 2003 Server
- SSL: Error parsing the certificate: Ok
- PHP mysqlnd sha256_password plugin "Access denied", user works from cli mysql
- CFNetwork SSLHandshake failed iOS 9
- Java does not accept 2 methods with same name
- Expected Compatibility Issues with upcoming TLS/SSL Cipher Suite update on Azure WebApps?
- python requests SSLError
- Connecting via mutual SSL fails reading incoming changeCipherSpec
- HTTP to HTTPS mapping using proxy servers
- Ruby on Windows XP: How to change directory of SSL certificates
- KeyStore file is not found in jar, although present in jar
- How do I accept a self-signed SSL certificate using iOS 7's NSURLSession
- Chef remote_file from https site with self signed certificate
- Meteor force-ssl on a staging system without ssl cert?
- Use python SSL to download google.com.au page
Related Questions in NETWORK-PROGRAMMING
- Packet drops in multicast when multiple instance of listner are running
- Get packet that's being routed
- Timing packets on a traffic server
- SNMP :snmpwalk response from NAS timeout issue
- Send Http request at specific time
- Swift - Get device's WIFI IP Address
- Construct and label a uniform graph in NetworkX using dictionaries?
- Diffie Hellman with authentication
- traversing a graph in spark-graphx via edge properties
- Setting proxy for java application
- Java sending handshake packets to minecraft server
- How to use different network interface for signaling & media in WebRTC app?
- Is it guaranteed that an RST packet will be sent when a process terminates?
- Does a process waiting on a network response take cpu/ram resources?
- Python socket stays blocked on socket.recv() when client expects data
Related Questions in MUTUAL-AUTHENTICATION
- Connecting via mutual SSL fails reading incoming changeCipherSpec
- weblogic - mutual authentication - read certificate from HTTP header
- two way security (multi-protocol)
- NGINX says "client sent no required SSL certificate while reading client request headers" how do we troubleshoot?
- How to avoid having keystore/trustore plain text password in code base?
- GCDAsyncSocket two way authentication
- How to do Mutual Authentication in C#?
- How to use private key on a PKCS#11 module instead of perivate key file for mutual-authentication in OpenSSL?
- Certificate Based Authentication Using Camel Jetty
- ACE SSL Error: peer did not return a certificate
- How do I configure jetty to listen on multiple ports for ssl connections: one with mutualAuth, one without
- Spring Webflux Security - authorized endpoint based on client certificate
- mTLS using Azure Function HTTP Trigger?
- Mutual Authentication(Two-Way TLS/SSL) with cloud residing KeyStores and TrustStores(Secret Manager) -Spring boot
- Does Azure Key Vault support Client Certificates?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
After many lucky process. It was resolved. With server andoird and client android follow in this tutorial : http://www.herongyang.com/JDK/SSL-Client-Authentication.html With 2 way authentication. Server will require client's certificate. You can call this at didConnectToHost delegate. NSMutableDictionary *sslSettings = [[NSMutableDictionary alloc] init];
At didReceiveTrust:(SecTrustRef)trust completionHandler:(void (^)(BOOL))completionHandler. Client will authenticate Server's certificate manual. You can get server's certificate with this code:
SecCertificateRef serverCertificate = SecTrustGetCertificateAtIndex(trust, 0);With self-sign certificate, you must add Server's certificate to keychain and check the Server's certificate with SecTrustEvaluate method. Or you can Compare server certificate and saved in this way: