@@ -20,7 +20,7 @@ - (void)setStoreHost:(NSString *)aHost;
2020- (void )resizeContentDivE ;
2121- (void )webViewFrameChanged : (NSNotification *)aNotification ;
2222- (NSMutableDictionary *)hostCertificates ;
23- - (void )hostCertificates : (NSMutableDictionary *)aHostCertificates ;
23+ - (void )setHostCertificates : (NSMutableDictionary *)aHostCertificates ;
2424- (NSMapTable *)connectionsToRequests ;
2525- (void )setConnectionsToRequests : (NSMapTable *)aConnectionsToRequests ;
2626
@@ -44,7 +44,7 @@ - (id) init
4444 [self setDelegate: nil ];
4545 [self setStoreHost: nil ];
4646 [self setHostCertificates: [NSMutableDictionary dictionary ]];
47- #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8
47+ #if defined(MAC_OS_X_VERSION_10_8) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8
4848 [self setConnectionsToRequests: [NSMapTable strongToStrongObjectsMapTable ]];
4949#else
5050 [self setConnectionsToRequests: [NSMapTable mapTableWithStrongToStrongObjects ]];
@@ -373,6 +373,7 @@ - (BOOL)connection:(NSURLConnection *)connection canAuthenticateAgainstProtectio
373373
374374- (void )connection : (NSURLConnection *)connection didReceiveAuthenticationChallenge : (NSURLAuthenticationChallenge *)challenge ;
375375{
376+ #if defined(MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
376377 SecTrustRef trustRef = [[challenge protectionSpace ] serverTrust ];
377378 SecTrustResultType resultType;
378379 SecTrustEvaluate (trustRef, &resultType);
@@ -389,6 +390,7 @@ - (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallen
389390 NSURL *URL = [request URL ];
390391 NSString *host = [URL host ];
391392 [[self hostCertificates ] setObject: certificates forKey: host];
393+ #endif
392394}
393395
394396
0 commit comments