Implement new PeerConnection certificate policy API in ObjC API

BUG=webrtc:7088

Review-Url: https://codereview.webrtc.org/2664233002
Cr-Commit-Position: refs/heads/master@{#16424}
This commit is contained in:
hnsl
2017-02-02 13:04:27 -08:00
committed by Commit bot
parent a5d94fff99
commit 6741516e18
2 changed files with 68 additions and 6 deletions

View File

@ -12,6 +12,11 @@
#import <WebRTC/RTCMacros.h>
typedef NS_ENUM(NSUInteger, RTCTlsCertPolicy) {
RTCTlsCertPolicySecure,
RTCTlsCertPolicyInsecureNoCheck
};
NS_ASSUME_NONNULL_BEGIN
RTC_EXPORT
@ -26,6 +31,11 @@ RTC_EXPORT
/** Credential to use if this RTCIceServer object is a TURN server. */
@property(nonatomic, readonly, nullable) NSString *credential;
/**
* TLS certificate policy to use if this RTCIceServer object is a TURN server.
*/
@property(nonatomic, readonly) RTCTlsCertPolicy tlsCertPolicy;
- (nonnull instancetype)init NS_UNAVAILABLE;
/** Convenience initializer for a server with no authentication (e.g. STUN). */
@ -35,9 +45,18 @@ RTC_EXPORT
* Initialize an RTCIceServer with its associated URLs, optional username,
* optional credential, and credentialType.
*/
- (instancetype)initWithURLStrings:(NSArray<NSString *> *)urlStrings
username:(nullable NSString *)username
credential:(nullable NSString *)credential;
/**
* Initialize an RTCIceServer with its associated URLs, optional username,
* optional credential, and TLS cert policy.
*/
- (instancetype)initWithURLStrings:(NSArray<NSString *> *)urlStrings
username:(nullable NSString *)username
credential:(nullable NSString *)credential
tlsCertPolicy:(RTCTlsCertPolicy)tlsCertPolicy
NS_DESIGNATED_INITIALIZER;
@end