libwinpr-sspi: cleanup headers and structure

This commit is contained in:
Marc-André Moreau 2012-05-21 22:48:33 -04:00
parent c4ec4ae1d5
commit a09dbbd671
23 changed files with 61 additions and 59 deletions

View File

@ -1,5 +1,5 @@
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* WinPR: Windows Portable Runtime
* Security Support Provider Interface (SSPI)
*
* Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
@ -17,8 +17,8 @@
* limitations under the License.
*/
#ifndef FREERDP_SSPI_H
#define FREERDP_SSPI_H
#ifndef WINPR_SSPI_H
#define WINPR_SSPI_H
#include "config.h"
@ -40,18 +40,18 @@
#include <sspi.h>
#include <security.h>
#else
#define FREERDP_SSPI
#define WINPR_SSPI
#define SEC_ENTRY __stdcall
#endif
#else
#define FREERDP_SSPI
#define WINPR_SSPI
#include <winpr/wtypes.h>
#endif
#ifdef FREERDP_SSPI
#ifdef WINPR_SSPI
#ifndef SEC_ENTRY
#define SEC_ENTRY
@ -266,7 +266,7 @@ typedef SecPkgInfoW* PSecPkgInfoW;
#define SECPKG_ATTR_NEGO_STATUS 32
#define SECPKG_ATTR_CONTEXT_DELETED 33
#ifdef FREERDP_SSPI
#ifdef WINPR_SSPI
struct _SecPkgContext_AccessToken
{
@ -593,7 +593,7 @@ typedef SecPkgCredentials_NamesW* PSecPkgCredentials_NamesW;
#define SEC_WINNT_AUTH_IDENTITY_ANSI 0x1
#define SEC_WINNT_AUTH_IDENTITY_UNICODE 0x2
#ifdef FREERDP_SSPI
#ifdef WINPR_SSPI
struct _SEC_WINNT_AUTH_IDENTITY
{
@ -649,7 +649,7 @@ typedef CtxtHandle* PCtxtHandle;
#define SECBUFFER_READONLY_WITH_CHECKSUM 0x10000000
#define SECBUFFER_RESERVED 0x60000000
#ifdef FREERDP_SSPI
#ifdef WINPR_SSPI
struct _SecBuffer
{
@ -965,4 +965,4 @@ WINPR_API void sspi_GlobalFinish();
WINPR_API void sspi_SecBufferAlloc(PSecBuffer SecBuffer, size_t size);
WINPR_API void sspi_SecBufferFree(PSecBuffer SecBuffer);
#endif /* FREERDP_SSPI_H */
#endif /* WINPR_SSPI_H */

View File

@ -41,10 +41,13 @@ set(WINPR_SSPI_NEGOTIATE_SRCS
Negotiate/negotiate.c
Negotiate/negotiate.h)
set(WINPR_SSPI_CREDSSP_SRCS
CredSSP/credssp.c)
set(WINPR_SSPI_SRCS
${WINPR_SSPI_CREDSSP_SRCS}
sspi.c
sspi.h
credssp.c)
sspi.h)
if(NOT WITH_NATIVE_SSPI)
set(WINPR_SSPI_SRCS
@ -56,7 +59,6 @@ else()
add_definitions(-DNATIVE_SSPI)
endif()
add_library(winpr-sspi ${WINPR_SSPI_SRCS})
include_directories(${OPENSSL_INCLUDE_DIR})

View File

@ -1,5 +1,5 @@
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* WinPR: Windows Portable Runtime
* Credential Security Support Provider (CredSSP)
*
* Copyright 2010-2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
@ -29,7 +29,7 @@
#include <winpr/sspi.h>
#include <winpr/credssp.h>
#include "sspi.h"
#include "../sspi.h"
/**
* TSRequest ::= SEQUENCE {

View File

@ -1,5 +1,5 @@
/**
* FreeRDP: A Remote Desktop Protocol Client
* WinPR: Windows Portable Runtime
* Kerberos Auth Protocol
*
* Copyright 2011 Samsung, Author Jiten Pathy

View File

@ -1,5 +1,5 @@
/**
* FreeRDP: A Remote Desktop Protocol Client
* WinPR: Windows Portable Runtime
* Kerberos Auth Protocol
*
* Copyright 2011 Samsung, Author Jiten Pathy
@ -17,8 +17,8 @@
* limitations under the License.
*/
#ifndef FREERDP_SSPI_KERBEROS_PRIVATE_H
#define FREERDP_SSPI_KERBEROS_PRIVATE_H
#ifndef WINPR_SSPI_KERBEROS_PRIVATE_H
#define WINPR_SSPI_KERBEROS_PRIVATE_H
#ifndef _WIN32
#include <netinet/in.h>

View File

@ -1,5 +1,5 @@
/**
* FreeRDP: A Remote Desktop Protocol Client
* WinPR: Windows Portable Runtime
* kerberos Crypto Support
*
* Copyright 2011 Samsung, Author Jiten Pathy

View File

@ -1,5 +1,5 @@
/**
* FreeRDP: A Remote Desktop Protocol Client
* WinPR: Windows Portable Runtime
* kerberos Crypto Support
*
* Copyright 2011 Samsung, Author Jiten Pathy
@ -17,8 +17,8 @@
* limitations under the License.
*/
#ifndef FREERDP_SSPI_KERBEROS_CRYPTO_H
#define FREERDP_SSPI_KERBEROS_CRYPTO_H
#ifndef WINPR_SSPI_KERBEROS_CRYPTO_H
#define WINPR_SSPI_KERBEROS_CRYPTO_H
#include <openssl/err.h>
#include <openssl/rc4.h>

View File

@ -1,5 +1,5 @@
/**
* FreeRDP: A Remote Desktop Protocol Client
* WinPR: Windows Portable Runtime
* Kerberos Auth Protocol DER Decode
*
* Copyright 2011 Samsung, Author Jiten Pathy

View File

@ -1,5 +1,5 @@
/**
* FreeRDP: A Remote Desktop Protocol Client
* WinPR: Windows Portable Runtime
* Kerberos Auth Protocol DER Decode
*
* Copyright 2011 Samsung, Author Jiten Pathy

View File

@ -1,5 +1,5 @@
/**
* FreeRDP: A Remote Desktop Protocol Client
* WinPR: Windows Portable Runtime
* Kerberos Auth Protocol DER Encode
*
* Copyright 2011 Samsung, Author Jiten Pathy

View File

@ -1,5 +1,5 @@
/**
* FreeRDP: A Remote Desktop Protocol Client
* WinPR: Windows Portable Runtime
* Kerberos Auth Protocol DER Encode
*
* Copyright 2011 Samsung, Author Jiten Pathy
@ -21,8 +21,8 @@
#include "kerberos.h"
#ifndef FREERDP_SSPI_KERBEROS_ENCODE_H
#define FREERDP_SSPI_KERBEROS_ENCODE_H
#ifndef WINPR_SSPI_KERBEROS_ENCODE_H
#define WINPR_SSPI_KERBEROS_ENCODE_H
int krb_encode_sequence_tag(STREAM* s, uint32 len);
int krb_encode_contextual_tag(STREAM* s, uint8 tag, uint32 len);
@ -45,4 +45,4 @@ int krb_encode_req_body(STREAM* s, KDCReqBody* req_body, int msgtype);
int krb_encode_apreq(STREAM* s, KrbAPREQ* krb_apreq);
int krb_encode_tgtreq(STREAM* s, KrbTGTREQ* krb_tgtreq);
#endif /* FREERDP_SSPI_KERBEROS_ENCODE_H */
#endif /* WINPR_SSPI_KERBEROS_ENCODE_H */

View File

@ -1,5 +1,5 @@
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* WinPR: Windows Portable Runtime
* NTLM Security Package
*
* Copyright 2011-2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>

View File

@ -1,5 +1,5 @@
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* WinPR: Windows Portable Runtime
* NTLM Security Package
*
* Copyright 2011-2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
@ -17,8 +17,8 @@
* limitations under the License.
*/
#ifndef FREERDP_SSPI_NTLM_PRIVATE_H
#define FREERDP_SSPI_NTLM_PRIVATE_H
#ifndef WINPR_SSPI_NTLM_PRIVATE_H
#define WINPR_SSPI_NTLM_PRIVATE_H
#include <winpr/sspi.h>
#include <freerdp/crypto/crypto.h>

View File

@ -1,5 +1,5 @@
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* WinPR: Windows Portable Runtime
* NTLM Security Package (AV_PAIRs)
*
* Copyright 2011-2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>

View File

@ -1,5 +1,5 @@
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* WinPR: Windows Portable Runtime
* NTLM Security Package (AV_PAIRs)
*
* Copyright 2011-2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
@ -17,8 +17,8 @@
* limitations under the License.
*/
#ifndef FREERDP_SSPI_NTLM_AV_PAIRS_H
#define FREERDP_SSPI_NTLM_AV_PAIRS_H
#ifndef WINPR_SSPI_NTLM_AV_PAIRS_H
#define WINPR_SSPI_NTLM_AV_PAIRS_H
#include "ntlm.h"
@ -29,4 +29,4 @@ void ntlm_populate_server_av_pairs(NTLM_CONTEXT* context);
void ntlm_print_av_pairs(NTLM_CONTEXT* context);
void ntlm_free_av_pairs(NTLM_CONTEXT* context);
#endif /* FREERDP_SSPI_NTLM_AV_PAIRS_H */
#endif /* WINPR_SSPI_NTLM_AV_PAIRS_H */

View File

@ -1,5 +1,5 @@
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* WinPR: Windows Portable Runtime
* NTLM Security Package (Compute)
*
* Copyright 2011-2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>

View File

@ -1,5 +1,5 @@
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* WinPR: Windows Portable Runtime
* NTLM Security Package (Compute)
*
* Copyright 2011-2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
@ -17,8 +17,8 @@
* limitations under the License.
*/
#ifndef FREERDP_SSPI_NTLM_COMPUTE_H
#define FREERDP_SSPI_NTLM_COMPUTE_H
#ifndef WINPR_SSPI_NTLM_COMPUTE_H
#define WINPR_SSPI_NTLM_COMPUTE_H
#include "ntlm.h"
@ -53,5 +53,5 @@ void ntlm_init_rc4_seal_states(NTLM_CONTEXT* context);
void ntlm_compute_message_integrity_check(NTLM_CONTEXT* context);
#endif /* FREERDP_AUTH_NTLM_COMPUTE_H */
#endif /* WINPR_AUTH_NTLM_COMPUTE_H */

View File

@ -1,5 +1,5 @@
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* WinPR: Windows Portable Runtime
* NTLM Security Package (Message)
*
* Copyright 2011-2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>

View File

@ -1,5 +1,5 @@
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* WinPR: Windows Portable Runtime
* NTLM Security Package (Message)
*
* Copyright 2011-2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
@ -17,8 +17,8 @@
* limitations under the License.
*/
#ifndef FREERDP_SSPI_NTLM_MESSAGE_H
#define FREERDP_SSPI_NTLM_MESSAGE_H
#ifndef WINPR_SSPI_NTLM_MESSAGE_H
#define WINPR_SSPI_NTLM_MESSAGE_H
#include "ntlm.h"
@ -29,4 +29,4 @@ SECURITY_STATUS ntlm_write_ChallengeMessage(NTLM_CONTEXT* context, PSecBuffer bu
SECURITY_STATUS ntlm_read_AuthenticateMessage(NTLM_CONTEXT* context, PSecBuffer buffer);
SECURITY_STATUS ntlm_write_AuthenticateMessage(NTLM_CONTEXT* context, PSecBuffer buffer);
#endif /* FREERDP_SSPI_NTLM_MESSAGE_H */
#endif /* WINPR_SSPI_NTLM_MESSAGE_H */

View File

@ -1,5 +1,5 @@
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* WinPR: Windows Portable Runtime
* Negotiate Security Package
*
* Copyright 2011-2012 Jiten Pathy

View File

@ -1,5 +1,5 @@
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* WinPR: Windows Portable Runtime
* Negotiate Security Package
*
* Copyright 2011-2012 Jiten Pathy
@ -17,8 +17,8 @@
* limitations under the License.
*/
#ifndef FREERDP_SSPI_NEGOTIATE_PRIVATE_H
#define FREERDP_SSPI_NEGOTIATE_PRIVATE_H
#ifndef WINPR_SSPI_NEGOTIATE_PRIVATE_H
#define WINPR_SSPI_NEGOTIATE_PRIVATE_H
#include <winpr/sspi.h>
#include <freerdp/utils/unicode.h>
@ -52,5 +52,5 @@ typedef struct _NEGOTIATE_CONTEXT NEGOTIATE_CONTEXT;
NEGOTIATE_CONTEXT* negotiate_ContextNew();
void negotiate_ContextFree(NEGOTIATE_CONTEXT* context);
#endif /* FREERDP_SSPI_NEGOTIATE_PRIVATE_H */
#endif /* WINPR_SSPI_NEGOTIATE_PRIVATE_H */

View File

@ -26,7 +26,7 @@
/* Authentication Functions: http://msdn.microsoft.com/en-us/library/windows/desktop/aa374731/ */
#ifdef FREERDP_SSPI
#ifdef WINPR_SSPI
extern const SecPkgInfoA NTLM_SecPkgInfoA;
extern const SecPkgInfoW NTLM_SecPkgInfoW;

View File

@ -1,5 +1,5 @@
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* WinPR: Windows Portable Runtime
* Security Support Provider Interface (SSPI)
*
* Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
@ -17,8 +17,8 @@
* limitations under the License.
*/
#ifndef FREERDP_AUTH_SSPI_PRIVATE_H
#define FREERDP_AUTH_SSPI_PRIVATE_H
#ifndef WINPR_SSPI_PRIVATE_H
#define WINPR_SSPI_PRIVATE_H
#include "config.h"
@ -74,4 +74,4 @@ enum SecurityFunctionTableIndex
SetContextAttributesIndex = 28
};
#endif /* FREERDP_AUTH_SSPI_PRIVATE_H */
#endif /* WINPR_SSPI_PRIVATE_H */