Skip to content

Commit 50515a4

Browse files
committed
Added the option to return multiple trusted certs
1 parent 7395aec commit 50515a4

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

Sources/SoundCloudAPI/SCSoundCloudAPI.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,9 @@ - (NXOAuth2TrustMode)oauthConnection:(NXOAuth2Connection *)connection trustModeF
262262
return (NXOAuth2TrustMode)[authentication trustModeForHostname:hostname];
263263
}
264264

265-
- (NSData *)oauthConnection:(NXOAuth2Connection *)connection trustedCertificateDERDataForHostname:(NSString *)hostname;
265+
- (NSArray *)oauthConnection:(NXOAuth2Connection *)connection trustedCertificatesDERDataForHostname:(NSString *)hostname;
266266
{
267-
return [authentication trustedCertificateDERDataForHostname:hostname];
267+
return [authentication trustedCertificatesDERDataForHostname:hostname];
268268
}
269269

270270

Sources/SoundCloudAPI/SCSoundCloudAPIAuthentication.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@
4747
- (void)authenticateWithUsername:(NSString *)username password:(NSString *)password;
4848

4949
- (NSInteger)trustModeForHostname:(NSString *)hostname;
50-
- (NSData *)trustedCertificateDERDataForHostname:(NSString *)hostname;
50+
- (NSArray *)trustedCertificatesDERDataForHostname:(NSString *)hostname;
5151

5252
@end

Sources/SoundCloudAPI/SCSoundCloudAPIAuthentication.m

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
@protocol SCSoundCloudAPIPrivateAuthenticationDelegate <NSObject, SCSoundCloudAPIAuthenticationDelegate>
4242

4343
- (NXOAuth2TrustMode)soundCloudAPITrustModeForHostname:(NSString *)hostname;
44-
- (NSData *)soundCloudAPITrustedCertificateDERDataForHostname:(NSString *)hostname;
44+
- (NSArray *)soundCloudAPITrustedCertificatesDERDataForHostname:(NSString *)hostname;
4545

4646
@end
4747

@@ -136,12 +136,12 @@ - (NSInteger)trustModeForHostname:(NSString *)hostname;
136136
return NXOAuth2TrustModeSystem;
137137
}
138138

139-
- (NSData *)trustedCertificateDERDataForHostname:(NSString *)hostname;
139+
- (NSArray *)trustedCertificatesDERDataForHostname:(NSString *)hostname;
140140
{
141-
if ([self.privateDelegate respondsToSelector:@selector(soundCloudAPITrustedCertificateDERDataForHostname:)]) {
142-
return [self.privateDelegate soundCloudAPITrustedCertificateDERDataForHostname:hostname];
141+
if ([self.privateDelegate respondsToSelector:@selector(soundCloudAPITrustedCertificatesDERDataForHostname:)]) {
142+
return [self.privateDelegate soundCloudAPITrustedCertificatesDERDataForHostname:hostname];
143143
}
144-
NSAssert(NO, @"You need to implement soundCloudAPITrustedCertificateDERDataForHostname: in the delegate if you specify NXOAuth2TrustModeSpecificCertificate");
144+
NSAssert(NO, @"You need to implement soundCloudAPITrustedCertificatesDERDataForHostname: in the delegate if you specify NXOAuth2TrustModeSpecificCertificate");
145145
return nil;
146146
}
147147

@@ -192,9 +192,9 @@ - (NXOAuth2TrustMode)oauthClient:(NXOAuth2Client *)client trustModeForTokenReque
192192
return [self trustModeForHostname:hostname];
193193
}
194194

195-
- (NSData *)oauthClient:(NXOAuth2Client *)client trustedCertificateDERDataForTokenRequestOnHostname:(NSString *)hostname;
195+
- (NSArray *)oauthClient:(NXOAuth2Client *)client trustedCertificatesDERDataForTokenRequestOnHostname:(NSString *)hostname;
196196
{
197-
return [self trustedCertificateDERDataForHostname:hostname];
197+
return [self trustedCertificatesDERDataForHostname:hostname];
198198
}
199199

200200

0 commit comments

Comments
 (0)