Can someone please explain difference between these 2 properties? They accept same set of values defined in https://developer.apple.com/documentation/corefoundation/cfstream/cfstream_socket_security_level_constants
kCFStreamSSLLevel is set in kCFStreamPropertySSLSettings dictionary and kCFStreamPropertySocketSecurityLevel directly.
Documentation doesn't say much about any of them.
Looking at the source code, setting the property
kCFStreamPropertySocketSecurityLevelinternally just creates a dictionary where the property value is stored for the keykCFStreamSSLLeveland the created dictionary is passed to a function that is also called when the propertykCFStreamPropertySSLSettingsis set.So this code:
is equivalent to this code