Copied the necessary Google Toolbox source files into the MYUtilities project, so people don't have to download a separate library.
5 // Created by Jens Alfke on 5/14/08.
6 // Copyright 2008 Jens Alfke. All rights reserved.
9 #import <Foundation/Foundation.h>
11 #include <CFNetwork/CFSocketStream.h>
13 #import <CoreServices/CoreServices.h>
18 #define kTCPPropertySSLCertificates ((NSString*)kCFStreamSSLCertificates)
19 #define kTCPPropertySSLAllowsAnyRoot ((NSString*)kCFStreamSSLAllowsAnyRoot)
21 extern NSString* const kTCPPropertySSLClientSideAuthentication; // value is TCPAuthenticate enum
23 kTCPNeverAuthenticate, /* skip client authentication */
24 kTCPAlwaysAuthenticate, /* require it */
25 kTCPTryAuthenticate /* try to authenticate, but not error if client has no cert */
26 } TCPAuthenticate; // these MUST have same values as SSLAuthenticate enum in SecureTransport.h!
29 /** Abstract base class of TCPConnection and TCPListener.
30 Mostly just manages the SSL properties. */
31 @interface TCPEndpoint : NSObject
33 NSMutableDictionary *_sslProperties;
37 /** The desired security level. Use the security level constants from NSStream.h,
38 such as NSStreamSocketSecurityLevelNegotiatedSSL. */
39 @property (copy) NSString *securityLevel;
41 /** Detailed SSL settings. This is the same as CFStream's kCFStreamPropertySSLSettings
43 @property (copy) NSMutableDictionary *SSLProperties;
45 /** Shortcut to set a single SSL property. */
46 - (void) setSSLProperty: (id)value
47 forKey: (NSString*)key;
50 - (void) tellDelegate: (SEL)selector withObject: (id)param;