From 4d6a9f505eb276cd797e667200df6018efc5f911 Mon Sep 17 00:00:00 2001 From: Sebastien Pouliot Date: Mon, 12 Aug 2019 18:14:03 -0400 Subject: [PATCH] [foundation] Update for Xcode 11 beta 5 (#6754) --- src/Security/SecureTransport.cs | 14 +++++++++ src/foundation.cs | 33 +++++++++++++++++++--- tests/xtro-sharpie/Helpers.cs | 1 + tests/xtro-sharpie/iOS-Foundation.todo | 9 ------ tests/xtro-sharpie/iOS-Security.todo | 1 - tests/xtro-sharpie/macOS-Foundation.todo | 14 --------- tests/xtro-sharpie/macOS-Security.todo | 1 - tests/xtro-sharpie/tvOS-Foundation.todo | 9 ------ tests/xtro-sharpie/tvOS-Security.todo | 1 - tests/xtro-sharpie/watchOS-Foundation.todo | 9 ------ tests/xtro-sharpie/watchOS-Security.todo | 1 - 11 files changed, 44 insertions(+), 49 deletions(-) diff --git a/src/Security/SecureTransport.cs b/src/Security/SecureTransport.cs index b0d85829d9..eca4164a92 100644 --- a/src/Security/SecureTransport.cs +++ b/src/Security/SecureTransport.cs @@ -7,6 +7,10 @@ namespace Security { // Security.framework/Headers/SecureTransport.h // untyped enum + [Deprecated (PlatformName.MacOSX, 10,15, message: "Use 'TlsProtocolVersion' instead.")] + [Deprecated (PlatformName.iOS, 13,0, message: "Use 'TlsProtocolVersion' instead.")] + [Deprecated (PlatformName.WatchOS, 6,0, message: "Use 'TlsProtocolVersion' instead.")] + [Deprecated (PlatformName.TvOS, 13,0, message: "Use 'TlsProtocolVersion' instead.")] public enum SslProtocol { Unknown = 0, Ssl_3_0 = 2, @@ -28,6 +32,16 @@ namespace Security { All = 6, } + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + public enum TlsProtocolVersion : /* uint16_t */ ushort { + Tls10 = 769, + Tls11 = 770, + Tls12 = 771, + Tls13 = 772, + Dtls10 = 65279, + Dtls12 = 65277, + } + // subset of OSStatus (int) public enum SslStatus { Success = 0, // errSecSuccess in SecBase.h diff --git a/src/foundation.cs b/src/foundation.cs index bfc83f6d3d..6e8e5f36aa 100644 --- a/src/foundation.cs +++ b/src/foundation.cs @@ -5457,17 +5457,20 @@ namespace Foundation [Export ("eligibleForPrediction")] bool EligibleForPrediction { [Bind ("isEligibleForPrediction")] get; set; } - [Watch (5, 0), NoTV, NoMac, iOS (12, 0)] + [Watch (5, 0), NoTV, iOS (12, 0)] + [Mac (10,15)] [NullAllowed, Export ("persistentIdentifier")] string PersistentIdentifier { get; set; } - [Watch (5,0), NoTV, NoMac, iOS (12,0)] + [Watch (5,0), NoTV, iOS (12,0)] + [Mac (10,15)] [Static] [Async] [Export ("deleteSavedUserActivitiesWithPersistentIdentifiers:completionHandler:")] void DeleteSavedUserActivities (string[] persistentIdentifiers, Action handler); - [Watch (5,0), NoTV, NoMac, iOS (12,0)] + [Watch (5,0), NoTV, iOS (12,0)] + [Mac (10,15)] [Static] [Async] [Export ("deleteAllSavedUserActivitiesWithCompletionHandler:")] @@ -7420,12 +7423,28 @@ namespace Foundation [Export ("connectionProxyDictionary", ArgumentSemantic.Copy)] NSDictionary ConnectionProxyDictionary { get; set; } + [Deprecated (PlatformName.MacOSX, 10,15, message: "Use 'TlsMinimumSupportedProtocolVersion' instead.")] + [Deprecated (PlatformName.iOS, 13,0, message: "Use 'TlsMinimumSupportedProtocolVersion' instead.")] + [Deprecated (PlatformName.WatchOS, 6,0, message: "Use 'TlsMinimumSupportedProtocolVersion' instead.")] + [Deprecated (PlatformName.TvOS, 13,0, message: "Use 'TlsMinimumSupportedProtocolVersion' instead.")] [Export ("TLSMinimumSupportedProtocol")] SslProtocol TLSMinimumSupportedProtocol { get; set; } + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("TLSMinimumSupportedProtocolVersion", ArgumentSemantic.Assign)] + TlsProtocolVersion TlsMinimumSupportedProtocolVersion { get; set; } + + [Deprecated (PlatformName.MacOSX, 10,15, message: "Use 'TlsMaximumSupportedProtocolVersion' instead.")] + [Deprecated (PlatformName.iOS, 13,0, message: "Use 'TlsMaximumSupportedProtocolVersion' instead.")] + [Deprecated (PlatformName.WatchOS, 6,0, message: "Use 'TlsMaximumSupportedProtocolVersion' instead.")] + [Deprecated (PlatformName.TvOS, 13,0, message: "Use 'TlsMaximumSupportedProtocolVersion' instead.")] [Export ("TLSMaximumSupportedProtocol")] SslProtocol TLSMaximumSupportedProtocol { get; set; } - + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("TLSMaximumSupportedProtocolVersion", ArgumentSemantic.Assign)] + TlsProtocolVersion TlsMaximumSupportedProtocolVersion { get; set; } + [Export ("HTTPShouldUsePipelining")] bool HttpShouldUsePipelining { get; set; } @@ -11993,6 +12012,12 @@ namespace Foundation [iOS (11,0)] [Notification] NSString ThermalStateDidChangeNotification { get; } + +#region NSProcessInfoPlatform (NSProcessInfo) + [Watch (6, 0), TV (13, 0), Mac (10, 15), iOS (13, 0)] + [Export ("macCatalystApp")] + bool IsMacCatalystApplication { [Bind ("isMacCatalystApp")] get; } +#endregion } [NoWatch][NoTV][NoiOS] diff --git a/tests/xtro-sharpie/Helpers.cs b/tests/xtro-sharpie/Helpers.cs index 19ccfd333c..1482303820 100644 --- a/tests/xtro-sharpie/Helpers.cs +++ b/tests/xtro-sharpie/Helpers.cs @@ -43,6 +43,7 @@ namespace Extrospection { { "SecTrustResultType", "SecTrustResult" }, { "SKErrorCode", "SKError" }, { "SSReadingListErrorCode", "SSReadingListError" }, + { "tls_protocol_version_t", "TlsProtocolVersion" }, { "UIDataDetectorTypes", "UIDataDetectorType" }, { "UIControlEvents", "UIControlEvent" }, { "UITableViewCellAccessoryType", "UITableViewCellAccessory" }, diff --git a/tests/xtro-sharpie/iOS-Foundation.todo b/tests/xtro-sharpie/iOS-Foundation.todo index 329ac78267..3348f73b0b 100644 --- a/tests/xtro-sharpie/iOS-Foundation.todo +++ b/tests/xtro-sharpie/iOS-Foundation.todo @@ -28,12 +28,3 @@ !missing-selector! NSOrderedSet::orderedSetByApplyingDifference: not bound !missing-type! NSOrderedCollectionChange not bound !missing-type! NSOrderedCollectionDifference not bound -!deprecated-attribute-missing! NSURLSessionConfiguration::setTLSMinimumSupportedProtocol: missing a [Deprecated] attribute -!deprecated-attribute-missing! NSURLSessionConfiguration::TLSMaximumSupportedProtocol missing a [Deprecated] attribute -!deprecated-attribute-missing! NSURLSessionConfiguration::TLSMinimumSupportedProtocol missing a [Deprecated] attribute -!missing-selector! NSProcessInfo::isMacCatalystApp not bound -!missing-selector! NSURLSessionConfiguration::setTLSMaximumSupportedProtocolVersion: not bound -!missing-selector! NSURLSessionConfiguration::setTLSMinimumSupportedProtocolVersion: not bound -!missing-selector! NSURLSessionConfiguration::TLSMaximumSupportedProtocolVersion not bound -!missing-selector! NSURLSessionConfiguration::TLSMinimumSupportedProtocolVersion not bound -!deprecated-attribute-missing! NSURLSessionConfiguration::setTLSMaximumSupportedProtocol: missing a [Deprecated] attribute diff --git a/tests/xtro-sharpie/iOS-Security.todo b/tests/xtro-sharpie/iOS-Security.todo index fea6346536..d0010b5467 100644 --- a/tests/xtro-sharpie/iOS-Security.todo +++ b/tests/xtro-sharpie/iOS-Security.todo @@ -1,6 +1,5 @@ !missing-enum! tls_ciphersuite_group_t not bound !missing-enum! tls_ciphersuite_t not bound -!missing-enum! tls_protocol_version_t not bound !missing-field! kSecUseDataProtectionKeychain not bound !missing-field! kSecUseItemList not bound !missing-pinvoke! sec_identity_access_certificates is not bound diff --git a/tests/xtro-sharpie/macOS-Foundation.todo b/tests/xtro-sharpie/macOS-Foundation.todo index ecb48a34b7..3348f73b0b 100644 --- a/tests/xtro-sharpie/macOS-Foundation.todo +++ b/tests/xtro-sharpie/macOS-Foundation.todo @@ -28,17 +28,3 @@ !missing-selector! NSOrderedSet::orderedSetByApplyingDifference: not bound !missing-type! NSOrderedCollectionChange not bound !missing-type! NSOrderedCollectionDifference not bound -!deprecated-attribute-missing! NSURLSessionConfiguration::setTLSMaximumSupportedProtocol: missing a [Deprecated] attribute -!deprecated-attribute-missing! NSURLSessionConfiguration::setTLSMinimumSupportedProtocol: missing a [Deprecated] attribute -!deprecated-attribute-missing! NSURLSessionConfiguration::TLSMaximumSupportedProtocol missing a [Deprecated] attribute -!deprecated-attribute-missing! NSURLSessionConfiguration::TLSMinimumSupportedProtocol missing a [Deprecated] attribute -!missing-selector! +NSUserActivity::deleteAllSavedUserActivitiesWithCompletionHandler: not bound -!missing-selector! +NSUserActivity::deleteSavedUserActivitiesWithPersistentIdentifiers:completionHandler: not bound -!missing-selector! NSProcessInfo::isMacCatalystApp not bound -!missing-selector! NSURLSessionConfiguration::setTLSMaximumSupportedProtocolVersion: not bound -!missing-selector! NSURLSessionConfiguration::setTLSMinimumSupportedProtocolVersion: not bound -!missing-selector! NSURLSessionConfiguration::TLSMaximumSupportedProtocolVersion not bound -!missing-selector! NSURLSessionConfiguration::TLSMinimumSupportedProtocolVersion not bound -!missing-selector! NSUserActivity::persistentIdentifier not bound -!missing-selector! NSUserActivity::setPersistentIdentifier: not bound - diff --git a/tests/xtro-sharpie/macOS-Security.todo b/tests/xtro-sharpie/macOS-Security.todo index d959b894e1..8ba18f4238 100644 --- a/tests/xtro-sharpie/macOS-Security.todo +++ b/tests/xtro-sharpie/macOS-Security.todo @@ -1,6 +1,5 @@ !missing-enum! tls_ciphersuite_group_t not bound !missing-enum! tls_ciphersuite_t not bound -!missing-enum! tls_protocol_version_t not bound !missing-field! kSecPropertyTypeArray not bound !missing-field! kSecPropertyTypeNumber not bound !missing-field! kSecUseDataProtectionKeychain not bound diff --git a/tests/xtro-sharpie/tvOS-Foundation.todo b/tests/xtro-sharpie/tvOS-Foundation.todo index 9f45f2b0ef..3348f73b0b 100644 --- a/tests/xtro-sharpie/tvOS-Foundation.todo +++ b/tests/xtro-sharpie/tvOS-Foundation.todo @@ -28,12 +28,3 @@ !missing-selector! NSOrderedSet::orderedSetByApplyingDifference: not bound !missing-type! NSOrderedCollectionChange not bound !missing-type! NSOrderedCollectionDifference not bound -!deprecated-attribute-missing! NSURLSessionConfiguration::setTLSMaximumSupportedProtocol: missing a [Deprecated] attribute -!deprecated-attribute-missing! NSURLSessionConfiguration::setTLSMinimumSupportedProtocol: missing a [Deprecated] attribute -!deprecated-attribute-missing! NSURLSessionConfiguration::TLSMaximumSupportedProtocol missing a [Deprecated] attribute -!deprecated-attribute-missing! NSURLSessionConfiguration::TLSMinimumSupportedProtocol missing a [Deprecated] attribute -!missing-selector! NSProcessInfo::isMacCatalystApp not bound -!missing-selector! NSURLSessionConfiguration::setTLSMaximumSupportedProtocolVersion: not bound -!missing-selector! NSURLSessionConfiguration::setTLSMinimumSupportedProtocolVersion: not bound -!missing-selector! NSURLSessionConfiguration::TLSMaximumSupportedProtocolVersion not bound -!missing-selector! NSURLSessionConfiguration::TLSMinimumSupportedProtocolVersion not bound diff --git a/tests/xtro-sharpie/tvOS-Security.todo b/tests/xtro-sharpie/tvOS-Security.todo index f806274444..7f2671bca5 100644 --- a/tests/xtro-sharpie/tvOS-Security.todo +++ b/tests/xtro-sharpie/tvOS-Security.todo @@ -1,6 +1,5 @@ !missing-enum! tls_ciphersuite_group_t not bound !missing-enum! tls_ciphersuite_t not bound -!missing-enum! tls_protocol_version_t not bound !missing-field! kSecUseDataProtectionKeychain not bound !missing-field! kSecUseItemList not bound !missing-pinvoke! sec_identity_access_certificates is not bound diff --git a/tests/xtro-sharpie/watchOS-Foundation.todo b/tests/xtro-sharpie/watchOS-Foundation.todo index 9f45f2b0ef..3348f73b0b 100644 --- a/tests/xtro-sharpie/watchOS-Foundation.todo +++ b/tests/xtro-sharpie/watchOS-Foundation.todo @@ -28,12 +28,3 @@ !missing-selector! NSOrderedSet::orderedSetByApplyingDifference: not bound !missing-type! NSOrderedCollectionChange not bound !missing-type! NSOrderedCollectionDifference not bound -!deprecated-attribute-missing! NSURLSessionConfiguration::setTLSMaximumSupportedProtocol: missing a [Deprecated] attribute -!deprecated-attribute-missing! NSURLSessionConfiguration::setTLSMinimumSupportedProtocol: missing a [Deprecated] attribute -!deprecated-attribute-missing! NSURLSessionConfiguration::TLSMaximumSupportedProtocol missing a [Deprecated] attribute -!deprecated-attribute-missing! NSURLSessionConfiguration::TLSMinimumSupportedProtocol missing a [Deprecated] attribute -!missing-selector! NSProcessInfo::isMacCatalystApp not bound -!missing-selector! NSURLSessionConfiguration::setTLSMaximumSupportedProtocolVersion: not bound -!missing-selector! NSURLSessionConfiguration::setTLSMinimumSupportedProtocolVersion: not bound -!missing-selector! NSURLSessionConfiguration::TLSMaximumSupportedProtocolVersion not bound -!missing-selector! NSURLSessionConfiguration::TLSMinimumSupportedProtocolVersion not bound diff --git a/tests/xtro-sharpie/watchOS-Security.todo b/tests/xtro-sharpie/watchOS-Security.todo index f806274444..7f2671bca5 100644 --- a/tests/xtro-sharpie/watchOS-Security.todo +++ b/tests/xtro-sharpie/watchOS-Security.todo @@ -1,6 +1,5 @@ !missing-enum! tls_ciphersuite_group_t not bound !missing-enum! tls_ciphersuite_t not bound -!missing-enum! tls_protocol_version_t not bound !missing-field! kSecUseDataProtectionKeychain not bound !missing-field! kSecUseItemList not bound !missing-pinvoke! sec_identity_access_certificates is not bound