1 |
/* wptCardEdit.cpp - OpenPGP editing interface |
/* wptCardEdit.cpp - OpenPGP card editing interface |
2 |
* Copyright (C) 2005, 2006 Timo Schulz |
* Copyright (C) 2005, 2006, 2007 Timo Schulz |
3 |
* |
* |
4 |
* This file is part of WinPT. |
* This file is part of WinPT. |
5 |
* |
* |
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 |
* GNU General Public License for more details. |
* GNU General Public License for more details. |
|
* |
|
|
* You should have received a copy of the GNU General Public License |
|
|
* along with WinPT; if not, write to the Free Software Foundation, |
|
|
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
|
15 |
*/ |
*/ |
|
|
|
16 |
#ifdef HAVE_CONFIG_H |
#ifdef HAVE_CONFIG_H |
17 |
#include <config.h> |
#include <config.h> |
18 |
#endif |
#endif |
27 |
#include "wptTypes.h" |
#include "wptTypes.h" |
28 |
#include "wptW32API.h" |
#include "wptW32API.h" |
29 |
|
|
30 |
|
|
31 |
/* Create a new Smartcard context. */ |
/* Create a new Smartcard context. */ |
32 |
static gpgme_error_t |
static gpgme_error_t |
33 |
gpg_card_new (gpg_card_t *ret_card) |
gpg_card_new (gpg_card_t *ret_card) |
69 |
safe_free (card->url); |
safe_free (card->url); |
70 |
safe_free (card->card_type); |
safe_free (card->card_type); |
71 |
safe_free (card); |
safe_free (card); |
|
|
|
72 |
} |
} |
73 |
|
|
74 |
|
|
85 |
dat = get_locale_date (long_ts, timebuf, DIM (timebuf)-1); |
dat = get_locale_date (long_ts, timebuf, DIM (timebuf)-1); |
86 |
if (!dat) |
if (!dat) |
87 |
return strdup (""); |
return strdup (""); |
|
|
|
88 |
return strdup (dat); |
return strdup (dat); |
89 |
} |
} |
90 |
|
|
328 |
if (n == IDCANCEL) { |
if (n == IDCANCEL) { |
329 |
s = "c\n"; |
s = "c\n"; |
330 |
ce->setResult (GPG_CARDRES_CANCEL); |
ce->setResult (GPG_CARDRES_CANCEL); |
331 |
WriteFile ((HANDLE)fd, s, strlen (s), &n, NULL); |
if (!WriteFile ((HANDLE)fd, s, strlen (s), &n, NULL)) |
332 |
|
log_debug ("list_handler: WriteFile() failed ec=%d\r\n", |
333 |
|
(int)GetLastError ()); |
334 |
wait_card = 0; |
wait_card = 0; |
335 |
} |
} |
336 |
} |
} |