Index: net/http/mock_gssapi_library_posix.cc |
diff --git a/net/http/mock_gssapi_library_posix.cc b/net/http/mock_gssapi_library_posix.cc |
index b4d651461ec2aebb3acdeacd797a2e2db1e70678..7c17d6d420154ce43fdc71794cc65c52ace7f1dc 100644 |
--- a/net/http/mock_gssapi_library_posix.cc |
+++ b/net/http/mock_gssapi_library_posix.cc |
@@ -56,7 +56,7 @@ void ClearBuffer(gss_buffer_t dest) { |
if (!dest) |
return; |
dest->length = 0; |
- delete [] reinterpret_cast<char*>(dest->value); |
+ delete[] reinterpret_cast<char*>(dest->value); |
dest->value = NULL; |
} |
@@ -120,8 +120,7 @@ std::string NameToString(const gss_name_t& src) { |
std::string dest; |
if (!src) |
return dest; |
- test::GssNameMockImpl* string = |
- reinterpret_cast<test::GssNameMockImpl*>(src); |
+ test::GssNameMockImpl* string = reinterpret_cast<test::GssNameMockImpl*>(src); |
dest = string->name; |
return dest; |
} |
@@ -137,20 +136,17 @@ void NameFromString(const std::string& src, gss_name_t dest) { |
namespace test { |
GssContextMockImpl::GssContextMockImpl() |
- : lifetime_rec(0), |
- ctx_flags(0), |
- locally_initiated(0), |
- open(0) { |
+ : lifetime_rec(0), ctx_flags(0), locally_initiated(0), open(0) { |
ClearOid(&mech_type); |
} |
GssContextMockImpl::GssContextMockImpl(const GssContextMockImpl& other) |
- : src_name(other.src_name), |
- targ_name(other.targ_name), |
- lifetime_rec(other.lifetime_rec), |
- ctx_flags(other.ctx_flags), |
- locally_initiated(other.locally_initiated), |
- open(other.open) { |
+ : src_name(other.src_name), |
+ targ_name(other.targ_name), |
+ lifetime_rec(other.lifetime_rec), |
+ ctx_flags(other.ctx_flags), |
+ locally_initiated(other.locally_initiated), |
+ open(other.open) { |
CopyOid(&mech_type, &other.mech_type); |
} |
@@ -174,8 +170,7 @@ GssContextMockImpl::~GssContextMockImpl() { |
ClearOid(&mech_type); |
} |
-void GssContextMockImpl::Assign( |
- const GssContextMockImpl& other) { |
+void GssContextMockImpl::Assign(const GssContextMockImpl& other) { |
if (&other == this) |
return; |
src_name = other.src_name; |
@@ -226,7 +221,8 @@ MockGSSAPILibrary::SecurityContextQuery::SecurityContextQuery( |
} |
} |
-MockGSSAPILibrary::SecurityContextQuery::~SecurityContextQuery() {} |
+MockGSSAPILibrary::SecurityContextQuery::~SecurityContextQuery() { |
+} |
MockGSSAPILibrary::MockGSSAPILibrary() { |
} |
@@ -256,11 +252,10 @@ bool MockGSSAPILibrary::Init() { |
} |
// These methods match the ones in the GSSAPI library. |
-OM_uint32 MockGSSAPILibrary::import_name( |
- OM_uint32* minor_status, |
- const gss_buffer_t input_name_buffer, |
- const gss_OID input_name_type, |
- gss_name_t* output_name) { |
+OM_uint32 MockGSSAPILibrary::import_name(OM_uint32* minor_status, |
+ const gss_buffer_t input_name_buffer, |
+ const gss_OID input_name_type, |
+ gss_name_t* output_name) { |
if (minor_status) |
*minor_status = 0; |
if (!output_name) |
@@ -283,9 +278,8 @@ OM_uint32 MockGSSAPILibrary::import_name( |
return GSS_S_COMPLETE; |
} |
-OM_uint32 MockGSSAPILibrary::release_name( |
- OM_uint32* minor_status, |
- gss_name_t* input_name) { |
+OM_uint32 MockGSSAPILibrary::release_name(OM_uint32* minor_status, |
+ gss_name_t* input_name) { |
if (minor_status) |
*minor_status = 0; |
if (!input_name) |
@@ -299,9 +293,8 @@ OM_uint32 MockGSSAPILibrary::release_name( |
return GSS_S_COMPLETE; |
} |
-OM_uint32 MockGSSAPILibrary::release_buffer( |
- OM_uint32* minor_status, |
- gss_buffer_t buffer) { |
+OM_uint32 MockGSSAPILibrary::release_buffer(OM_uint32* minor_status, |
+ gss_buffer_t buffer) { |
if (minor_status) |
*minor_status = 0; |
if (!buffer) |
@@ -310,11 +303,10 @@ OM_uint32 MockGSSAPILibrary::release_buffer( |
return GSS_S_COMPLETE; |
} |
-OM_uint32 MockGSSAPILibrary::display_name( |
- OM_uint32* minor_status, |
- const gss_name_t input_name, |
- gss_buffer_t output_name_buffer, |
- gss_OID* output_name_type) { |
+OM_uint32 MockGSSAPILibrary::display_name(OM_uint32* minor_status, |
+ const gss_name_t input_name, |
+ gss_buffer_t output_name_buffer, |
+ gss_OID* output_name_type) { |
if (minor_status) |
*minor_status = 0; |
if (!input_name) |
@@ -332,18 +324,16 @@ OM_uint32 MockGSSAPILibrary::display_name( |
return GSS_S_COMPLETE; |
} |
-OM_uint32 MockGSSAPILibrary::display_status( |
- OM_uint32* minor_status, |
- OM_uint32 status_value, |
- int status_type, |
- const gss_OID mech_type, |
- OM_uint32* message_context, |
- gss_buffer_t status_string) { |
+OM_uint32 MockGSSAPILibrary::display_status(OM_uint32* minor_status, |
+ OM_uint32 status_value, |
+ int status_type, |
+ const gss_OID mech_type, |
+ OM_uint32* message_context, |
+ gss_buffer_t status_string) { |
if (minor_status) |
*minor_status = 0; |
- std::string msg = base::StringPrintf("Value: %u, Type %u", |
- status_value, |
- status_type); |
+ std::string msg = |
+ base::StringPrintf("Value: %u, Type %u", status_value, status_type); |
if (message_context) |
*message_context = 0; |
BufferFromString(msg, status_string); |
@@ -351,19 +341,19 @@ OM_uint32 MockGSSAPILibrary::display_status( |
} |
OM_uint32 MockGSSAPILibrary::init_sec_context( |
- OM_uint32* minor_status, |
- const gss_cred_id_t initiator_cred_handle, |
- gss_ctx_id_t* context_handle, |
- const gss_name_t target_name, |
- const gss_OID mech_type, |
- OM_uint32 req_flags, |
- OM_uint32 time_req, |
- const gss_channel_bindings_t input_chan_bindings, |
- const gss_buffer_t input_token, |
- gss_OID* actual_mech_type, |
- gss_buffer_t output_token, |
- OM_uint32* ret_flags, |
- OM_uint32* time_rec) { |
+ OM_uint32* minor_status, |
+ const gss_cred_id_t initiator_cred_handle, |
+ gss_ctx_id_t* context_handle, |
+ const gss_name_t target_name, |
+ const gss_OID mech_type, |
+ OM_uint32 req_flags, |
+ OM_uint32 time_req, |
+ const gss_channel_bindings_t input_chan_bindings, |
+ const gss_buffer_t input_token, |
+ gss_OID* actual_mech_type, |
+ gss_buffer_t output_token, |
+ OM_uint32* ret_flags, |
+ OM_uint32* time_rec) { |
if (minor_status) |
*minor_status = 0; |
if (!context_handle) |
@@ -397,9 +387,10 @@ OM_uint32 MockGSSAPILibrary::init_sec_context( |
} else { |
EXPECT_EQ(input_token->length, security_query.expected_input_token.length); |
if (input_token->length) { |
- EXPECT_EQ(0, memcmp(input_token->value, |
- security_query.expected_input_token.value, |
- input_token->length)); |
+ EXPECT_EQ(0, |
+ memcmp(input_token->value, |
+ security_query.expected_input_token.value, |
+ input_token->length)); |
} |
} |
CopyBuffer(output_token, &security_query.output_token); |
@@ -410,23 +401,21 @@ OM_uint32 MockGSSAPILibrary::init_sec_context( |
return major_status; |
} |
-OM_uint32 MockGSSAPILibrary::wrap_size_limit( |
- OM_uint32* minor_status, |
- const gss_ctx_id_t context_handle, |
- int conf_req_flag, |
- gss_qop_t qop_req, |
- OM_uint32 req_output_size, |
- OM_uint32* max_input_size) { |
+OM_uint32 MockGSSAPILibrary::wrap_size_limit(OM_uint32* minor_status, |
+ const gss_ctx_id_t context_handle, |
+ int conf_req_flag, |
+ gss_qop_t qop_req, |
+ OM_uint32 req_output_size, |
+ OM_uint32* max_input_size) { |
if (minor_status) |
*minor_status = 0; |
ADD_FAILURE(); |
return GSS_S_UNAVAILABLE; |
} |
-OM_uint32 MockGSSAPILibrary::delete_sec_context( |
- OM_uint32* minor_status, |
- gss_ctx_id_t* context_handle, |
- gss_buffer_t output_token) { |
+OM_uint32 MockGSSAPILibrary::delete_sec_context(OM_uint32* minor_status, |
+ gss_ctx_id_t* context_handle, |
+ gss_buffer_t output_token) { |
if (minor_status) |
*minor_status = 0; |
if (!context_handle) |
@@ -440,16 +429,15 @@ OM_uint32 MockGSSAPILibrary::delete_sec_context( |
return GSS_S_COMPLETE; |
} |
-OM_uint32 MockGSSAPILibrary::inquire_context( |
- OM_uint32* minor_status, |
- const gss_ctx_id_t context_handle, |
- gss_name_t* src_name, |
- gss_name_t* targ_name, |
- OM_uint32* lifetime_rec, |
- gss_OID* mech_type, |
- OM_uint32* ctx_flags, |
- int* locally_initiated, |
- int* open) { |
+OM_uint32 MockGSSAPILibrary::inquire_context(OM_uint32* minor_status, |
+ const gss_ctx_id_t context_handle, |
+ gss_name_t* src_name, |
+ gss_name_t* targ_name, |
+ OM_uint32* lifetime_rec, |
+ gss_OID* mech_type, |
+ OM_uint32* ctx_flags, |
+ int* locally_initiated, |
+ int* open) { |
if (minor_status) |
*minor_status = 0; |
if (!context_handle) |
@@ -477,4 +465,3 @@ OM_uint32 MockGSSAPILibrary::inquire_context( |
} // namespace test |
} // namespace net |
- |