From 7cf2498becdb6ca94399c07b025888b4147e67b1 Mon Sep 17 00:00:00 2001 From: "thakis@chromium.org" Date: Thu, 20 Jun 2013 22:20:48 +0000 Subject: mac: Let net/ compile with the 10.9 sdk (while targeting 10.6). No intended behavior change. BUG=249803 Review URL: https://chromiumcodereview.appspot.com/17274012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207607 0039d316-1c4b-4281-b951-d872f2087c98 --- net/cert/cert_verify_proc_mac.cc | 7 +++---- net/http/http_auth_gssapi_posix.h | 10 ++++++++-- net/http/mock_gssapi_library_posix.h | 10 ++++++++-- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/net/cert/cert_verify_proc_mac.cc b/net/cert/cert_verify_proc_mac.cc index da284d4..b474fad 100644 --- a/net/cert/cert_verify_proc_mac.cc +++ b/net/cert/cert_verify_proc_mac.cc @@ -593,11 +593,10 @@ int CertVerifyProcMac::VerifyInternal( // the user has not explicitly set a trust setting) break; + // According to SecTrust.h, kSecTrustResultConfirm isn't returned on 10.5+, + // and it is marked deprecated in the 10.9 SDK. case kSecTrustResultDeny: - case kSecTrustResultConfirm: - // Certificate chain is explicitly untrusted. For kSecTrustResultConfirm, - // we're following what Secure Transport does and treating it as - // "deny". + // Certificate chain is explicitly untrusted. verify_result->cert_status |= CERT_STATUS_AUTHORITY_INVALID; break; diff --git a/net/http/http_auth_gssapi_posix.h b/net/http/http_auth_gssapi_posix.h index 44b99bc..afa50a0 100644 --- a/net/http/http_auth_gssapi_posix.h +++ b/net/http/http_auth_gssapi_posix.h @@ -5,8 +5,6 @@ #ifndef NET_HTTP_HTTP_AUTH_GSSAPI_POSIX_H_ #define NET_HTTP_HTTP_AUTH_GSSAPI_POSIX_H_ -#include - #include #include "base/gtest_prod_util.h" @@ -14,6 +12,14 @@ #include "net/base/net_export.h" #include "net/http/http_auth.h" +#if defined(OS_MACOSX) && defined(MAC_OS_X_VERSION_10_9) && \ + MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9 +// Including gssapi.h directly is deprecated in the 10.9 SDK. +#include +#else +#include +#endif + namespace net { // Mechanism OID for GSSAPI. We always use SPNEGO. diff --git a/net/http/mock_gssapi_library_posix.h b/net/http/mock_gssapi_library_posix.h index 659d7f1..d35f7f5 100644 --- a/net/http/mock_gssapi_library_posix.h +++ b/net/http/mock_gssapi_library_posix.h @@ -5,14 +5,20 @@ #ifndef NET_HTTP_MOCK_GSSAPI_LIBRARY_POSIX_H_ #define NET_HTTP_MOCK_GSSAPI_LIBRARY_POSIX_H_ -#include - #include #include #include "base/gtest_prod_util.h" #include "net/http/http_auth_gssapi_posix.h" +#if defined(OS_MACOSX) && defined(MAC_OS_X_VERSION_10_9) && \ + MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9 +// Including gssapi.h directly is deprecated in the 10.9 SDK. +#include +#else +#include +#endif + namespace net { namespace test { -- cgit v1.1