FreeRDP
smartcard_operations.c File Reference
#include <freerdp/config.h>
#include <winpr/assert.h>
#include <winpr/crt.h>
#include <winpr/print.h>
#include <winpr/stream.h>
#include <winpr/smartcard.h>
#include <freerdp/freerdp.h>
#include <freerdp/channels/rdpdr.h>
#include <freerdp/channels/scard.h>
#include <freerdp/utils/rdpdr_utils.h>
#include <freerdp/utils/smartcard_operations.h>
#include <freerdp/utils/smartcard_pack.h>
#include <freerdp/log.h>

Macros

#define TAG   FREERDP_TAG("utils.smartcard.ops")
 

Functions

static LONG smartcard_call_to_operation_handle (SMARTCARD_OPERATION *operation)
 
static LONG smartcard_EstablishContext_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_ReleaseContext_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_IsValidContext_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_ListReaderGroupsA_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_ListReaderGroupsW_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_ListReadersA_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_ListReadersW_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_context_and_two_strings_a_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_context_and_two_strings_w_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_context_and_string_a_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_context_and_string_w_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_LocateCardsA_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_LocateCardsW_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_GetStatusChangeA_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_GetStatusChangeW_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_Cancel_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_ConnectA_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_ConnectW_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_Reconnect_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_Disconnect_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_BeginTransaction_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_EndTransaction_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_State_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_StatusA_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_StatusW_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_Transmit_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_Control_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_GetAttrib_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_SetAttrib_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_AccessStartedEvent_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_LocateCardsByATRA_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_LocateCardsByATRW_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_ReadCacheA_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_ReadCacheW_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_WriteCacheA_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_WriteCacheW_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_GetTransmitCount_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_ReleaseStartedEvent_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_GetReaderIcon_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
static LONG smartcard_GetDeviceTypeId_Decode (wStream *s, SMARTCARD_OPERATION *operation)
 
LONG smartcard_irp_device_control_decode (wStream *s, UINT32 CompletionId, UINT32 FileId, SMARTCARD_OPERATION *operation)
 
static void free_reader_states_a (LPSCARD_READERSTATEA rgReaderStates, UINT32 cReaders)
 
static void free_reader_states_w (LPSCARD_READERSTATEW rgReaderStates, UINT32 cReaders)
 
void smartcard_operation_free (SMARTCARD_OPERATION *op, BOOL allocated)
 

Macro Definition Documentation

◆ TAG

#define TAG   FREERDP_TAG("utils.smartcard.ops")

FreeRDP: A Remote Desktop Protocol Implementation Smartcard Device Service Virtual Channel

Copyright (C) Alexi Volkov alexi.nosp@m.@myr.nosp@m.ealbo.nosp@m.x.co.nosp@m.m 2006 Copyright 2011 O.S. Systems Software Ltda. Copyright 2011 Anthony Tong atong.nosp@m.@tru.nosp@m.stedc.nosp@m.s.co.nosp@m.m Copyright 2015 Thincast Technologies GmbH Copyright 2015 DI (FH) Martin Haimberger marti.nosp@m.n.ha.nosp@m.imber.nosp@m.ger@.nosp@m.thinc.nosp@m.ast..nosp@m.com Copyright 2017 Armin Novak armin.nosp@m..nov.nosp@m.ak@th.nosp@m.inca.nosp@m.st.co.nosp@m.m Copyright 2017 Thincast Technologies GmbH

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.

Function Documentation

◆ free_reader_states_a()

static void free_reader_states_a ( LPSCARD_READERSTATEA  rgReaderStates,
UINT32  cReaders 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ free_reader_states_w()

static void free_reader_states_w ( LPSCARD_READERSTATEW  rgReaderStates,
UINT32  cReaders 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_AccessStartedEvent_Decode()

static LONG smartcard_AccessStartedEvent_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the caller graph for this function:

◆ smartcard_BeginTransaction_Decode()

static LONG smartcard_BeginTransaction_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_call_to_operation_handle()

static LONG smartcard_call_to_operation_handle ( SMARTCARD_OPERATION operation)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_Cancel_Decode()

static LONG smartcard_Cancel_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_ConnectA_Decode()

static LONG smartcard_ConnectA_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_ConnectW_Decode()

static LONG smartcard_ConnectW_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_context_and_string_a_Decode()

static LONG smartcard_context_and_string_a_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_context_and_string_w_Decode()

static LONG smartcard_context_and_string_w_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_context_and_two_strings_a_Decode()

static LONG smartcard_context_and_two_strings_a_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_context_and_two_strings_w_Decode()

static LONG smartcard_context_and_two_strings_w_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_Control_Decode()

static LONG smartcard_Control_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_Disconnect_Decode()

static LONG smartcard_Disconnect_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_EndTransaction_Decode()

static LONG smartcard_EndTransaction_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_EstablishContext_Decode()

static LONG smartcard_EstablishContext_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_GetAttrib_Decode()

static LONG smartcard_GetAttrib_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_GetDeviceTypeId_Decode()

static LONG smartcard_GetDeviceTypeId_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_GetReaderIcon_Decode()

static LONG smartcard_GetReaderIcon_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_GetStatusChangeA_Decode()

static LONG smartcard_GetStatusChangeA_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_GetStatusChangeW_Decode()

static LONG smartcard_GetStatusChangeW_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_GetTransmitCount_Decode()

static LONG smartcard_GetTransmitCount_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_irp_device_control_decode()

LONG smartcard_irp_device_control_decode ( wStream s,
UINT32  CompletionId,
UINT32  FileId,
SMARTCARD_OPERATION operation 
)
Here is the caller graph for this function:

◆ smartcard_IsValidContext_Decode()

static LONG smartcard_IsValidContext_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_ListReaderGroupsA_Decode()

static LONG smartcard_ListReaderGroupsA_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_ListReaderGroupsW_Decode()

static LONG smartcard_ListReaderGroupsW_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_ListReadersA_Decode()

static LONG smartcard_ListReadersA_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_ListReadersW_Decode()

static LONG smartcard_ListReadersW_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_LocateCardsA_Decode()

static LONG smartcard_LocateCardsA_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_LocateCardsByATRA_Decode()

static LONG smartcard_LocateCardsByATRA_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_LocateCardsByATRW_Decode()

static LONG smartcard_LocateCardsByATRW_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_LocateCardsW_Decode()

static LONG smartcard_LocateCardsW_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_operation_free()

void smartcard_operation_free ( SMARTCARD_OPERATION op,
BOOL  allocated 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_ReadCacheA_Decode()

static LONG smartcard_ReadCacheA_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_ReadCacheW_Decode()

static LONG smartcard_ReadCacheW_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_Reconnect_Decode()

static LONG smartcard_Reconnect_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_ReleaseContext_Decode()

static LONG smartcard_ReleaseContext_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_ReleaseStartedEvent_Decode()

static LONG smartcard_ReleaseStartedEvent_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the caller graph for this function:

◆ smartcard_SetAttrib_Decode()

static LONG smartcard_SetAttrib_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_State_Decode()

static LONG smartcard_State_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_StatusA_Decode()

static LONG smartcard_StatusA_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_StatusW_Decode()

static LONG smartcard_StatusW_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_Transmit_Decode()

static LONG smartcard_Transmit_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_WriteCacheA_Decode()

static LONG smartcard_WriteCacheA_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_WriteCacheW_Decode()

static LONG smartcard_WriteCacheW_Decode ( wStream s,
SMARTCARD_OPERATION operation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function: