[ObjC] AFNetworking pinnedCertificates API usage fix (#4143)

* Fixed afnetworking API usage: pinnedCertificates now declared as NSSet, not as NSArray

* Petstore updated
This commit is contained in:
wing328 2016-11-15 16:10:19 +08:00 committed by GitHub
commit 07bec36deb
4 changed files with 4 additions and 4 deletions

View File

@ -483,7 +483,7 @@ static NSString * {{classPrefix}}__fileNameForResponse(NSURLResponse *response)
if (config.sslCaCert) {
NSData *certData = [NSData dataWithContentsOfFile:config.sslCaCert];
[securityPolicy setPinnedCertificates:@[certData]];
[securityPolicy setPinnedCertificates:[NSSet setWithObject:certData]];
}
if (config.verifySSL) {

View File

@ -30,7 +30,7 @@ Pod::Spec.new do |s|
s.public_header_files = '{{podName}}/**/*.h'
{{#useCoreData}} s.resources = '{{podName}}/**/*.{xcdatamodeld,xcdatamodel}'{{/useCoreData}}
s.dependency 'AFNetworking', '~> 3'
s.dependency 'AFNetworking', '~> 3.1'
s.dependency 'JSONModel', '~> 1.4'
s.dependency 'ISO8601', '~> 0.5'
end

View File

@ -30,7 +30,7 @@ Pod::Spec.new do |s|
s.public_header_files = 'SwaggerClient/**/*.h'
s.dependency 'AFNetworking', '~> 3'
s.dependency 'AFNetworking', '~> 3.1'
s.dependency 'JSONModel', '~> 1.2'
s.dependency 'ISO8601', '~> 0.5'
end

View File

@ -483,7 +483,7 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) {
if (config.sslCaCert) {
NSData *certData = [NSData dataWithContentsOfFile:config.sslCaCert];
[securityPolicy setPinnedCertificates:@[certData]];
[securityPolicy setPinnedCertificates:[NSSet setWithObject:certData]];
}
if (config.verifySSL) {