willia4 / wsdl2objc

Automatically exported from code.google.com/p/wsdl2objc
MIT License
1 stars 0 forks source link

2-way SSL and self-signed certificates support #101

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have added support for 2-way SSL (client certificate authentication) and 
usage of self-signed certificates in my fork of the project.

You can find the commit here:
http://github.com/pmilosev/wsdl2objc/commit/b668fb755b5888a133cf4f02cd5c3ffe5987
472d

Little bit of background:
I have removed the username/password settings and added 
authenticationProperties dictionary instead.
- For basic authentication:
   Set the username/password into the dictionary.

- For client certificate authentication:
   Create a valid SecIdentityRef and matching SecCertificateRef  (usually by importing a p12 file using the method SecPKCS12Import).
   Provide the client identity and certificate under the corresponding key into the dictionary.
   Provide YES into the dictionary for key NSURLAuthenticationMethodClientCertificate

- For self-signed server certificate:
   Provide YES into the dictionary for NSURLAuthenticationMethodServerTrust, so that the server cert is not validated automatically against the trusted authorities in keychain.
   Provide your anchor certificates (the server certificate or the CA by which it was created) into the dictionary.
   Provide NO for SecTrustSetAnchorCertificatesOnly if you would like to trust certificates signed by trusted authorities or YES if you would like to trust only your anchor certificates. 

I hope this will save a lot of effort and time
regards

Original issue reported on code.google.com by pmilosev on 14 Jun 2010 at 5:50

GoogleCodeExporter commented 9 years ago

Original comment by pmilosev on 2 Mar 2011 at 3:12

GoogleCodeExporter commented 9 years ago
Merged into:
/branches/nca

Hopefully will go into /trunk soon.

Original comment by pmilosev on 5 Mar 2011 at 12:43