FreeRDP
smartcard_virtual_gids.c File Reference
#include <freerdp/config.h>
#include <winpr/wlog.h>
#include <winpr/stream.h>
#include <winpr/collections.h>
#include <freerdp/crypto/crypto.h>
#include <zlib.h>
#include "../../crypto/certificate.h"
#include "../../crypto/privatekey.h"
#include "smartcard_virtual_gids.h"

Macros

#define TAG   CHANNELS_TAG("smartcard.vgids")
 
#define VGIDS_EFID_MASTER   0xA000
 
#define VGIDS_EFID_COMMON   0xA010
 
#define VGIDS_EFID_CARDCF   VGIDS_EFID_COMMON
 
#define VGIDS_EFID_CARDAPPS   VGIDS_EFID_COMMON
 
#define VGIDS_EFID_CMAPFILE   VGIDS_EFID_COMMON
 
#define VGIDS_EFID_CARDID   0xA012
 
#define VGIDS_EFID_KXC00   VGIDS_EFID_COMMON
 
#define VGIDS_EFID_CURRENTDF   0x3FFF
 
#define VGIDS_DO_FILESYSTEMTABLE   0xDF1F
 
#define VGIDS_DO_KEYMAP   0xDF20
 
#define VGIDS_DO_CARDID   0xDF20
 
#define VGIDS_DO_CARDAPPS   0xDF21
 
#define VGIDS_DO_CARDCF   0xDF22
 
#define VGIDS_DO_CMAPFILE   0xDF23
 
#define VGIDS_DO_KXC00   0xDF24
 
#define VGIDS_CARDID_SIZE   16
 
#define VGIDS_MAX_PIN_SIZE   127
 
#define VGIDS_DEFAULT_RETRY_COUNTER   3
 
#define VGIDS_KEY_TYPE_KEYEXCHANGE   0x9A
 
#define VGIDS_KEY_TYPE_SIGNATURE   0x9C
 
#define VGIDS_ALGID_RSA_1024   0x06
 
#define VGIDS_ALGID_RSA_2048   0x07
 
#define VGIDS_ALGID_RSA_3072   0x08
 
#define VGIDS_ALGID_RSA_4096   0x09
 
#define VGIDS_SE_CRT_AUTH   0xA4
 
#define VGIDS_SE_CRT_SIGN   0xB6
 
#define VGIDS_SE_CRT_CONF   0xB8
 
#define VGIDS_SE_ALGOID_CT_PAD_PKCS1   0x40
 
#define VGIDS_SE_ALGOID_CT_PAD_OAEP   0x80
 
#define VGIDS_SE_ALGOID_CT_RSA_1024   0x06
 
#define VGIDS_SE_ALGOID_CT_RSA_2048   0x07
 
#define VGIDS_SE_ALGOID_CT_RSA_3072   0x08
 
#define VGIDS_SE_ALGOID_CT_RSA_4096   0x09
 
#define VGIDS_SE_ALGOID_DST_PAD_PKCS1   0x40
 
#define VGIDS_SE_ALGOID_DST_RSA_1024   0x06
 
#define VGIDS_SE_ALGOID_DST_RSA_2048   0x07
 
#define VGIDS_SE_ALGOID_DST_RSA_3072   0x08
 
#define VGIDS_SE_ALGOID_DST_RSA_4096   0x09
 
#define VGIDS_SE_ALGOID_DST_ECDSA_P192   0x0A
 
#define VGIDS_SE_ALGOID_DST_ECDSA_P224   0x0B
 
#define VGIDS_SE_ALGOID_DST_ECDSA_P256   0x0C
 
#define VGIDS_SE_ALGOID_DST_ECDSA_P384   0x0D
 
#define VGIDS_SE_ALGOID_DST_ECDSA_P512   0x0E
 
#define VGIDS_DEFAULT_KEY_REF   0x81
 
#define ISO_INS_SELECT   0xA4
 
#define ISO_INS_GETDATA   0xCB
 
#define ISO_INS_GETRESPONSE   0xC0
 
#define ISO_INS_MSE   0x22
 
#define ISO_INS_PSO   0x2A
 
#define ISO_INS_VERIFY   0x20
 
#define ISO_STATUS_MORE_DATA   0x6100
 
#define ISO_STATUS_VERIFYFAILED   0x6300
 
#define ISO_STATUS_WRONGLC   0x6700
 
#define ISO_STATUS_COMMANDNOTALLOWED   0x6900
 
#define ISO_STATUS_SECURITYSTATUSNOTSATISFIED   0x6982
 
#define ISO_STATUS_AUTHMETHODBLOCKED   0x6983
 
#define ISO_STATUS_INVALIDCOMMANDDATA   0x6A80
 
#define ISO_STATUS_FILENOTFOUND   0x6A82
 
#define ISO_STATUS_INVALIDP1P2   0x6A86
 
#define ISO_STATUS_INVALIDLC   0x6A87
 
#define ISO_STATUS_REFERENCEDATANOTFOUND   0x6A88
 
#define ISO_STATUS_SUCCESS   0x9000
 
#define ISO_AID_MAX_SIZE   16
 
#define ISO_FID_MF   0x3F00
 
#define VGIDS_MAX_DIGEST_INFO   7
 
#define MAX_CONTAINER_NAME_LEN   39
 
#define CONTAINER_MAP_VALID_CONTAINER   1
 
#define CONTAINER_MAP_DEFAULT_CONTAINER   2
 

Functions

static void vgids_ef_free (void *ptr)
 
static vgidsEF * vgids_ef_new (vgidsContext *ctx, USHORT id)
 
static BOOL vgids_write_tlv (wStream *s, UINT16 tag, const void *data, DWORD dataSize)
 
static BOOL vgids_ef_write_do (vgidsEF *ef, UINT16 doID, const void *data, DWORD dataSize)
 
static BOOL vgids_ef_read_do (vgidsEF *ef, UINT16 doID, BYTE **data, DWORD *dataSize)
 
static BOOL vgids_prepare_fstable (const vgidsFilesysTableEntry *fstable, DWORD numEntries, BYTE **outData, DWORD *outDataSize)
 
static BOOL vgids_prepare_certificate (const rdpCertificate *cert, BYTE **kxc, DWORD *kxcSize)
 
static int get_rsa_key_size (const rdpPrivateKey *privateKey)
 
static BYTE vgids_get_algid (vgidsContext *p_Ctx)
 
static BOOL vgids_prepare_keymap (vgidsContext *context, BYTE **outData, DWORD *outDataSize)
 
static BOOL vgids_parse_apdu_header (wStream *s, BYTE *cla, BYTE *ins, BYTE *p1, BYTE *p2, BYTE *lc, BYTE *le)
 
static BOOL vgids_create_response (UINT16 status, const BYTE *answer, DWORD answerSize, BYTE **outData, DWORD *outDataSize)
 
static BOOL vgids_read_do_fkt (void *data, size_t index, va_list ap)
 
static void vgids_read_do (vgidsContext *context, UINT16 efID, UINT16 doID)
 
static void vgids_reset_context_response (vgidsContext *context)
 
static void vgids_reset_context_command_data (vgidsContext *context)
 
static BOOL vgids_ins_select (vgidsContext *context, wStream *s, BYTE **response, DWORD *responseSize)
 
static UINT16 vgids_handle_chained_response (vgidsContext *context, const BYTE **response, DWORD *responseSize)
 
static BOOL vgids_get_public_key (vgidsContext *context, UINT16 doTag)
 
static BOOL vgids_ins_getdata (vgidsContext *context, wStream *s, BYTE **response, DWORD *responseSize)
 
static BOOL vgids_ins_manage_security_environment (vgidsContext *context, wStream *s, BYTE **response, DWORD *responseSize)
 
static BOOL vgids_perform_digital_signature (vgidsContext *context)
 
static BOOL vgids_perform_decrypt (vgidsContext *context)
 
static BOOL vgids_ins_perform_security_operation (vgidsContext *context, wStream *s, BYTE **response, DWORD *responseSize)
 
static BOOL vgids_ins_getresponse (vgidsContext *context, wStream *s, BYTE **response, DWORD *responseSize)
 
static BOOL vgids_ins_verify (vgidsContext *context, wStream *s, BYTE **response, DWORD *responseSize)
 
vgidsContext * vgids_new (void)
 
BOOL vgids_init (vgidsContext *ctx, const char *cert, const char *privateKey, const char *pin)
 
BOOL vgids_process_apdu (vgidsContext *context, const BYTE *data, DWORD dataSize, BYTE **response, DWORD *responseSize)
 
void vgids_free (vgidsContext *context)
 

Variables

static const BYTE g_PKCS1_SHA1 []
 
static const BYTE g_PKCS1_SHA224 []
 
static const BYTE g_PKCS1_SHA256 []
 
static const BYTE g_PKCS1_SHA384 []
 
static const BYTE g_PKCS1_SHA512 []
 
static const BYTE g_PKCS1_SHA512_224 []
 
static const BYTE g_PKCS1_SHA512_256 []
 
static const BYTE g_MsGidsAID []
 
static const BYTE g_GidsAppFCP [] = { 0x62, 0x08, 0x82, 0x01, 0x38, 0x8C, 0x03, 0x03, 0x30, 0x30 }
 
static const BYTE g_GidsAppFCI []
 
static const BYTE g_CardCFContents [] = { 0x00, 0x00, 0x01, 0x00, 0x04, 0x00 }
 
static const BYTE g_CardAppsContents [] = { 0x6d, 0x73, 0x63, 0x70, 0x00, 0x00, 0x00, 0x00 }
 

Macro Definition Documentation

◆ CONTAINER_MAP_DEFAULT_CONTAINER

#define CONTAINER_MAP_DEFAULT_CONTAINER   2

◆ CONTAINER_MAP_VALID_CONTAINER

#define CONTAINER_MAP_VALID_CONTAINER   1

◆ ISO_AID_MAX_SIZE

#define ISO_AID_MAX_SIZE   16

◆ ISO_FID_MF

#define ISO_FID_MF   0x3F00

◆ ISO_INS_GETDATA

#define ISO_INS_GETDATA   0xCB

◆ ISO_INS_GETRESPONSE

#define ISO_INS_GETRESPONSE   0xC0

◆ ISO_INS_MSE

#define ISO_INS_MSE   0x22

◆ ISO_INS_PSO

#define ISO_INS_PSO   0x2A

◆ ISO_INS_SELECT

#define ISO_INS_SELECT   0xA4

◆ ISO_INS_VERIFY

#define ISO_INS_VERIFY   0x20

◆ ISO_STATUS_AUTHMETHODBLOCKED

#define ISO_STATUS_AUTHMETHODBLOCKED   0x6983

◆ ISO_STATUS_COMMANDNOTALLOWED

#define ISO_STATUS_COMMANDNOTALLOWED   0x6900

◆ ISO_STATUS_FILENOTFOUND

#define ISO_STATUS_FILENOTFOUND   0x6A82

◆ ISO_STATUS_INVALIDCOMMANDDATA

#define ISO_STATUS_INVALIDCOMMANDDATA   0x6A80

◆ ISO_STATUS_INVALIDLC

#define ISO_STATUS_INVALIDLC   0x6A87

◆ ISO_STATUS_INVALIDP1P2

#define ISO_STATUS_INVALIDP1P2   0x6A86

◆ ISO_STATUS_MORE_DATA

#define ISO_STATUS_MORE_DATA   0x6100

◆ ISO_STATUS_REFERENCEDATANOTFOUND

#define ISO_STATUS_REFERENCEDATANOTFOUND   0x6A88

◆ ISO_STATUS_SECURITYSTATUSNOTSATISFIED

#define ISO_STATUS_SECURITYSTATUSNOTSATISFIED   0x6982

◆ ISO_STATUS_SUCCESS

#define ISO_STATUS_SUCCESS   0x9000

◆ ISO_STATUS_VERIFYFAILED

#define ISO_STATUS_VERIFYFAILED   0x6300

◆ ISO_STATUS_WRONGLC

#define ISO_STATUS_WRONGLC   0x6700

◆ MAX_CONTAINER_NAME_LEN

#define MAX_CONTAINER_NAME_LEN   39

◆ TAG

#define TAG   CHANNELS_TAG("smartcard.vgids")

WinPR: Windows Portable Runtime Virtual GIDS implementation

Copyright 2021 Martin Fleisz marti.nosp@m.n.fl.nosp@m.eisz@.nosp@m.thin.nosp@m.cast..nosp@m.com Copyright 2023 Armin Novak anova.nosp@m.k@th.nosp@m.incas.nosp@m.t.co.nosp@m.m Copyright 2021,2023 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.

◆ VGIDS_ALGID_RSA_1024

#define VGIDS_ALGID_RSA_1024   0x06

◆ VGIDS_ALGID_RSA_2048

#define VGIDS_ALGID_RSA_2048   0x07

◆ VGIDS_ALGID_RSA_3072

#define VGIDS_ALGID_RSA_3072   0x08

◆ VGIDS_ALGID_RSA_4096

#define VGIDS_ALGID_RSA_4096   0x09

◆ VGIDS_CARDID_SIZE

#define VGIDS_CARDID_SIZE   16

◆ VGIDS_DEFAULT_KEY_REF

#define VGIDS_DEFAULT_KEY_REF   0x81

◆ VGIDS_DEFAULT_RETRY_COUNTER

#define VGIDS_DEFAULT_RETRY_COUNTER   3

◆ VGIDS_DO_CARDAPPS

#define VGIDS_DO_CARDAPPS   0xDF21

◆ VGIDS_DO_CARDCF

#define VGIDS_DO_CARDCF   0xDF22

◆ VGIDS_DO_CARDID

#define VGIDS_DO_CARDID   0xDF20

◆ VGIDS_DO_CMAPFILE

#define VGIDS_DO_CMAPFILE   0xDF23

◆ VGIDS_DO_FILESYSTEMTABLE

#define VGIDS_DO_FILESYSTEMTABLE   0xDF1F

◆ VGIDS_DO_KEYMAP

#define VGIDS_DO_KEYMAP   0xDF20

◆ VGIDS_DO_KXC00

#define VGIDS_DO_KXC00   0xDF24

◆ VGIDS_EFID_CARDAPPS

#define VGIDS_EFID_CARDAPPS   VGIDS_EFID_COMMON

◆ VGIDS_EFID_CARDCF

#define VGIDS_EFID_CARDCF   VGIDS_EFID_COMMON

◆ VGIDS_EFID_CARDID

#define VGIDS_EFID_CARDID   0xA012

◆ VGIDS_EFID_CMAPFILE

#define VGIDS_EFID_CMAPFILE   VGIDS_EFID_COMMON

◆ VGIDS_EFID_COMMON

#define VGIDS_EFID_COMMON   0xA010

◆ VGIDS_EFID_CURRENTDF

#define VGIDS_EFID_CURRENTDF   0x3FFF

◆ VGIDS_EFID_KXC00

#define VGIDS_EFID_KXC00   VGIDS_EFID_COMMON

◆ VGIDS_EFID_MASTER

#define VGIDS_EFID_MASTER   0xA000

◆ VGIDS_KEY_TYPE_KEYEXCHANGE

#define VGIDS_KEY_TYPE_KEYEXCHANGE   0x9A

◆ VGIDS_KEY_TYPE_SIGNATURE

#define VGIDS_KEY_TYPE_SIGNATURE   0x9C

◆ VGIDS_MAX_DIGEST_INFO

#define VGIDS_MAX_DIGEST_INFO   7

◆ VGIDS_MAX_PIN_SIZE

#define VGIDS_MAX_PIN_SIZE   127

◆ VGIDS_SE_ALGOID_CT_PAD_OAEP

#define VGIDS_SE_ALGOID_CT_PAD_OAEP   0x80

◆ VGIDS_SE_ALGOID_CT_PAD_PKCS1

#define VGIDS_SE_ALGOID_CT_PAD_PKCS1   0x40

◆ VGIDS_SE_ALGOID_CT_RSA_1024

#define VGIDS_SE_ALGOID_CT_RSA_1024   0x06

◆ VGIDS_SE_ALGOID_CT_RSA_2048

#define VGIDS_SE_ALGOID_CT_RSA_2048   0x07

◆ VGIDS_SE_ALGOID_CT_RSA_3072

#define VGIDS_SE_ALGOID_CT_RSA_3072   0x08

◆ VGIDS_SE_ALGOID_CT_RSA_4096

#define VGIDS_SE_ALGOID_CT_RSA_4096   0x09

◆ VGIDS_SE_ALGOID_DST_ECDSA_P192

#define VGIDS_SE_ALGOID_DST_ECDSA_P192   0x0A

◆ VGIDS_SE_ALGOID_DST_ECDSA_P224

#define VGIDS_SE_ALGOID_DST_ECDSA_P224   0x0B

◆ VGIDS_SE_ALGOID_DST_ECDSA_P256

#define VGIDS_SE_ALGOID_DST_ECDSA_P256   0x0C

◆ VGIDS_SE_ALGOID_DST_ECDSA_P384

#define VGIDS_SE_ALGOID_DST_ECDSA_P384   0x0D

◆ VGIDS_SE_ALGOID_DST_ECDSA_P512

#define VGIDS_SE_ALGOID_DST_ECDSA_P512   0x0E

◆ VGIDS_SE_ALGOID_DST_PAD_PKCS1

#define VGIDS_SE_ALGOID_DST_PAD_PKCS1   0x40

◆ VGIDS_SE_ALGOID_DST_RSA_1024

#define VGIDS_SE_ALGOID_DST_RSA_1024   0x06

◆ VGIDS_SE_ALGOID_DST_RSA_2048

#define VGIDS_SE_ALGOID_DST_RSA_2048   0x07

◆ VGIDS_SE_ALGOID_DST_RSA_3072

#define VGIDS_SE_ALGOID_DST_RSA_3072   0x08

◆ VGIDS_SE_ALGOID_DST_RSA_4096

#define VGIDS_SE_ALGOID_DST_RSA_4096   0x09

◆ VGIDS_SE_CRT_AUTH

#define VGIDS_SE_CRT_AUTH   0xA4

◆ VGIDS_SE_CRT_CONF

#define VGIDS_SE_CRT_CONF   0xB8

◆ VGIDS_SE_CRT_SIGN

#define VGIDS_SE_CRT_SIGN   0xB6

Function Documentation

◆ get_rsa_key_size()

static int get_rsa_key_size ( const rdpPrivateKey *  privateKey)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_create_response()

static BOOL vgids_create_response ( UINT16  status,
const BYTE answer,
DWORD  answerSize,
BYTE **  outData,
DWORD *  outDataSize 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_ef_free()

void vgids_ef_free ( void *  ptr)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_ef_new()

static vgidsEF* vgids_ef_new ( vgidsContext *  ctx,
USHORT  id 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_ef_read_do()

static BOOL vgids_ef_read_do ( vgidsEF *  ef,
UINT16  doID,
BYTE **  data,
DWORD *  dataSize 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_ef_write_do()

static BOOL vgids_ef_write_do ( vgidsEF *  ef,
UINT16  doID,
const void *  data,
DWORD  dataSize 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_free()

void vgids_free ( vgidsContext *  context)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_get_algid()

static BYTE vgids_get_algid ( vgidsContext *  p_Ctx)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_get_public_key()

static BOOL vgids_get_public_key ( vgidsContext *  context,
UINT16  doTag 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_handle_chained_response()

static UINT16 vgids_handle_chained_response ( vgidsContext *  context,
const BYTE **  response,
DWORD *  responseSize 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_init()

BOOL vgids_init ( vgidsContext *  ctx,
const char *  cert,
const char *  privateKey,
const char *  pin 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_ins_getdata()

static BOOL vgids_ins_getdata ( vgidsContext *  context,
wStream s,
BYTE **  response,
DWORD *  responseSize 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_ins_getresponse()

static BOOL vgids_ins_getresponse ( vgidsContext *  context,
wStream s,
BYTE **  response,
DWORD *  responseSize 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_ins_manage_security_environment()

static BOOL vgids_ins_manage_security_environment ( vgidsContext *  context,
wStream s,
BYTE **  response,
DWORD *  responseSize 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_ins_perform_security_operation()

static BOOL vgids_ins_perform_security_operation ( vgidsContext *  context,
wStream s,
BYTE **  response,
DWORD *  responseSize 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_ins_select()

static BOOL vgids_ins_select ( vgidsContext *  context,
wStream s,
BYTE **  response,
DWORD *  responseSize 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_ins_verify()

static BOOL vgids_ins_verify ( vgidsContext *  context,
wStream s,
BYTE **  response,
DWORD *  responseSize 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_new()

vgidsContext* vgids_new ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_parse_apdu_header()

static BOOL vgids_parse_apdu_header ( wStream s,
BYTE cla,
BYTE ins,
BYTE p1,
BYTE p2,
BYTE lc,
BYTE le 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_perform_decrypt()

static BOOL vgids_perform_decrypt ( vgidsContext *  context)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_perform_digital_signature()

static BOOL vgids_perform_digital_signature ( vgidsContext *  context)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_prepare_certificate()

static BOOL vgids_prepare_certificate ( const rdpCertificate *  cert,
BYTE **  kxc,
DWORD *  kxcSize 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_prepare_fstable()

static BOOL vgids_prepare_fstable ( const vgidsFilesysTableEntry *  fstable,
DWORD  numEntries,
BYTE **  outData,
DWORD *  outDataSize 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_prepare_keymap()

static BOOL vgids_prepare_keymap ( vgidsContext *  context,
BYTE **  outData,
DWORD *  outDataSize 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_process_apdu()

BOOL vgids_process_apdu ( vgidsContext *  context,
const BYTE data,
DWORD  dataSize,
BYTE **  response,
DWORD *  responseSize 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_read_do()

static void vgids_read_do ( vgidsContext *  context,
UINT16  efID,
UINT16  doID 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_read_do_fkt()

static BOOL vgids_read_do_fkt ( void *  data,
size_t  index,
va_list  ap 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_reset_context_command_data()

static void vgids_reset_context_command_data ( vgidsContext *  context)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_reset_context_response()

static void vgids_reset_context_response ( vgidsContext *  context)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vgids_write_tlv()

static BOOL vgids_write_tlv ( wStream s,
UINT16  tag,
const void *  data,
DWORD  dataSize 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ g_CardAppsContents

const BYTE g_CardAppsContents[] = { 0x6d, 0x73, 0x63, 0x70, 0x00, 0x00, 0x00, 0x00 }
static

◆ g_CardCFContents

const BYTE g_CardCFContents[] = { 0x00, 0x00, 0x01, 0x00, 0x04, 0x00 }
static

◆ g_GidsAppFCI

const BYTE g_GidsAppFCI[]
static
Initial value:
= { 0x61, 0x12, 0x4F, 0x0B, 0xA0, 0x00, 0x00, 0x03, 0x97, 0x42,
0x54, 0x46, 0x59, 0x02, 0x01, 0x73, 0x03, 0x40, 0x01, 0xC0 }

◆ g_GidsAppFCP

const BYTE g_GidsAppFCP[] = { 0x62, 0x08, 0x82, 0x01, 0x38, 0x8C, 0x03, 0x03, 0x30, 0x30 }
static

◆ g_MsGidsAID

const BYTE g_MsGidsAID[]
static
Initial value:
= {
0xA0, 0x00, 0x00, 0x03, 0x97, 0x42, 0x54, 0x46, 0x59, 0x02, 0x01
}

◆ g_PKCS1_SHA1

const BYTE g_PKCS1_SHA1[]
static
Initial value:
= { 0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e,
0x03, 0x02, 0x1a, 0x05, 0x00, 0x04, 0x14 }

◆ g_PKCS1_SHA224

const BYTE g_PKCS1_SHA224[]
static
Initial value:
= { 0x30, 0x2d, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01,
0x65, 0x03, 0x04, 0x02, 0x04, 0x05, 0x00, 0x04, 0x1c }

◆ g_PKCS1_SHA256

const BYTE g_PKCS1_SHA256[]
static
Initial value:
= { 0x30, 0x31, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01,
0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00, 0x04, 0x20 }

◆ g_PKCS1_SHA384

const BYTE g_PKCS1_SHA384[]
static
Initial value:
= { 0x30, 0x41, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01,
0x65, 0x03, 0x04, 0x02, 0x02, 0x05, 0x00, 0x04, 0x30 }

◆ g_PKCS1_SHA512

const BYTE g_PKCS1_SHA512[]
static
Initial value:
= { 0x30, 0x51, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01,
0x65, 0x03, 0x04, 0x02, 0x03, 0x05, 0x00, 0x04, 0x40 }

◆ g_PKCS1_SHA512_224

const BYTE g_PKCS1_SHA512_224[]
static
Initial value:
= { 0x30, 0x2d, 0x30, 0x0d, 0x06, 0x09, 0x60,
0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02,
0x05, 0x05, 0x00, 0x04, 0x1c }

◆ g_PKCS1_SHA512_256

const BYTE g_PKCS1_SHA512_256[]
static
Initial value:
= { 0x30, 0x31, 0x30, 0x0d, 0x06, 0x09, 0x60,
0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02,
0x06, 0x05, 0x00, 0x04, 0x20 }