schannel: Code cleanup and bug fixes

curl_sspi.c: Fixed mingw32-gcc compiler warnings
curl_sspi.c: Fixed length of error code hex output

The hex value was printed as signed 64-bit value on 64-bit systems:
SEC_E_WRONG_PRINCIPAL (0xFFFFFFFF80090322)

It is now correctly printed as the following:
SEC_E_WRONG_PRINCIPAL (0x80090322)

curl_sspi.c: Fallback to security function table version number
Instead of reporting an unknown version, the interface version is used.

curl_sspi.c: Removed SSPI/ version prefix from Curl_sspi_version
curl_schannel: Replaced static buffer sizes with defined names
curl_schannel.c: First brace when declaring functions on column 0
curl_schannel.c: Put the pointer sign directly at variable name
curl_schannel.c: Use structs directly instead of typedef'ed structs
curl_schannel.c: Removed space before opening brace
curl_schannel.c: Fixed lines being longer than 80 chars
This commit is contained in:
Marc Hoersken
2012-04-15 04:12:26 +02:00
committed by Daniel Stenberg
parent c1311c2b8f
commit 7047e2ed72
4 changed files with 75 additions and 52 deletions

View File

@@ -222,15 +222,15 @@ enum protection_level {
#ifdef USE_SCHANNEL
/* Structs to store Schannel handles */
typedef struct curl_schannel_cred {
struct curl_schannel_cred {
CredHandle cred_handle;
TimeStamp time_stamp;
} curl_schannel_cred;
};
typedef struct curl_schannel_ctxt {
struct curl_schannel_ctxt {
CtxtHandle ctxt_handle;
TimeStamp time_stamp;
} curl_schannel_ctxt;
};
#endif
/* enum for the nonblocking SSL connection state machine */
@@ -302,8 +302,8 @@ struct ssl_connect_data {
SSL* ssl;
#endif /* USE_AXTLS */
#ifdef USE_SCHANNEL
curl_schannel_cred *cred;
curl_schannel_ctxt *ctxt;
struct curl_schannel_cred *cred;
struct curl_schannel_ctxt *ctxt;
SecPkgContext_StreamSizes stream_sizes;
ssl_connect_state connecting_state;
size_t encdata_length, decdata_length;