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:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user