FreeRDP
|
#include <ctype.h>
#include <freerdp/config.h>
#include "settings.h"
#include <freerdp/build-config.h>
#include <freerdp/peer.h>
#include <winpr/crt.h>
#include <winpr/wtypes.h>
#include <winpr/assert.h>
#include <winpr/library.h>
#include <winpr/registry.h>
#include <freerdp/log.h>
#include "utils.h"
#include "credssp_auth.h"
Macros | |
#define | TAG FREERDP_TAG("core.auth") |
#define | SERVER_KEY "Software\\" FREERDP_VENDOR_STRING "\\" FREERDP_PRODUCT_STRING "\\Server" |
Enumerations | |
enum | AUTH_STATE { AUTH_STATE_INITIAL , AUTH_STATE_CREDS , AUTH_STATE_IN_PROGRESS , AUTH_STATE_FINAL } |
Functions | |
static const char * | credssp_auth_state_string (const rdpCredsspAuth *auth) |
static BOOL | parseKerberosDeltat (const char *value, INT32 *dest, const char *message) |
static BOOL | credssp_auth_setup_identity (rdpCredsspAuth *auth) |
static SecurityFunctionTable * | auth_resolve_sspi_table (const rdpSettings *settings) |
static BOOL | credssp_auth_update_name_cache (rdpCredsspAuth *auth, TCHAR *name) |
rdpCredsspAuth * | credssp_auth_new (const rdpContext *rdp_ctx) |
BOOL | credssp_auth_init (rdpCredsspAuth *auth, TCHAR *pkg_name, SecPkgContext_Bindings *bindings) |
static BOOL | credssp_auth_setup_auth_data (rdpCredsspAuth *auth, const SEC_WINNT_AUTH_IDENTITY *identity, SEC_WINNT_AUTH_IDENTITY_WINPR *pAuthData) |
static BOOL | credssp_auth_client_init_cred_attributes (rdpCredsspAuth *auth) |
BOOL | credssp_auth_setup_client (rdpCredsspAuth *auth, const char *target_service, const char *target_hostname, const SEC_WINNT_AUTH_IDENTITY *identity, const char *pkinit) |
BOOL | credssp_auth_setup_server (rdpCredsspAuth *auth) |
void | credssp_auth_set_flags (rdpCredsspAuth *auth, ULONG flags) |
int | credssp_auth_authenticate (rdpCredsspAuth *auth) |
BOOL | credssp_auth_encrypt (rdpCredsspAuth *auth, const SecBuffer *plaintext, SecBuffer *ciphertext, size_t *signature_length, ULONG sequence) |
BOOL | credssp_auth_decrypt (rdpCredsspAuth *auth, const SecBuffer *ciphertext, SecBuffer *plaintext, ULONG sequence) |
BOOL | credssp_auth_impersonate (rdpCredsspAuth *auth) |
BOOL | credssp_auth_revert_to_self (rdpCredsspAuth *auth) |
void | credssp_auth_take_input_buffer (rdpCredsspAuth *auth, SecBuffer *buffer) |
const SecBuffer * | credssp_auth_get_output_buffer (rdpCredsspAuth *auth) |
BOOL | credssp_auth_have_output_token (rdpCredsspAuth *auth) |
BOOL | credssp_auth_is_complete (rdpCredsspAuth *auth) |
size_t | credssp_auth_trailer_size (rdpCredsspAuth *auth) |
const char * | credssp_auth_pkg_name (rdpCredsspAuth *auth) |
UINT32 | credssp_auth_sspi_error (rdpCredsspAuth *auth) |
void | credssp_auth_free (rdpCredsspAuth *auth) |
static void | auth_get_sspi_module_from_reg (char **sspi_module) |
BOOL | credssp_auth_set_spn (rdpCredsspAuth *auth, const char *service, const char *hostname) |
static const char * | parseInt (const char *v, INT32 *r) |
#define SERVER_KEY "Software\\" FREERDP_VENDOR_STRING "\\" FREERDP_PRODUCT_STRING "\\Server" |
#define TAG FREERDP_TAG("core.auth") |
FreeRDP: A Remote Desktop Protocol Implementation
Copyright 2012 Marc-Andre Moreau marca Copyright 2022 David Fort ndre .more au@g mail. comconta Copyright 2022 Isaac Klein ct@h arden ing- consu ltin g.comfifth degr ee@pr oton mail. com
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.
enum AUTH_STATE |
|
static |
|
static |
int credssp_auth_authenticate | ( | rdpCredsspAuth * | auth | ) |
SSPI Client Ceremony -------------- ( Client Begin ) -------------- | | \|/ -----------+-------------- | AcquireCredentialsHandle | -------------------------- | | \|/ -------------+-------------- +---------------> / InitializeSecurityContext / | ---------------------------- | | | | | \|/
------------------------— ------—+----------— -------------------— / Receive blob from server / < Received security blob? > –Yes-> / Send blob to server / ----------—+----------— --------------------— -------------------— /|\ | | | No | Yes |/ | | ---------—+--------— |
| No |/ ---—+----—
|
static |
BOOL credssp_auth_decrypt | ( | rdpCredsspAuth * | auth, |
const SecBuffer * | ciphertext, | ||
SecBuffer * | plaintext, | ||
ULONG | sequence | ||
) |
BOOL credssp_auth_encrypt | ( | rdpCredsspAuth * | auth, |
const SecBuffer * | plaintext, | ||
SecBuffer * | ciphertext, | ||
size_t * | signature_length, | ||
ULONG | sequence | ||
) |
void credssp_auth_free | ( | rdpCredsspAuth * | auth | ) |
const SecBuffer* credssp_auth_get_output_buffer | ( | rdpCredsspAuth * | auth | ) |
BOOL credssp_auth_have_output_token | ( | rdpCredsspAuth * | auth | ) |
BOOL credssp_auth_impersonate | ( | rdpCredsspAuth * | auth | ) |
BOOL credssp_auth_init | ( | rdpCredsspAuth * | auth, |
TCHAR * | pkg_name, | ||
SecPkgContext_Bindings * | bindings | ||
) |
BOOL credssp_auth_is_complete | ( | rdpCredsspAuth * | auth | ) |
rdpCredsspAuth* credssp_auth_new | ( | const rdpContext * | rdp_ctx | ) |
const char* credssp_auth_pkg_name | ( | rdpCredsspAuth * | auth | ) |
BOOL credssp_auth_revert_to_self | ( | rdpCredsspAuth * | auth | ) |
void credssp_auth_set_flags | ( | rdpCredsspAuth * | auth, |
ULONG | flags | ||
) |
BOOL credssp_auth_set_spn | ( | rdpCredsspAuth * | auth, |
const char * | service, | ||
const char * | hostname | ||
) |
|
static |
BOOL credssp_auth_setup_client | ( | rdpCredsspAuth * | auth, |
const char * | target_service, | ||
const char * | target_hostname, | ||
const SEC_WINNT_AUTH_IDENTITY * | identity, | ||
const char * | pkinit | ||
) |
|
static |
BOOL credssp_auth_setup_server | ( | rdpCredsspAuth * | auth | ) |
UINT32 credssp_auth_sspi_error | ( | rdpCredsspAuth * | auth | ) |
|
static |
void credssp_auth_take_input_buffer | ( | rdpCredsspAuth * | auth, |
SecBuffer * | buffer | ||
) |
size_t credssp_auth_trailer_size | ( | rdpCredsspAuth * | auth | ) |
|
static |
|
static |
|
static |