FreeRDP/include/freerdp/auth/credssp.h

72 lines
2.1 KiB
C
Raw Normal View History

2011-07-01 02:51:46 +04:00
/**
2012-02-21 01:17:57 +04:00
* FreeRDP: A Remote Desktop Protocol Implementation
2011-07-01 02:51:46 +04:00
* Credential Security Support Provider (CredSSP)
*
2012-02-21 01:17:57 +04:00
* Copyright 2010-2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
2011-07-01 02:51:46 +04:00
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
2012-02-21 01:17:57 +04:00
#ifndef FREERDP_AUTH_CREDSSP_H
#define FREERDP_AUTH_CREDSSP_H
2011-07-01 02:51:46 +04:00
typedef struct rdp_credssp rdpCredssp;
2012-02-21 09:56:55 +04:00
#include <freerdp/api.h>
#include <freerdp/freerdp.h>
#include <freerdp/utils/memory.h>
#include <freerdp/utils/stream.h>
#include <freerdp/utils/hexdump.h>
#include <freerdp/auth/sspi.h>
#include <freerdp/crypto/tls.h>
#include <freerdp/crypto/ber.h>
#include <freerdp/crypto/crypto.h>
2011-07-01 02:51:46 +04:00
struct rdp_credssp
{
rdpTls* tls;
boolean server;
2011-07-01 02:51:46 +04:00
int send_seq_num;
UNICONV* uniconv;
freerdp* instance;
2012-02-29 20:57:43 +04:00
CTXT_HANDLE context;
rdpSettings* settings;
SEC_BUFFER negoToken;
SEC_BUFFER pubKeyAuth;
SEC_BUFFER authInfo;
2012-02-29 20:57:43 +04:00
SEC_BUFFER PublicKey;
SEC_BUFFER ts_credentials;
2011-07-01 02:51:46 +04:00
CryptoRc4 rc4_seal_state;
SEC_AUTH_IDENTITY identity;
2012-02-29 20:57:43 +04:00
SECURITY_FUNCTION_TABLE* table;
SEC_PKG_CONTEXT_SIZES ContextSizes;
2011-07-01 02:51:46 +04:00
};
2012-02-21 09:56:55 +04:00
FREERDP_API int credssp_authenticate(rdpCredssp* credssp);
2011-07-01 02:51:46 +04:00
FREERDP_API void credssp_send(rdpCredssp* credssp);
FREERDP_API int credssp_recv(rdpCredssp* credssp);
FREERDP_API void credssp_buffer_free(rdpCredssp* credssp);
2011-07-01 02:51:46 +04:00
2012-02-29 20:57:43 +04:00
SECURITY_STATUS credssp_verify_public_key_echo(rdpCredssp* credssp);
2012-02-21 09:56:55 +04:00
FREERDP_API void credssp_encode_ts_credentials(rdpCredssp* credssp);
2012-02-29 20:57:43 +04:00
SECURITY_STATUS credssp_encrypt_ts_credentials(rdpCredssp* credssp);
2011-07-01 02:51:46 +04:00
2012-02-21 09:56:55 +04:00
FREERDP_API rdpCredssp* credssp_new(freerdp* instance, rdpTls* tls, rdpSettings* settings);
FREERDP_API void credssp_free(rdpCredssp* credssp);
2011-07-01 02:51:46 +04:00
2012-02-21 01:17:57 +04:00
#endif /* FREERDP_AUTH_CREDSSP_H */