49 |
dwReturn = SCARD_E_INVALID_PARAMETER; |
dwReturn = SCARD_E_INVALID_PARAMETER; |
50 |
__leave; |
__leave; |
51 |
} |
} |
52 |
if (bContainerIndex >= MaxContainer) |
if (bContainerIndex >= ContainerMax) |
53 |
{ |
{ |
54 |
Trace(WINEVENT_LEVEL_ERROR, L"bContainerIndex == %d",bContainerIndex); |
Trace(WINEVENT_LEVEL_ERROR, L"bContainerIndex == %d",bContainerIndex); |
55 |
dwReturn = SCARD_E_NO_KEY_CONTAINER; |
dwReturn = SCARD_E_NO_KEY_CONTAINER; |
56 |
__leave; |
__leave; |
57 |
} |
} |
|
if (Containers[bContainerIndex].dwKeySpec != dwKeySpec) |
|
|
{ |
|
|
Trace(WINEVENT_LEVEL_ERROR, L"dwKeySpec == %d",dwKeySpec); |
|
|
dwReturn = SCARD_E_UNSUPPORTED_FEATURE; |
|
|
__leave; |
|
|
} |
|
58 |
// controls are done in CardCreateContainerEx |
// controls are done in CardCreateContainerEx |
59 |
dwReturn = CardCreateContainerEx(pCardData, |
dwReturn = CardCreateContainerEx(pCardData, |
60 |
bContainerIndex, |
bContainerIndex, |
103 |
dwReturn = SCARD_E_INVALID_PARAMETER; |
dwReturn = SCARD_E_INVALID_PARAMETER; |
104 |
__leave; |
__leave; |
105 |
} |
} |
106 |
if (bContainerIndex >= MaxContainer) |
if (bContainerIndex >= ContainerMax) |
107 |
{ |
{ |
108 |
Trace(WINEVENT_LEVEL_ERROR, L"bContainerIndex == %d",bContainerIndex); |
Trace(WINEVENT_LEVEL_ERROR, L"bContainerIndex == %d",bContainerIndex); |
109 |
dwReturn = SCARD_E_NO_KEY_CONTAINER; |
dwReturn = SCARD_E_NO_KEY_CONTAINER; |
214 |
dwReturn = SCARD_E_INVALID_PARAMETER; |
dwReturn = SCARD_E_INVALID_PARAMETER; |
215 |
__leave; |
__leave; |
216 |
} |
} |
217 |
if (bContainerIndex >= MaxContainer) |
if (bContainerIndex >= ContainerMax) |
218 |
{ |
{ |
219 |
Trace(WINEVENT_LEVEL_ERROR, L"bContainerIndex == %d",bContainerIndex); |
Trace(WINEVENT_LEVEL_ERROR, L"bContainerIndex == %d",bContainerIndex); |
220 |
dwReturn = SCARD_E_NO_KEY_CONTAINER; |
dwReturn = SCARD_E_NO_KEY_CONTAINER; |
231 |
pContainerInfo->cbKeyExPublicKey = 0; |
pContainerInfo->cbKeyExPublicKey = 0; |
232 |
switch(bContainerIndex) |
switch(bContainerIndex) |
233 |
{ |
{ |
234 |
case Signature: |
case ContainerSignature: |
235 |
case Authentication: |
case ContainerAuthentication: |
236 |
dwReturn = OCardReadPublicKey(pCardData, bContainerIndex, |
dwReturn = OCardReadPublicKey(pCardData, bContainerIndex, |
237 |
&(pContainerInfo->pbSigPublicKey),&(pContainerInfo->cbSigPublicKey)); |
&(pContainerInfo->pbSigPublicKey),&(pContainerInfo->cbSigPublicKey)); |
238 |
break; |
break; |
239 |
case Confidentiality: |
case ContainerConfidentiality: |
240 |
dwReturn = OCardReadPublicKey(pCardData, bContainerIndex, |
dwReturn = OCardReadPublicKey(pCardData, bContainerIndex, |
241 |
&(pContainerInfo->pbKeyExPublicKey),&(pContainerInfo->cbKeyExPublicKey)); |
&(pContainerInfo->pbKeyExPublicKey),&(pContainerInfo->cbKeyExPublicKey)); |
242 |
break; |
break; |