mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
* g10.c (main) [ENABLE_CARD_SUPPORT]: Add a default for
--pcsc-driver. * cardglue.c (learn_status_cb): Fixed faulty use of !space.
This commit is contained in:
parent
8fbf5b8aba
commit
bc45e6e065
@ -1,3 +1,10 @@
|
||||
2003-10-25 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* g10.c (main) [ENABLE_CARD_SUPPORT]: Add a default for
|
||||
--pcsc-driver.
|
||||
|
||||
* cardglue.c (learn_status_cb): Fixed faulty use of !space.
|
||||
|
||||
2003-10-24 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* apdu.c (apdu_open_reader): Hacks for PC/SC under Windows.
|
||||
|
@ -298,7 +298,8 @@ ct_activate_card (int reader)
|
||||
{
|
||||
log_error ("ct_activate_card(%d): activation failed: %s\n",
|
||||
reader, ct_error_string (rc));
|
||||
log_printhex ("buffer:", buf, buflen);
|
||||
if (!rc)
|
||||
log_printhex (" received data:", buf, buflen);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -972,7 +973,7 @@ apdu_open_reader (const char *portstr)
|
||||
pcsc_disconnect = dlsym (handle, "SCardDisconnect");
|
||||
pcsc_status = dlsym (handle, "SCardStatus");
|
||||
#ifdef _WIN32
|
||||
if (pcsc_status)
|
||||
if (!pcsc_status)
|
||||
pcsc_status = dlsym (handle, "SCardStatusA");
|
||||
#endif
|
||||
pcsc_begin_transaction = dlsym (handle, "SCardBeginTransaction");
|
||||
|
@ -413,14 +413,14 @@ learn_status_cb (void *opaque, const char *line)
|
||||
while (spacep (p))
|
||||
p++;
|
||||
parm->chv1_cached = atoi (p);
|
||||
while (!spacep (p))
|
||||
while (*p && !spacep (p))
|
||||
p++;
|
||||
while (spacep (p))
|
||||
p++;
|
||||
for (i=0; *p && i < 3; i++)
|
||||
{
|
||||
parm->chvmaxlen[i] = atoi (p);
|
||||
while (!spacep (p))
|
||||
while (*p && !spacep (p))
|
||||
p++;
|
||||
while (spacep (p))
|
||||
p++;
|
||||
@ -428,7 +428,7 @@ learn_status_cb (void *opaque, const char *line)
|
||||
for (i=0; *p && i < 3; i++)
|
||||
{
|
||||
parm->chvretry[i] = atoi (p);
|
||||
while (!spacep (p))
|
||||
while (*p && !spacep (p))
|
||||
p++;
|
||||
while (spacep (p))
|
||||
p++;
|
||||
@ -439,7 +439,7 @@ learn_status_cb (void *opaque, const char *line)
|
||||
else if (keywordlen == 7 && !memcmp (keyword, "KEY-FPR", keywordlen))
|
||||
{
|
||||
int no = atoi (line);
|
||||
while (!spacep (line))
|
||||
while (* line && !spacep (line))
|
||||
line++;
|
||||
while (spacep (line))
|
||||
line++;
|
||||
@ -568,7 +568,7 @@ genkey_status_cb (void *opaque, const char *line)
|
||||
const char *name = line;
|
||||
char *buf;
|
||||
|
||||
while (!spacep (line))
|
||||
while (*line && !spacep (line))
|
||||
line++;
|
||||
while (spacep (line))
|
||||
line++;
|
||||
|
@ -880,6 +880,10 @@ ccid_transceive (ccid_driver_t handle,
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
/* Fixme: The next line for the current Valgrid without support
|
||||
for USB IOCTLs. */
|
||||
memset (recv_buffer, 0, sizeof recv_buffer);
|
||||
|
||||
msg = recv_buffer;
|
||||
rc = bulk_in (handle, msg, sizeof recv_buffer, &msglen,
|
||||
RDR_to_PC_DataBlock, seqno);
|
||||
|
@ -1218,6 +1218,14 @@ main( int argc, char **argv )
|
||||
if( !*opt.homedir )
|
||||
set_homedir ( GNUPG_HOMEDIR );
|
||||
|
||||
#ifdef ENABLE_CARD_SUPPORT
|
||||
# ifdef _WIN32
|
||||
opt.pcsc_driver = "winscard.dll";
|
||||
#else
|
||||
opt.pcsc_driver = "libpcsclite.so";
|
||||
#endif
|
||||
#endif /*ENABLE_CARD_SUPPORT*/
|
||||
|
||||
/* check whether we have a config file on the commandline */
|
||||
orig_argc = argc;
|
||||
orig_argv = argv;
|
||||
|
Loading…
x
Reference in New Issue
Block a user