2 * FreeRDP: A Remote Desktop Protocol Client
3 * Credential Security Support Provider (CredSSP)
5 * Copyright 2010 Marc-Andre Moreau <marcandre.moreau@gmail.com>
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
23 typedef struct rdp_credssp rdpCredssp;
28 #include "transport.h"
29 #include <freerdp/settings.h>
30 #include <freerdp/utils/blob.h>
31 #include <freerdp/utils/memory.h>
32 #include <freerdp/utils/stream.h>
33 #include <freerdp/utils/hexdump.h>
44 rdpBlob ts_credentials;
45 rdpSettings* settings;
46 CryptoRc4 rc4_seal_state;
47 struct _NTLMSSP *ntlmssp;
48 struct rdp_transport* transport;
51 int credssp_authenticate(rdpCredssp* credssp);
53 void credssp_send(rdpCredssp* credssp, rdpBlob* negoToken, rdpBlob* authInfo, rdpBlob* pubKeyAuth);
54 int credssp_recv(rdpCredssp* credssp, rdpBlob* negoToken, rdpBlob* authInfo, rdpBlob* pubKeyAuth);
56 void credssp_encrypt_public_key(rdpCredssp* credssp, rdpBlob* d);
57 void credssp_encrypt_ts_credentials(rdpCredssp* credssp, rdpBlob* d);
58 int credssp_verify_public_key(rdpCredssp* credssp, rdpBlob* d);
59 void credssp_encode_ts_credentials(rdpCredssp* credssp);
61 void credssp_current_time(uint8* timestamp);
62 void credssp_rc4k(uint8* key, int length, uint8* plaintext, uint8* ciphertext);
64 rdpCredssp* credssp_new(rdpTransport* transport);
65 void credssp_free(rdpCredssp* credssp);
67 #endif /* __CREDSSP_H */