Diogo Real | 4f08543 | 2018-09-11 16:00:22 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright 2018 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #import <Foundation/Foundation.h> |
| 12 | |
| 13 | #import <WebRTC/RTCMacros.h> |
| 14 | |
| 15 | typedef NS_ENUM(NSUInteger, RTCTlsCertPolicy) { |
| 16 | RTCTlsCertPolicySecure, |
| 17 | RTCTlsCertPolicyInsecureNoCheck |
| 18 | }; |
| 19 | |
| 20 | NS_ASSUME_NONNULL_BEGIN |
| 21 | |
| 22 | RTC_EXPORT |
| 23 | @interface RTCSSLConfig : NSObject |
| 24 | |
| 25 | /** Indicates whether to enable OCSP stapling in TLS. */ |
| 26 | @property(nonatomic) BOOL enableOCSPStapling; |
| 27 | |
| 28 | /** Indicates whether to enable the signed certificate timestamp extension in TLS. */ |
| 29 | @property(nonatomic) BOOL enableSignedCertTimestamp; |
| 30 | |
| 31 | /** Indicates whether to enable the TLS Channel ID extension. */ |
| 32 | @property(nonatomic) BOOL enableTlsChannelId; |
| 33 | |
| 34 | /** Indicates whether to enable the TLS GREASE extension. */ |
| 35 | @property(nonatomic) BOOL enableGrease; |
| 36 | |
| 37 | /** Indicates how to process TURN server certificates */ |
| 38 | @property(nonatomic) RTCTlsCertPolicy tlsCertPolicy; |
| 39 | |
| 40 | /** Highest supported SSL version, as defined in the supported_versions TLS extension. */ |
| 41 | @property(nonatomic, nullable) NSNumber *maxSSLVersion; |
| 42 | |
| 43 | /** List of protocols to be used in the TLS ALPN extension. */ |
| 44 | @property(nonatomic, copy, nullable) NSArray<NSString *> *tlsALPNProtocols; |
| 45 | |
| 46 | /** |
| 47 | List of elliptic curves to be used in the TLS elliptic curves extension. |
| 48 | Only curve names supported by OpenSSL should be used (eg. "P-256","X25519"). |
| 49 | */ |
| 50 | @property(nonatomic, copy, nullable) NSArray<NSString *> *tlsEllipticCurves; |
| 51 | |
| 52 | - (instancetype)init; |
| 53 | |
| 54 | @end |
| 55 | |
| 56 | NS_ASSUME_NONNULL_END |