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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 int* locally_initiated, | 102 int* locally_initiated, |
103 int* open) = 0; | 103 int* open) = 0; |
104 }; | 104 }; |
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 ~GSSAPISharedLibrary() override; |
113 | 113 |
114 // GSSAPILibrary methods: | 114 // GSSAPILibrary methods: |
115 virtual bool Init() override; | 115 bool Init() override; |
116 virtual OM_uint32 import_name( | 116 OM_uint32 import_name(OM_uint32* minor_status, |
117 OM_uint32* minor_status, | 117 const gss_buffer_t input_name_buffer, |
118 const gss_buffer_t input_name_buffer, | 118 const gss_OID input_name_type, |
119 const gss_OID input_name_type, | 119 gss_name_t* output_name) override; |
120 gss_name_t* output_name) override; | 120 OM_uint32 release_name(OM_uint32* minor_status, |
121 virtual OM_uint32 release_name( | 121 gss_name_t* input_name) override; |
122 OM_uint32* minor_status, | 122 OM_uint32 release_buffer(OM_uint32* minor_status, |
123 gss_name_t* input_name) override; | 123 gss_buffer_t buffer) override; |
124 virtual OM_uint32 release_buffer( | 124 OM_uint32 display_name(OM_uint32* minor_status, |
125 OM_uint32* minor_status, | 125 const gss_name_t input_name, |
126 gss_buffer_t buffer) override; | 126 gss_buffer_t output_name_buffer, |
127 virtual OM_uint32 display_name( | 127 gss_OID* output_name_type) override; |
128 OM_uint32* minor_status, | 128 OM_uint32 display_status(OM_uint32* minor_status, |
129 const gss_name_t input_name, | 129 OM_uint32 status_value, |
130 gss_buffer_t output_name_buffer, | 130 int status_type, |
131 gss_OID* output_name_type) override; | 131 const gss_OID mech_type, |
132 virtual OM_uint32 display_status( | 132 OM_uint32* message_contex, |
133 OM_uint32* minor_status, | 133 gss_buffer_t status_string) override; |
134 OM_uint32 status_value, | 134 OM_uint32 init_sec_context(OM_uint32* minor_status, |
135 int status_type, | 135 const gss_cred_id_t initiator_cred_handle, |
136 const gss_OID mech_type, | 136 gss_ctx_id_t* context_handle, |
137 OM_uint32* message_contex, | 137 const gss_name_t target_name, |
138 gss_buffer_t status_string) override; | 138 const gss_OID mech_type, |
139 virtual OM_uint32 init_sec_context( | 139 OM_uint32 req_flags, |
140 OM_uint32* minor_status, | 140 OM_uint32 time_req, |
141 const gss_cred_id_t initiator_cred_handle, | 141 const gss_channel_bindings_t input_chan_bindings, |
142 gss_ctx_id_t* context_handle, | 142 const gss_buffer_t input_token, |
143 const gss_name_t target_name, | 143 gss_OID* actual_mech_type, |
144 const gss_OID mech_type, | 144 gss_buffer_t output_token, |
145 OM_uint32 req_flags, | 145 OM_uint32* ret_flags, |
146 OM_uint32 time_req, | 146 OM_uint32* time_rec) override; |
147 const gss_channel_bindings_t input_chan_bindings, | 147 OM_uint32 wrap_size_limit(OM_uint32* minor_status, |
148 const gss_buffer_t input_token, | 148 const gss_ctx_id_t context_handle, |
149 gss_OID* actual_mech_type, | 149 int conf_req_flag, |
150 gss_buffer_t output_token, | 150 gss_qop_t qop_req, |
151 OM_uint32* ret_flags, | 151 OM_uint32 req_output_size, |
152 OM_uint32* time_rec) override; | 152 OM_uint32* max_input_size) override; |
153 virtual OM_uint32 wrap_size_limit( | 153 OM_uint32 delete_sec_context(OM_uint32* minor_status, |
154 OM_uint32* minor_status, | 154 gss_ctx_id_t* context_handle, |
155 const gss_ctx_id_t context_handle, | 155 gss_buffer_t output_token) override; |
156 int conf_req_flag, | 156 OM_uint32 inquire_context(OM_uint32* minor_status, |
157 gss_qop_t qop_req, | 157 const gss_ctx_id_t context_handle, |
158 OM_uint32 req_output_size, | 158 gss_name_t* src_name, |
159 OM_uint32* max_input_size) override; | 159 gss_name_t* targ_name, |
160 virtual OM_uint32 delete_sec_context( | 160 OM_uint32* lifetime_rec, |
161 OM_uint32* minor_status, | 161 gss_OID* mech_type, |
162 gss_ctx_id_t* context_handle, | 162 OM_uint32* ctx_flags, |
163 gss_buffer_t output_token) override; | 163 int* locally_initiated, |
164 virtual OM_uint32 inquire_context( | 164 int* open) override; |
165 OM_uint32* minor_status, | |
166 const gss_ctx_id_t context_handle, | |
167 gss_name_t* src_name, | |
168 gss_name_t* targ_name, | |
169 OM_uint32* lifetime_rec, | |
170 gss_OID* mech_type, | |
171 OM_uint32* ctx_flags, | |
172 int* locally_initiated, | |
173 int* open) override; | |
174 | 165 |
175 private: | 166 private: |
176 typedef typeof(&gss_import_name) gss_import_name_type; | 167 typedef typeof(&gss_import_name) gss_import_name_type; |
177 typedef typeof(&gss_release_name) gss_release_name_type; | 168 typedef typeof(&gss_release_name) gss_release_name_type; |
178 typedef typeof(&gss_release_buffer) gss_release_buffer_type; | 169 typedef typeof(&gss_release_buffer) gss_release_buffer_type; |
179 typedef typeof(&gss_display_name) gss_display_name_type; | 170 typedef typeof(&gss_display_name) gss_display_name_type; |
180 typedef typeof(&gss_display_status) gss_display_status_type; | 171 typedef typeof(&gss_display_status) gss_display_status_type; |
181 typedef typeof(&gss_init_sec_context) gss_init_sec_context_type; | 172 typedef typeof(&gss_init_sec_context) gss_init_sec_context_type; |
182 typedef typeof(&gss_wrap_size_limit) gss_wrap_size_limit_type; | 173 typedef typeof(&gss_wrap_size_limit) gss_wrap_size_limit_type; |
183 typedef typeof(&gss_delete_sec_context) gss_delete_sec_context_type; | 174 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_; | 262 gss_OID gss_oid_; |
272 GSSAPILibrary* library_; | 263 GSSAPILibrary* library_; |
273 std::string decoded_server_auth_token_; | 264 std::string decoded_server_auth_token_; |
274 ScopedSecurityContext scoped_sec_context_; | 265 ScopedSecurityContext scoped_sec_context_; |
275 bool can_delegate_; | 266 bool can_delegate_; |
276 }; | 267 }; |
277 | 268 |
278 } // namespace net | 269 } // namespace net |
279 | 270 |
280 #endif // NET_HTTP_HTTP_AUTH_GSSAPI_POSIX_H_ | 271 #endif // NET_HTTP_HTTP_AUTH_GSSAPI_POSIX_H_ |
OLD | NEW |