~ubuntu-branches/ubuntu/lucid/gnupg2/lucid-updates

« back to all changes in this revision

Viewing changes to scd/app-nks.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Bienia
  • Date: 2009-11-07 13:12:03 UTC
  • mfrom: (1.1.13 upstream) (7.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091107131203-vgyndyfgtwch7v61
Tags: 2.0.13-1ubuntu1
* Merge with Debian testing (lp: #477491). Remaining changes:
  - Build-depend on libreadline-dev instead of libreadline5-dev.
  - debian/gnupg2.dev: udev rules to set ACLs on SCM smartcard readers.
  - debian/rules: Call dh_installudev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
271
271
  command[2] = 0x00;
272
272
  command[3] = pwid;
273
273
 
274
 
  if (apdu_send_direct (app->slot, 0, command, 4, 0, &result, &resultlen))
 
274
  if (apdu_send_direct (app->slot, 0, (unsigned char *)command, 
 
275
                        4, 0, &result, &resultlen))
275
276
    rc = -1; /* Error. */
276
277
  else if (resultlen < 2)
277
278
    rc = -1; /* Error. */
969
970
    rc = verify_pin (app, 0, NULL, pincb, pincb_arg);
970
971
  /* Compute the signature.  */
971
972
  if (!rc)
972
 
    rc = iso7816_compute_ds (app->slot, data, datalen, outdata, outdatalen);
 
973
    rc = iso7816_compute_ds (app->slot, 0, data, datalen, 0,
 
974
                             outdata, outdatalen);
973
975
  return rc;
974
976
}
975
977
 
1054
1056
     Command chaining does not work.  */
1055
1057
  if (!rc)
1056
1058
    rc = iso7816_decipher (app->slot, app->app_local->nks_version > 2? 1:0,
1057
 
                           indata, indatalen, 0x81,
 
1059
                           indata, indatalen, 0, 0x81,
1058
1060
                           outdata, outdatalen);
1059
1061
  return rc;
1060
1062
}