OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_HTTP_AUTH_GSSAPI_POSIX_H_ | 5 #ifndef NET_HTTP_HTTP_AUTH_GSSAPI_POSIX_H_ |
6 #define NET_HTTP_HTTP_AUTH_GSSAPI_POSIX_H_ | 6 #define NET_HTTP_HTTP_AUTH_GSSAPI_POSIX_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 105 |
106 // GSSAPISharedLibrary class is defined here so that unit tests can access it. | 106 // GSSAPISharedLibrary class is defined here so that unit tests can access it. |
107 class NET_EXPORT_PRIVATE GSSAPISharedLibrary : public GSSAPILibrary { | 107 class NET_EXPORT_PRIVATE GSSAPISharedLibrary : public GSSAPILibrary { |
108 public: | 108 public: |
109 // If |gssapi_library_name| is empty, hard-coded default library names are | 109 // If |gssapi_library_name| is empty, hard-coded default library names are |
110 // used. | 110 // used. |
111 explicit GSSAPISharedLibrary(const std::string& gssapi_library_name); | 111 explicit GSSAPISharedLibrary(const std::string& gssapi_library_name); |
112 virtual ~GSSAPISharedLibrary(); | 112 virtual ~GSSAPISharedLibrary(); |
113 | 113 |
114 // GSSAPILibrary methods: | 114 // GSSAPILibrary methods: |
115 virtual bool Init() OVERRIDE; | 115 virtual bool Init() override; |
116 virtual OM_uint32 import_name( | 116 virtual OM_uint32 import_name( |
117 OM_uint32* minor_status, | 117 OM_uint32* minor_status, |
118 const gss_buffer_t input_name_buffer, | 118 const gss_buffer_t input_name_buffer, |
119 const gss_OID input_name_type, | 119 const gss_OID input_name_type, |
120 gss_name_t* output_name) OVERRIDE; | 120 gss_name_t* output_name) override; |
121 virtual OM_uint32 release_name( | 121 virtual OM_uint32 release_name( |
122 OM_uint32* minor_status, | 122 OM_uint32* minor_status, |
123 gss_name_t* input_name) OVERRIDE; | 123 gss_name_t* input_name) override; |
124 virtual OM_uint32 release_buffer( | 124 virtual OM_uint32 release_buffer( |
125 OM_uint32* minor_status, | 125 OM_uint32* minor_status, |
126 gss_buffer_t buffer) OVERRIDE; | 126 gss_buffer_t buffer) override; |
127 virtual OM_uint32 display_name( | 127 virtual OM_uint32 display_name( |
128 OM_uint32* minor_status, | 128 OM_uint32* minor_status, |
129 const gss_name_t input_name, | 129 const gss_name_t input_name, |
130 gss_buffer_t output_name_buffer, | 130 gss_buffer_t output_name_buffer, |
131 gss_OID* output_name_type) OVERRIDE; | 131 gss_OID* output_name_type) override; |
132 virtual OM_uint32 display_status( | 132 virtual OM_uint32 display_status( |
133 OM_uint32* minor_status, | 133 OM_uint32* minor_status, |
134 OM_uint32 status_value, | 134 OM_uint32 status_value, |
135 int status_type, | 135 int status_type, |
136 const gss_OID mech_type, | 136 const gss_OID mech_type, |
137 OM_uint32* message_contex, | 137 OM_uint32* message_contex, |
138 gss_buffer_t status_string) OVERRIDE; | 138 gss_buffer_t status_string) override; |
139 virtual OM_uint32 init_sec_context( | 139 virtual OM_uint32 init_sec_context( |
140 OM_uint32* minor_status, | 140 OM_uint32* minor_status, |
141 const gss_cred_id_t initiator_cred_handle, | 141 const gss_cred_id_t initiator_cred_handle, |
142 gss_ctx_id_t* context_handle, | 142 gss_ctx_id_t* context_handle, |
143 const gss_name_t target_name, | 143 const gss_name_t target_name, |
144 const gss_OID mech_type, | 144 const gss_OID mech_type, |
145 OM_uint32 req_flags, | 145 OM_uint32 req_flags, |
146 OM_uint32 time_req, | 146 OM_uint32 time_req, |
147 const gss_channel_bindings_t input_chan_bindings, | 147 const gss_channel_bindings_t input_chan_bindings, |
148 const gss_buffer_t input_token, | 148 const gss_buffer_t input_token, |
149 gss_OID* actual_mech_type, | 149 gss_OID* actual_mech_type, |
150 gss_buffer_t output_token, | 150 gss_buffer_t output_token, |
151 OM_uint32* ret_flags, | 151 OM_uint32* ret_flags, |
152 OM_uint32* time_rec) OVERRIDE; | 152 OM_uint32* time_rec) override; |
153 virtual OM_uint32 wrap_size_limit( | 153 virtual OM_uint32 wrap_size_limit( |
154 OM_uint32* minor_status, | 154 OM_uint32* minor_status, |
155 const gss_ctx_id_t context_handle, | 155 const gss_ctx_id_t context_handle, |
156 int conf_req_flag, | 156 int conf_req_flag, |
157 gss_qop_t qop_req, | 157 gss_qop_t qop_req, |
158 OM_uint32 req_output_size, | 158 OM_uint32 req_output_size, |
159 OM_uint32* max_input_size) OVERRIDE; | 159 OM_uint32* max_input_size) override; |
160 virtual OM_uint32 delete_sec_context( | 160 virtual OM_uint32 delete_sec_context( |
161 OM_uint32* minor_status, | 161 OM_uint32* minor_status, |
162 gss_ctx_id_t* context_handle, | 162 gss_ctx_id_t* context_handle, |
163 gss_buffer_t output_token) OVERRIDE; | 163 gss_buffer_t output_token) override; |
164 virtual OM_uint32 inquire_context( | 164 virtual OM_uint32 inquire_context( |
165 OM_uint32* minor_status, | 165 OM_uint32* minor_status, |
166 const gss_ctx_id_t context_handle, | 166 const gss_ctx_id_t context_handle, |
167 gss_name_t* src_name, | 167 gss_name_t* src_name, |
168 gss_name_t* targ_name, | 168 gss_name_t* targ_name, |
169 OM_uint32* lifetime_rec, | 169 OM_uint32* lifetime_rec, |
170 gss_OID* mech_type, | 170 gss_OID* mech_type, |
171 OM_uint32* ctx_flags, | 171 OM_uint32* ctx_flags, |
172 int* locally_initiated, | 172 int* locally_initiated, |
173 int* open) OVERRIDE; | 173 int* open) override; |
174 | 174 |
175 private: | 175 private: |
176 typedef typeof(&gss_import_name) gss_import_name_type; | 176 typedef typeof(&gss_import_name) gss_import_name_type; |
177 typedef typeof(&gss_release_name) gss_release_name_type; | 177 typedef typeof(&gss_release_name) gss_release_name_type; |
178 typedef typeof(&gss_release_buffer) gss_release_buffer_type; | 178 typedef typeof(&gss_release_buffer) gss_release_buffer_type; |
179 typedef typeof(&gss_display_name) gss_display_name_type; | 179 typedef typeof(&gss_display_name) gss_display_name_type; |
180 typedef typeof(&gss_display_status) gss_display_status_type; | 180 typedef typeof(&gss_display_status) gss_display_status_type; |
181 typedef typeof(&gss_init_sec_context) gss_init_sec_context_type; | 181 typedef typeof(&gss_init_sec_context) gss_init_sec_context_type; |
182 typedef typeof(&gss_wrap_size_limit) gss_wrap_size_limit_type; | 182 typedef typeof(&gss_wrap_size_limit) gss_wrap_size_limit_type; |
183 typedef typeof(&gss_delete_sec_context) gss_delete_sec_context_type; | 183 typedef typeof(&gss_delete_sec_context) gss_delete_sec_context_type; |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 gss_OID gss_oid_; | 271 gss_OID gss_oid_; |
272 GSSAPILibrary* library_; | 272 GSSAPILibrary* library_; |
273 std::string decoded_server_auth_token_; | 273 std::string decoded_server_auth_token_; |
274 ScopedSecurityContext scoped_sec_context_; | 274 ScopedSecurityContext scoped_sec_context_; |
275 bool can_delegate_; | 275 bool can_delegate_; |
276 }; | 276 }; |
277 | 277 |
278 } // namespace net | 278 } // namespace net |
279 | 279 |
280 #endif // NET_HTTP_HTTP_AUTH_GSSAPI_POSIX_H_ | 280 #endif // NET_HTTP_HTTP_AUTH_GSSAPI_POSIX_H_ |
OLD | NEW |