1 |
|
/* OpenPGP Smart Card Mini Driver |
2 |
|
Copyright (C) 2009 Vincent Le Toux |
3 |
|
|
4 |
|
This library is Free software; you can redistribute it and/or |
5 |
|
modify it under the terms of the GNU Lesser General Public |
6 |
|
License version 2.1 as published by the Free Software Foundation. |
7 |
|
|
8 |
|
This library is distributed in the hope that it will be useful, |
9 |
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 |
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
11 |
|
Lesser General Public License for more details. |
12 |
|
|
13 |
|
You should have received a copy of the GNU Lesser General Public |
14 |
|
License along with this library; if not, write to the Free Software |
15 |
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
16 |
|
*/ |
17 |
|
|
18 |
#include <windows.h> |
#include <windows.h> |
19 |
|
|
20 |
|
|
21 |
|
|
22 |
DWORD getTlvSize(__in PBYTE pbPointer, __in PDWORD pdwOffset) |
DWORD getTlvSize(__in PBYTE pbPointer, __in PDWORD pdwOffset) |
23 |
{ |
{ |
24 |
DWORD dwSize; |
DWORD dwSize; |
40 |
return dwSize; |
return dwSize; |
41 |
} |
} |
42 |
|
|
43 |
|
/** used to parse tlv data returned when reading the public certificate */ |
44 |
BOOL find_tlv(__in PBYTE pbData, __in DWORD dwTlvSearched, __in DWORD dwTotalSize, __out PBYTE *pbDataOut, __out_opt PDWORD pdwSize) |
BOOL find_tlv(__in PBYTE pbData, __in DWORD dwTlvSearched, __in DWORD dwTotalSize, __out PBYTE *pbDataOut, __out_opt PDWORD pdwSize) |
45 |
{ |
{ |
46 |
DWORD dwOffset = 0, dwTlv ; |
DWORD dwOffset = 0, dwTlv ; |