FreeRDP
smartcardlogon.c File Reference
#include <string.h>
#include <openssl/bio.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
#include <openssl/objects.h>
#include <winpr/error.h>
#include <winpr/ncrypt.h>
#include <winpr/string.h>
#include <winpr/wlog.h>
#include <winpr/smartcard.h>
#include <winpr/crypto.h>
#include <winpr/path.h>
#include <freerdp/log.h>
#include <freerdp/utils/smartcardlogon.h>

Macros

#define TAG   FREERDP_TAG("smartcardlogon")
 

Functions

static BOOL getAtr (LPWSTR readerName, BYTE *atr, DWORD *atrLen)
 
static void smartcardCertInfo_Free (SmartcardCertInfo *scCert)
 
static void delete_file (char *path)
 
static void smartcardCertInfoPrivate_Free (SmartcardCertInfoPrivate *scCert)
 
void smartcardCerts_Free (SmartcardCerts *scCert)
 
static BOOL treat_sc_cert (SmartcardCertInfo *scCert)
 
static int allocating_sprintf (char **dst, const char *fmt,...)
 
static BOOL build_pkinit_args (const rdpSettings *settings, SmartcardCertInfo *scCert)
 
static BOOL smartcard_hw_enumerateCerts (const rdpSettings *settings, LPCWSTR csp, const char *reader, const char *userFilter, SmartcardCerts **scCerts, DWORD *retCount)
 
static BOOL write_pem (const char *file, const char *pem)
 
static char * create_temporary_file (void)
 
static BOOL smartcard_sw_enumerateCerts (const rdpSettings *settings, SmartcardCerts **scCerts, DWORD *retCount)
 
BOOL smartcard_enumerateCerts (const rdpSettings *settings, SmartcardCerts **scCerts, DWORD *retCount)
 
const SmartcardCertInfosmartcard_getCertInfo (SmartcardCerts *scCerts, DWORD index)
 

Macro Definition Documentation

◆ TAG

#define TAG   FREERDP_TAG("smartcardlogon")

FreeRDP: A Remote Desktop Protocol Implementation Logging in with smartcards

Copyright 2022 David Fort conta.nosp@m.ct@h.nosp@m.arden.nosp@m.ing-.nosp@m.consu.nosp@m.ltin.nosp@m.g.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.

Function Documentation

◆ allocating_sprintf()

static int allocating_sprintf ( char **  dst,
const char *  fmt,
  ... 
)
static
Here is the caller graph for this function:

◆ build_pkinit_args()

static BOOL build_pkinit_args ( const rdpSettings *  settings,
SmartcardCertInfo scCert 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_temporary_file()

static char* create_temporary_file ( void  )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ delete_file()

static void delete_file ( char *  path)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAtr()

static BOOL getAtr ( LPWSTR  readerName,
BYTE atr,
DWORD *  atrLen 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_enumerateCerts()

BOOL smartcard_enumerateCerts ( const rdpSettings *  settings,
SmartcardCerts **  scCerts,
DWORD *  retCount 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_getCertInfo()

const SmartcardCertInfo* smartcard_getCertInfo ( SmartcardCerts *  scCerts,
DWORD  index 
)
Here is the caller graph for this function:

◆ smartcard_hw_enumerateCerts()

static BOOL smartcard_hw_enumerateCerts ( const rdpSettings *  settings,
LPCWSTR  csp,
const char *  reader,
const char *  userFilter,
SmartcardCerts **  scCerts,
DWORD *  retCount 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcard_sw_enumerateCerts()

static BOOL smartcard_sw_enumerateCerts ( const rdpSettings *  settings,
SmartcardCerts **  scCerts,
DWORD *  retCount 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcardCertInfo_Free()

static void smartcardCertInfo_Free ( SmartcardCertInfo scCert)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcardCertInfoPrivate_Free()

static void smartcardCertInfoPrivate_Free ( SmartcardCertInfoPrivate *  scCert)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smartcardCerts_Free()

void smartcardCerts_Free ( SmartcardCerts *  scCert)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ treat_sc_cert()

static BOOL treat_sc_cert ( SmartcardCertInfo scCert)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_pem()

static BOOL write_pem ( const char *  file,
const char *  pem 
)
static
Here is the call graph for this function:
Here is the caller graph for this function: