Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timob 6715: iOS: validatesSecureCertificate parity #3054

Merged
merged 3 commits into from
Oct 2, 2012
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion apidoc/Titanium/Network/HTTPClient.yml
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ properties:

- name: validatesSecureCertificate
summary: Determines how SSL certification validation is performed on connection.
description: Note that on iOS, this value is always `false` by default. This is a known issue.
type: Boolean
default: |
False when running in the simulator or on device in testing mode, and true if built for
Expand Down
6 changes: 5 additions & 1 deletion iphone/Classes/TiNetworkHTTPClientProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ -(id)init
{
readyState = NetworkClientStateUnsent;
autoRedirect = [[NSNumber alloc] initWithBool:YES];
validatesSecureCertificate = [[NSNumber alloc] initWithBool:NO];
#if DEBUG
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#if defined(DEBUG) || defined(DEVELOPER). Also as per styling guidelines this must not be indented

validatesSecureCertificate = [[NSNumber alloc] initWithBool:NO];
#else
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No indent

validatesSecureCertificate = [[NSNumber alloc] initWithBool:YES];
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No indentation

}
return self;
}
Expand Down