| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_HTTP_MOCK_GSSAPI_LIBRARY_POSIX_H_ | 5 #ifndef NET_HTTP_MOCK_GSSAPI_LIBRARY_POSIX_H_ |
| 6 #define NET_HTTP_MOCK_GSSAPI_LIBRARY_POSIX_H_ | 6 #define NET_HTTP_MOCK_GSSAPI_LIBRARY_POSIX_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <gssapi.h> | 9 #include <gssapi.h> |
| 10 | 10 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 OM_uint32 minor_response_code, | 108 OM_uint32 minor_response_code, |
| 109 const test::GssContextMockImpl& context_info, | 109 const test::GssContextMockImpl& context_info, |
| 110 const gss_buffer_desc& expected_input_token, | 110 const gss_buffer_desc& expected_input_token, |
| 111 const gss_buffer_desc& output_token); | 111 const gss_buffer_desc& output_token); |
| 112 | 112 |
| 113 // GSSAPILibrary methods: | 113 // GSSAPILibrary methods: |
| 114 | 114 |
| 115 // Initializes the library, including any necessary dynamic libraries. | 115 // Initializes the library, including any necessary dynamic libraries. |
| 116 // This is done separately from construction (which happens at startup time) | 116 // This is done separately from construction (which happens at startup time) |
| 117 // in order to delay work until the class is actually needed. | 117 // in order to delay work until the class is actually needed. |
| 118 virtual bool Init(); | 118 virtual bool Init() OVERRIDE; |
| 119 | 119 |
| 120 // These methods match the ones in the GSSAPI library. | 120 // These methods match the ones in the GSSAPI library. |
| 121 virtual OM_uint32 import_name( | 121 virtual OM_uint32 import_name( |
| 122 OM_uint32* minor_status, | 122 OM_uint32* minor_status, |
| 123 const gss_buffer_t input_name_buffer, | 123 const gss_buffer_t input_name_buffer, |
| 124 const gss_OID input_name_type, | 124 const gss_OID input_name_type, |
| 125 gss_name_t* output_name); | 125 gss_name_t* output_name) OVERRIDE; |
| 126 virtual OM_uint32 release_name( | 126 virtual OM_uint32 release_name( |
| 127 OM_uint32* minor_status, | 127 OM_uint32* minor_status, |
| 128 gss_name_t* input_name); | 128 gss_name_t* input_name) OVERRIDE; |
| 129 virtual OM_uint32 release_buffer( | 129 virtual OM_uint32 release_buffer( |
| 130 OM_uint32* minor_status, | 130 OM_uint32* minor_status, |
| 131 gss_buffer_t buffer); | 131 gss_buffer_t buffer) OVERRIDE; |
| 132 virtual OM_uint32 display_name( | 132 virtual OM_uint32 display_name( |
| 133 OM_uint32* minor_status, | 133 OM_uint32* minor_status, |
| 134 const gss_name_t input_name, | 134 const gss_name_t input_name, |
| 135 gss_buffer_t output_name_buffer, | 135 gss_buffer_t output_name_buffer, |
| 136 gss_OID* output_name_type); | 136 gss_OID* output_name_type) OVERRIDE; |
| 137 virtual OM_uint32 display_status( | 137 virtual OM_uint32 display_status( |
| 138 OM_uint32* minor_status, | 138 OM_uint32* minor_status, |
| 139 OM_uint32 status_value, | 139 OM_uint32 status_value, |
| 140 int status_type, | 140 int status_type, |
| 141 const gss_OID mech_type, | 141 const gss_OID mech_type, |
| 142 OM_uint32* message_contex, | 142 OM_uint32* message_contex, |
| 143 gss_buffer_t status_string); | 143 gss_buffer_t status_string) OVERRIDE; |
| 144 virtual OM_uint32 init_sec_context( | 144 virtual OM_uint32 init_sec_context( |
| 145 OM_uint32* minor_status, | 145 OM_uint32* minor_status, |
| 146 const gss_cred_id_t initiator_cred_handle, | 146 const gss_cred_id_t initiator_cred_handle, |
| 147 gss_ctx_id_t* context_handle, | 147 gss_ctx_id_t* context_handle, |
| 148 const gss_name_t target_name, | 148 const gss_name_t target_name, |
| 149 const gss_OID mech_type, | 149 const gss_OID mech_type, |
| 150 OM_uint32 req_flags, | 150 OM_uint32 req_flags, |
| 151 OM_uint32 time_req, | 151 OM_uint32 time_req, |
| 152 const gss_channel_bindings_t input_chan_bindings, | 152 const gss_channel_bindings_t input_chan_bindings, |
| 153 const gss_buffer_t input_token, | 153 const gss_buffer_t input_token, |
| 154 gss_OID* actual_mech_type, | 154 gss_OID* actual_mech_type, |
| 155 gss_buffer_t output_token, | 155 gss_buffer_t output_token, |
| 156 OM_uint32* ret_flags, | 156 OM_uint32* ret_flags, |
| 157 OM_uint32* time_rec); | 157 OM_uint32* time_rec) OVERRIDE; |
| 158 virtual OM_uint32 wrap_size_limit( | 158 virtual OM_uint32 wrap_size_limit( |
| 159 OM_uint32* minor_status, | 159 OM_uint32* minor_status, |
| 160 const gss_ctx_id_t context_handle, | 160 const gss_ctx_id_t context_handle, |
| 161 int conf_req_flag, | 161 int conf_req_flag, |
| 162 gss_qop_t qop_req, | 162 gss_qop_t qop_req, |
| 163 OM_uint32 req_output_size, | 163 OM_uint32 req_output_size, |
| 164 OM_uint32* max_input_size); | 164 OM_uint32* max_input_size) OVERRIDE; |
| 165 virtual OM_uint32 delete_sec_context( | 165 virtual OM_uint32 delete_sec_context( |
| 166 OM_uint32* minor_status, | 166 OM_uint32* minor_status, |
| 167 gss_ctx_id_t* context_handle, | 167 gss_ctx_id_t* context_handle, |
| 168 gss_buffer_t output_token); | 168 gss_buffer_t output_token) OVERRIDE; |
| 169 virtual OM_uint32 inquire_context( | 169 virtual OM_uint32 inquire_context( |
| 170 OM_uint32* minor_status, | 170 OM_uint32* minor_status, |
| 171 const gss_ctx_id_t context_handle, | 171 const gss_ctx_id_t context_handle, |
| 172 gss_name_t* src_name, | 172 gss_name_t* src_name, |
| 173 gss_name_t* targ_name, | 173 gss_name_t* targ_name, |
| 174 OM_uint32* lifetime_rec, | 174 OM_uint32* lifetime_rec, |
| 175 gss_OID* mech_type, | 175 gss_OID* mech_type, |
| 176 OM_uint32* ctx_flags, | 176 OM_uint32* ctx_flags, |
| 177 int* locally_initiated, | 177 int* locally_initiated, |
| 178 int* open); | 178 int* open) OVERRIDE; |
| 179 | 179 |
| 180 private: | 180 private: |
| 181 FRIEND_TEST_ALL_PREFIXES(HttpAuthGSSAPIPOSIXTest, GSSAPICycle); | 181 FRIEND_TEST_ALL_PREFIXES(HttpAuthGSSAPIPOSIXTest, GSSAPICycle); |
| 182 | 182 |
| 183 // |expected_security_queries| contains an ordered list of expected | 183 // |expected_security_queries| contains an ordered list of expected |
| 184 // |init_sec_context()| calls and the return values for those | 184 // |init_sec_context()| calls and the return values for those |
| 185 // calls. | 185 // calls. |
| 186 std::list<SecurityContextQuery> expected_security_queries_; | 186 std::list<SecurityContextQuery> expected_security_queries_; |
| 187 }; | 187 }; |
| 188 | 188 |
| 189 } // namespace test | 189 } // namespace test |
| 190 | 190 |
| 191 } // namespace net | 191 } // namespace net |
| 192 | 192 |
| 193 #endif // NET_HTTP_MOCK_GSSAPI_LIBRARY_POSIX_H_ | 193 #endif // NET_HTTP_MOCK_GSSAPI_LIBRARY_POSIX_H_ |
| 194 | 194 |
| OLD | NEW |