| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_ANDROID_DUMMY_SPNEGO_AUTHENTICATOR_H_ | 5 #ifndef NET_ANDROID_DUMMY_SPNEGO_AUTHENTICATOR_H_ |
| 6 #define NET_ANDROID_DUMMY_SPNEGO_AUTHENTICATOR_H_ | 6 #define NET_ANDROID_DUMMY_SPNEGO_AUTHENTICATOR_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <cstdint> | 11 #include <cstdint> |
| 12 #include <list> | 12 #include <list> |
| 13 #include <string> | 13 #include <string> |
| 14 | 14 |
| 15 #include "base/android/scoped_java_ref.h" | 15 #include "base/android/scoped_java_ref.h" |
| 16 | 16 |
| 17 // Provides an interface for controlling the DummySpnegoAuthenticator service. | 17 // Provides an interface for controlling the DummySpnegoAuthenticator service. |
| 18 // This includes a basic stub of the Mock GSSAPI library, so that OS independent | 18 // This includes a basic stub of the Mock GSSAPI library, so that OS independent |
| 19 // Negotiate authentication tests can be run on Android. | 19 // Negotiate authentication tests can be run on Android. |
| 20 namespace net { | 20 namespace net { |
| 21 | 21 |
| 22 // These constant values are arbitrary, and different from the real GSSAPI | 22 // These constant values are arbitrary, and different from the real GSSAPI |
| 23 // values, but must match those used in DummySpnegoAuthenticator.java | 23 // values, but must match those used in DummySpnegoAuthenticator.java |
| 24 #define GSS_S_COMPLETE 0 | 24 #define GSS_S_COMPLETE 0 |
| 25 #define GSS_S_CONTINUE_NEEDED 1 | 25 #define GSS_S_CONTINUE_NEEDED 1 |
| 26 #define GSS_S_FAILURE 2 | 26 #define GSS_S_FAILURE 2 |
| 27 | 27 |
| 28 class gss_buffer_desc; | |
| 29 | |
| 30 typedef struct gss_OID_desc_struct { | 28 typedef struct gss_OID_desc_struct { |
| 31 uint32_t length; | 29 uint32_t length; |
| 32 void* elements; | 30 void* elements; |
| 33 } gss_OID_desc, *gss_OID; | 31 } gss_OID_desc, *gss_OID; |
| 34 | 32 |
| 35 extern gss_OID CHROME_GSS_SPNEGO_MECH_OID_DESC; | 33 extern gss_OID CHROME_GSS_SPNEGO_MECH_OID_DESC; |
| 36 | 34 |
| 37 namespace test { | 35 namespace test { |
| 38 | 36 |
| 39 // Copy of class in Mock GSSAPI library. | 37 // Copy of class in Mock GSSAPI library. |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 std::list<SecurityContextQuery> expected_security_queries_; | 135 std::list<SecurityContextQuery> expected_security_queries_; |
| 138 // Needed to keep the current query alive once it has been pulled from the | 136 // Needed to keep the current query alive once it has been pulled from the |
| 139 // queue. This is simpler than transferring its ownership to Java. | 137 // queue. This is simpler than transferring its ownership to Java. |
| 140 SecurityContextQuery current_query_; | 138 SecurityContextQuery current_query_; |
| 141 }; | 139 }; |
| 142 | 140 |
| 143 } // namespace android | 141 } // namespace android |
| 144 } // namespace net | 142 } // namespace net |
| 145 | 143 |
| 146 #endif // NET_ANDROID_DUMMY_SPNEGO_AUTHENTICATOR_DRIVER_H | 144 #endif // NET_ANDROID_DUMMY_SPNEGO_AUTHENTICATOR_DRIVER_H |
| OLD | NEW |