Commit Graph

75 Commits

Author SHA1 Message Date
aj d22a2483c0 Header file cleanup.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4081 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-04 08:14:36 +00:00
viktor.tarasov 975d703c0d libopensc: remove unused variables
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4063 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-21 20:46:59 +00:00
martin 23b7c2673c pincache: pkcs15-pin.c:515: warning: unused variable ‘i’
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4061 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-21 19:54:59 +00:00
martin 7b6d2525da pincache: correct message for user consent PINs (it is a matter of policy not software support)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4060 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-21 19:53:53 +00:00
viktor.tarasov 9c964e3d71 pincache: implement pincache as the content of the AUTH pkcs15 object
; in 'sc_pkcs15_pin_info' structure add 'auth_method' member to keep the PIN authentication method: CHV, AUT or SM;
; in pkcs15init profile add function to search PIN template by auth method and reference;
; in 'sc_pkcs15_remove_object' return silently if object to delete is NULL;
; in 'sc_pkcs15_object' structure add 'usage_counter' member;
; new 'sc_pkcs15_find_pin_by_type_and_reference' procedure to search PIN pkcs15 object by auth method and reference;
 


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4048 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-20 22:04:07 +00:00
viktor.tarasov 7f0abe80bb libopensc pkcs15: path is optional for PinAttributes of PinObject
- for 'global' PINs path in not encoded into the AODF;
- when selecting pin_reference, start from value defined in profile.




git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3946 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-27 17:03:04 +00:00
martin d006b1845e libopensc:
- Remove slot abstraction from internal API and all reader drivers. CT-API (from where it all comes from) readers with multiple slots (if still found) can be presented as separate readers, OpenCT should remove the slot abstraction, PC/SC never knew about it. None of the tools knew how to use slots.
 - Add sc_cancel (translates to SCardCancel)
 - Re-implement sc_wait_for_event; support a blocking call.
 - Replace the "int reader" API with "* sc_reader_t" style; add "Get reader by name" functionality.
 - Remove "action" parameter from sc_disconnect_card() (was not used)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3931 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-24 15:25:08 +00:00
aj f0484968a9 merge changes 0.11.11 -> 0.11.12
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3899 c6295689-39f2-0310-b995-f0e70906c6a9
2009-12-18 13:33:03 +00:00
viktor.tarasov 193ca76980 pkcs15-tool: change PIN with pinpad
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3883 c6295689-39f2-0310-b995-f0e70906c6a9
2009-12-03 12:51:12 +00:00
martin 95a5ab0654 Re-implement PIN cache on PKCS#15 layer; remove it from PKCS#11. Re-name and log PKCS#15 options to better reflect the purpose.
Data objects and PKCS#15 init are left broken currently.



git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3784 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-22 08:59:59 +00:00
alonbl e14cf57ad1 Better handle openct reader replug, revert last change in pkcs11-pin
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3512 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-10 09:55:01 +00:00
alonbl a40cf036bb Fix sc_pkcs15_verify_pin() to handle OpenCT hotplug correctly
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3511 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-09 22:22:41 +00:00
alonbl 96b0f4a670 Verify PIN support Plug&Play
If card was reset or reader reconnected, verify can restart
transaction, as upper level will not cache PIN in this case.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3508 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-02 17:56:52 +00:00
nils d08c8344ec encode max pin length as well
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3092 c6295689-39f2-0310-b995-f0e70906c6a9
2006-12-22 12:43:00 +00:00
aj b3ad2f9dd2 convert to utf-8.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3084 c6295689-39f2-0310-b995-f0e70906c6a9
2006-12-19 21:31:17 +00:00
nils e8c05ca648 use more opensc specific names for ASN.1 tags to avoid name conflicts
with other ASN.1 libraries


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2815 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-20 20:52:36 +00:00
martin fc3048f55e Remove the (stupid) use_pinpad option from pkcs15 structures
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2482 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-13 13:04:02 +00:00
nils 23802d825e properly initialize sc_asn1_entry elements + some cleanup
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2463 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-05 07:24:43 +00:00
martin 489518b26a Small fixes in the teletrust spec support code and related NEWS item
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2300 c6295689-39f2-0310-b995-f0e70906c6a9
2005-04-07 19:45:39 +00:00
pisi 95225b7731 common pin validity check, supprot (still disabled) for pinpads in modify and unblock
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2239 c6295689-39f2-0310-b995-f0e70906c6a9
2005-03-09 12:46:31 +00:00
bert 2d97002824 API fixup: use defined type instead of struct for exposed structs
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2232 c6295689-39f2-0310-b995-f0e70906c6a9
2005-03-08 20:59:35 +00:00
nils 71b29ca9c8 remove outdated comment
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2153 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-07 10:58:22 +00:00
nils 14cbf7c304 fix usage of sc_pkcs15_pin_info_t::max_length etc.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2152 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-07 10:53:12 +00:00
nils 8a0fc5bdcf fix indent, patch supplied by Martin Paljak
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2082 c6295689-39f2-0310-b995-f0e70906c6a9
2005-01-19 16:17:32 +00:00
nils 95440fb15b cleanup pin handling (set and use sc_pin_cmd_pin->pad_length + use pkcs15 puk object if existing)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2079 c6295689-39f2-0310-b995-f0e70906c6a9
2005-01-18 21:42:00 +00:00
nils 9ac35022af remove misleading comment
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2057 c6295689-39f2-0310-b995-f0e70906c6a9
2005-01-09 20:10:44 +00:00
nils 2f15c03218 evaluate pkcs15 pin type
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2056 c6295689-39f2-0310-b995-f0e70906c6a9
2005-01-08 10:20:21 +00:00
nils 8673508a43 fix memory leak, cleanup: use object specific release method
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2024 c6295689-39f2-0310-b995-f0e70906c6a9
2004-12-18 14:14:57 +00:00
nils 8147c22a93 call sc_select_file only if pin->path is actually set
Thanks to Andrej Komelj <akomelj@email.si>


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1784 c6295689-39f2-0310-b995-f0e70906c6a9
2004-05-20 09:09:30 +00:00
nils f2bd9af6cc use pin_cmd for sc_pkcs15_change_pin and sc_pkcs15_unblock_pin as well
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1779 c6295689-39f2-0310-b995-f0e70906c6a9
2004-04-23 17:29:24 +00:00
okir 13a11083e1 - initialize tries_left field to -1 when parsing AODF
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1587 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-31 12:31:54 +00:00
aet 5616dba08e - Stop using unflexible automake conditionals when
building PC/SC, OpenCT or USBToken support,
  use ifdef's directly in source.
- Because of above, add HAVE_PCSCLITE for winconfig.h
- Remove unnecessary includes for log.h, opensc.h and
  errors.h in libopensc sources, they're already taken
  care by internal.h.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1406 c6295689-39f2-0310-b995-f0e70906c6a9
2003-09-03 09:28:55 +00:00
aj 07668a30ff Nils Larsch:
here is a patch to remove a bug in card-starcos.c and two warnings:

card-starcos.c: fix apdu.le value
pkcs15-pin.c: remove unused labels => avoid compiler warnings
pkcs11-tool.c : remove memory leak (a RSA_free() was missing)
	and simplify code (+ remove warning).


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1072 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-25 10:03:09 +00:00
okir 98907b68f1 - fixed endianness problem with encoding/deconding of bit fields
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1034 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-16 20:52:26 +00:00
okir 3b36593ada - added pkcs15 unblock functionality
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1008 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-14 14:51:42 +00:00
sth a7a5701e0c added support for max pin length
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@922 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-20 23:19:01 +00:00
okir 92651f0595 - sc_pkcs15_change_pin: small pin pad change from Stef
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@840 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-06 19:36:23 +00:00
okir 9acca0e724 - Implemented new PIN verify/change/unblock framework. All PIN operations
are routed through sc_pin_cmd(), which builds the APDU and either passes
  it to the card directly, or to the card reader along with a request to
  read the PIN(s) from the reader's keypad.

  Currently, entering PIN in the standard way (i.e. via the application)
  should still work - I have verified GPK and eToken; Cryptoflex verify
  should work as well. Anything else needs additional testing, and support
  for keypad input in particular (I cannot test this at the moment for
  lack of a suitable reader).


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@811 c6295689-39f2-0310-b995-f0e70906c6a9
2002-12-23 18:47:27 +00:00
jey f0d73785fb - Also removed the ref variable
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@689 c6295689-39f2-0310-b995-f0e70906c6a9
2002-08-21 10:34:29 +00:00
jey 2569daf431 - Removed the last goof I made
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@688 c6295689-39f2-0310-b995-f0e70906c6a9
2002-08-21 10:34:08 +00:00
jey 25931fe3e5 - Set bit 8 in key reference, if PIN_FLAG_LOCAL is set
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@685 c6295689-39f2-0310-b995-f0e70906c6a9
2002-08-21 10:20:30 +00:00
jey 7c94d7d8d3 - Several patches to fix behaviour on 64-bit architectures (by
Jochen Friedrich)
- Fixed one bug in sc_copy_asn1_entry(), one in
  sc_pkcs15init_add_object() and one in pkcs15-crypt
  (patches also by Jochen)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@609 c6295689-39f2-0310-b995-f0e70906c6a9
2002-05-26 12:31:23 +00:00
jey d9a788350d - Applied a patch by Werner Koch that brings the TCOS driver
up-to-speed


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@601 c6295689-39f2-0310-b995-f0e70906c6a9
2002-05-09 10:34:18 +00:00
okir 517395b2eb - pin flags were not encoded correctly
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@488 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-08 09:23:17 +00:00
jey 22636c2df9 - Added SC_ERROR_FILE_ALREADY_EXISTS
- Changed call convention for reader finish()
- CT-API driver now frees its resources correctly
- Added year 2002 to some of the copyright statements
- sc_pkcs15_decipher() and sc_pkcs15_compute_signature()
  now select only the parent DF of the private key file


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@463 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-05 14:46:44 +00:00
aet d81d10ba90 Upgrade sources to use new headers, part #1
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@458 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-05 10:44:51 +00:00
jey 6b07ff64f6 - Reworked PKCS #15 structure a bit (MANY THINGS
WILL BREAK)
- Added support for public key DFs (not tested yet)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@251 c6295689-39f2-0310-b995-f0e70906c6a9
2002-03-03 00:32:28 +00:00
jey 61fc1f9327 - all instances struct sc_file should now be
dynamically allocated with sc_file_new() and released
  with sc_file_free()
- improved ACL's
- moved struct sc_card_error to opensc.h
- moved EF(DIR) parsing and encoding to dir.c
  (encoding is not working yet)
- removed hst-test.c and filetest.c


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@213 c6295689-39f2-0310-b995-f0e70906c6a9
2002-02-20 09:56:47 +00:00
jey b4063302bf - added partial support for GPK 4000
- made line parsing in opensc-explorer saner
- moved change_reference_data and reset_retry_counter to
  iso7816.c, where they belong
- added partial libreadline support to opensc-explorer


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@206 c6295689-39f2-0310-b995-f0e70906c6a9
2002-02-10 18:04:03 +00:00
jey fd9c25eeed - added README.Cryptoflex
- modified ChangeLog
- _really_ bumped up the version number this time


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@192 c6295689-39f2-0310-b995-f0e70906c6a9
2002-01-24 16:24:24 +00:00