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 #include "net/android/dummy_spnego_authenticator.h" | 4 #include "net/android/dummy_spnego_authenticator.h" |
5 | 5 |
6 #include "base/android/jni_string.h" | 6 #include "base/android/jni_string.h" |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "net/test/jni/DummySpnegoAuthenticator_jni.h" | 8 #include "net/test/jni/DummySpnegoAuthenticator_jni.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
| 11 using base::android::JavaParamRef; |
| 12 |
11 namespace net { | 13 namespace net { |
12 | 14 |
13 // iso.org.dod.internet.security.mechanism.snego (1.3.6.1.5.5.2) | 15 // iso.org.dod.internet.security.mechanism.snego (1.3.6.1.5.5.2) |
14 // From RFC 4178, which uses SNEGO not SPNEGO. | 16 // From RFC 4178, which uses SNEGO not SPNEGO. |
15 static const unsigned char kSpnegoOid[] = {0x2b, 0x06, 0x01, 0x05, 0x05, 0x02}; | 17 static const unsigned char kSpnegoOid[] = {0x2b, 0x06, 0x01, 0x05, 0x05, 0x02}; |
16 gss_OID_desc CHROME_GSS_SPNEGO_MECH_OID_DESC_VAL = { | 18 gss_OID_desc CHROME_GSS_SPNEGO_MECH_OID_DESC_VAL = { |
17 arraysize(kSpnegoOid), | 19 arraysize(kSpnegoOid), |
18 const_cast<unsigned char*>(kSpnegoOid)}; | 20 const_cast<unsigned char*>(kSpnegoOid)}; |
19 | 21 |
20 gss_OID CHROME_GSS_SPNEGO_MECH_OID_DESC = &CHROME_GSS_SPNEGO_MECH_OID_DESC_VAL; | 22 gss_OID CHROME_GSS_SPNEGO_MECH_OID_DESC = &CHROME_GSS_SPNEGO_MECH_OID_DESC_VAL; |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 expected_security_queries_.pop_front(); | 202 expected_security_queries_.pop_front(); |
201 return reinterpret_cast<intptr_t>(¤t_query_); | 203 return reinterpret_cast<intptr_t>(¤t_query_); |
202 } | 204 } |
203 | 205 |
204 void DummySpnegoAuthenticator::CheckQueueNotEmpty() { | 206 void DummySpnegoAuthenticator::CheckQueueNotEmpty() { |
205 ASSERT_FALSE(expected_security_queries_.empty()); | 207 ASSERT_FALSE(expected_security_queries_.empty()); |
206 } | 208 } |
207 | 209 |
208 } // namespace android | 210 } // namespace android |
209 } // namespace net | 211 } // namespace net |
OLD | NEW |