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