On windows-sspi branch: Allocate SSPI/GSSAPI security context in pool and 
free them it automatically on pool cleanup.

* auth/auth_kerb.h
  (SERF__KERB_NO_CONTEXT): Removed.
  (serf__kerb_create_sec_context): New function declaration. Creates
   empty security context in pool and delete it on pool cleanup.
  (serf__kerb_init_sec_context): Add RESULT_POOL parameter to allocate
   output buffers.
* auth/auth_kerb_gss.c
  (): Remove stdlib.h include.
  (cleanup_ctx): New. Deletes GSS security context on pool cleanup.
  (cleanup_sec_buffer): New. Releases GSS buffer on pool cleanup.
  (serf__kerb_create_sec_context): New.
  (serf__kerb_init_sec_context): Add RESULT_POOL parameter. Do not 
   create security context on demand. Register pool cleanup handler to 
   release GSS output buffer.
  (serf__kerb_delete_sec_context, serf__kerb_release_buffer): Removed.
* auth/auth_kerb_sspi.c
  (cleanup_ctx): New. Deletes SSPI security context on pool cleanup.
  (cleanup_sec_buffer): New. Releases SSPI buffer on pool cleanup.
  (serf__kerb_create_sec_context): New. Allocate security context structure,
   acquire credentials from SSPI and register pool cleanup handler to delete
   security context.
  (serf__kerb_init_sec_context): Add RESULT_POOL parameter. Do not    
   create security context on demand. Register pool cleanup handler to 
   release SSPI output buffer.
  (serf__kerb_delete_sec_context, serf__kerb_release_buffer): Removed.
* auth/auth_kerb.c
  (gss_api_get_credentials): Use serf__kerb_init_sec_context's ability to
   allocate output token in specified pool.
  (cleanup_gss_info): Removed.
  (serf__init_kerb_connection): Use serf__kerb_create_sec_context to create
   initial security context. Do not register pool cleanup handler since
   serf__kerb_create_sec_context already done it.



git-svn-id: https://svn.apache.org/repos/asf/serf/branches/windows-sspi@1698876 13f79535-47bb-0310-9956-ffa450edef68
4 files changed