Fixed const correctness of freerdp_smartcard_list

This commit is contained in:
Armin Novak 2022-02-02 13:22:08 +01:00 committed by akallabeth
parent b46d74806e
commit 649527ef8d
4 changed files with 10 additions and 10 deletions

View File

@ -19,7 +19,7 @@
#include <freerdp/utils/smartcard_cli.h>
#include "../../libfreerdp/core/smartcardlogon.h"
BOOL freerdp_smartcard_list(rdpSettings* settings)
BOOL freerdp_smartcard_list(const rdpSettings* settings)
{
SmartcardCert certs[64] = { 0 };
DWORD i, count;

View File

@ -28,7 +28,7 @@ extern "C"
{
#endif /* __cplusplus */
FREERDP_API BOOL freerdp_smartcard_list(rdpSettings* settings);
FREERDP_API BOOL freerdp_smartcard_list(const rdpSettings* settings);
#ifdef __cplusplus
}

View File

@ -127,7 +127,7 @@ static BOOL treat_sc_cert(SmartcardCert* scCert)
}
#ifndef _WIN32
static BOOL build_pkinit_args(rdpSettings* settings, SmartcardCert* scCert)
static BOOL build_pkinit_args(const rdpSettings* settings, SmartcardCert* scCert)
{
/* pkinit args only under windows
* PKCS11:module_name=opensc-pkcs11.so
@ -149,9 +149,9 @@ static BOOL build_pkinit_args(rdpSettings* settings, SmartcardCert* scCert)
}
#endif /* _WIN32 */
static BOOL smartcard_hw_enumerateCerts(rdpSettings* settings, LPCWSTR csp, const char* reader,
const char* userFilter, SmartcardCert* scCert, DWORD count,
DWORD* retCount)
static BOOL smartcard_hw_enumerateCerts(const rdpSettings* settings, LPCWSTR csp,
const char* reader, const char* userFilter,
SmartcardCert* scCert, DWORD count, DWORD* retCount)
{
BOOL ret = FALSE;
LPWSTR scope = NULL;
@ -333,8 +333,8 @@ out:
return ret;
}
static BOOL smartcard_sw_enumerateCerts(rdpSettings* settings, SmartcardCert* scCert, DWORD count,
DWORD* retCount)
static BOOL smartcard_sw_enumerateCerts(const rdpSettings* settings, SmartcardCert* scCert,
DWORD count, DWORD* retCount)
{
size_t sz;
@ -382,7 +382,7 @@ out_error:
return FALSE;
}
BOOL smartcard_enumerateCerts(rdpSettings* settings, SmartcardCert* scCert, DWORD count,
BOOL smartcard_enumerateCerts(const rdpSettings* settings, SmartcardCert* scCert, DWORD count,
DWORD* retCount)
{
BOOL ret;

View File

@ -42,7 +42,7 @@ typedef struct _SmartcardCert SmartcardCert;
FREERDP_API void smartcardCert_Free(SmartcardCert* scCert);
FREERDP_API BOOL smartcard_enumerateCerts(rdpSettings* settings, SmartcardCert* scCert, DWORD count,
FREERDP_API BOOL smartcard_enumerateCerts(const rdpSettings* settings, SmartcardCert* scCert, DWORD count,
DWORD* retCount);
#endif /* LIBFREERDP_CORE_SMARTCARDLOGON_H */