Permalink
Browse files

Added support for disabling SSL validation.

  • Loading branch information...
1 parent b68988d commit 1607ce6c5a9e409a89d57ac93d68bbe93f23062a @nerdyc nerdyc committed Aug 13, 2011
@@ -156,4 +156,18 @@ - (void)setRequestTimeout:(NSTimeInterval)requestTimeout
[[self _httpRequest] setTimeOutSeconds:requestTimeout];
}
+// ===== VALIDATES SSL CERTIFICATES ====================================================================================
+#pragma mark -
+#pragma mark Validates SSL Certificates
+
+- (BOOL)validatesSSLCertificates
+{
+ return [[self _httpRequest] validatesSecureCertificate];
+}
+
+- (void)setValidatesSSLCertificates:(BOOL)validatesSSLCertificates
+{
+ [[self _httpRequest] setValidatesSecureCertificate:validatesSSLCertificates];
+}
+
@end
@@ -21,6 +21,7 @@
NSString * _password;
NSTimeInterval _requestTimeout;
+ BOOL _validatesSSLCertificates;
}
- (id)initWithURLString:(NSString *)URLString;
@@ -24,6 +24,7 @@ - (id)initWithURLString:(NSString *)URLString
_requestURLString = [URLString retain];
_requestMethod = (requestMethod ? [requestMethod retain] : [@"GET" retain]);
_requestTimeout = 60.0;
+ _validatesSSLCertificates = YES;
}
return self;
@@ -112,4 +113,10 @@ - (void)setUsername:(NSString *)username
@synthesize requestTimeout = _requestTimeout;
+// ===== VALIDATES SSL CERTIFICATES ====================================================================================
+#pragma mark -
+#pragma mark Validates SSL Certificates
+
+@synthesize validatesSSLCertificates = _validatesSSLCertificates;
+
@end
@@ -43,4 +43,8 @@
@property (nonatomic,assign) NSTimeInterval requestTimeout;
+// ===== VALIDATES SSL CERTIFICATES ====================================================================================
+
+@property (nonatomic,assign) BOOL validatesSSLCertificates;
+
@end

0 comments on commit 1607ce6

Please sign in to comment.