avoid overriding of the property kCFStreamPropertySSLSettings #343

Open
wants to merge 1 commit into
from

Projects

None yet

3 participants

@tkanzakic

the call to the function

CFReadStreamSetProperty((CFReadStreamRef)[self readStream], kCFStreamPropertySSLSettings, sslProperties);

to set the client certificate was overriding the previous values of the property kCFStreamPropertySSLSettings set to ignore certificates validation

@tkanzakic tkanzakic Update Classes/ASIHTTPRequest.m
the call to the function

CFReadStreamSetProperty((CFReadStreamRef)[self readStream], kCFStreamPropertySSLSettings, sslProperties);

to set the client certificate was overriding the previous values of the property kCFStreamPropertySSLSettings set to ignore certificates validation
2df4582
@anivaros

Please, merge this critical pull request!

@jogu
Collaborator
jogu commented Mar 23, 2015

@anivaros There's generally not anybody left maintaining ASIHTTPRequest that actually uses it (and you really shouldn't be using it anymore unless you have a legacy huge project that just can't update to something more modern for some reason.)

I find the patch pretty difficult to read because of the white space changes (and because I'm tired).

Comments along the lines of "I have tested this code and it works. I have reviewed the code and it does not seem to have any potential to cause regressions." would be helpful.

Does the original problem only occur when certificate validation is disabled?

@anivaros
anivaros commented Mar 24, 2015 edited

unless you have a legacy huge project that just can't update to something more modern for some reason

It's my situation :)

I've tested this patch on own fork, and it works fine. Code seems to be ok too.
Problem occurs only on iOS simulator (I don't know why) when certificate validation is disabled, but I need to use simulator for autotesting my project.

A weak ago i've switched to CocoaPods and moved there ASIHttp too. You'll help me a lot by making new version of .podspec (1.8.3) with that fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment