Skip to content

Commit

Permalink
Identity filtering: avoid infinite recursion properly (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
russellhancox authored Oct 21, 2020
1 parent 2cddbe5 commit ff9214a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion MOLAuthenticatingURLSession.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'MOLAuthenticatingURLSession'
s.version = '2.8'
s.version = '2.9'
s.platform = :osx
s.osx.deployment_target = '10.9'
s.license = { :type => 'Apache 2.0', :file => 'LICENSE' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,10 @@ - (SecIdentityRef)identityByFilteringArray:(NSArray *)array
return identityRef;
} else {
// Avoid infinite recursion from self-signed certs
if ((cert.commonName && [cert.commonName isEqual:cert.issuerCommonName]) &&
(cert.countryName && [cert.countryName isEqual:cert.issuerCountryName]) &&
(cert.orgName && [cert.orgName isEqual:cert.issuerOrgName]) &&
(cert.orgUnit && [cert.orgUnit isEqual:cert.issuerOrgUnit])) {
if ((!cert.commonName || [cert.commonName isEqual:cert.issuerCommonName]) &&
(!cert.countryName || [cert.countryName isEqual:cert.issuerCountryName]) &&
(!cert.orgName || [cert.orgName isEqual:cert.issuerOrgName]) &&
(!cert.orgUnit || [cert.orgUnit isEqual:cert.issuerOrgUnit])) {
continue;
}

Expand Down

0 comments on commit ff9214a

Please sign in to comment.