Commit Graph

86 Commits

Author SHA1 Message Date
aet 73aa989875 - Unify a bit the output of commands like opensc-tool -D
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2166 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-09 14:47:46 +00:00
aet 42ecafabb8 - Cleanup
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2163 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-09 14:05:55 +00:00
aet 91fb274b1a - Checkpoint commit, add support for the next generation FinEID
cards with ISO/IEC 7816-15 layout.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2161 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-09 11:37:25 +00:00
aet 69d2e9014d - Optimize a few cpu cycles from _sc_match_atr_hex
- Replace struct sc_atr_table / _sc_match_atr with
  recently introduced _hex variants
- Rewrote _add_atr
- Introduce int type variable to sc_card_t, so that
  every other card driver won't have to glue around
  with this
- Card driver cleanups, optimize the number of
  sc_match_atr called per card driver. Also
  always try direct match with _sc_match_atr
  first, before relying on eg. historical bytes
  information on some card drivers
- Fixed a memory leak from the miocos driver


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2145 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-06 19:40:40 +00:00
aet bd0f86f69c - Unify all card drivers ATR matching code to use _sc_match_atr_hex,
untested as of yet.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2134 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-04 20:29:35 +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
aet 763fc16704 Rename libopensc specific error/debug to sc_error/sc_debug
We should have done this ages ago.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1392 c6295689-39f2-0310-b995-f0e70906c6a9
2003-08-25 14:21:18 +00:00
okir 48a61e95c0 - added card name to struct sc_card to allow upper level apps to identify
card type more precisely


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1173 c6295689-39f2-0310-b995-f0e70906c6a9
2003-05-28 20:52:33 +00:00
sth 9631ef3636 removed const in sc_card_driver (caused win32 crash)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@918 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-20 12:51:07 +00:00
okir e69517941f - added SC_CARD_CAP_RNG
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@864 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-15 13:20:02 +00:00
jey 28b4a1b9f8 - iso7816_set_security_env now has correct values for P1
- Improved detection of SetCOS cards
- Changed the default CLA byte in card-setcos.c to 0x80


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@616 c6295689-39f2-0310-b995-f0e70906c6a9
2002-06-03 15:05:58 +00:00
aet 3dccd63989 - C++ support. Compiles with gcc/g++ for Linux, otherwise
completely untested.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@574 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-19 14:23:31 +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
aet fef2ac364c Minor warning fix
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@433 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-03 12:59:53 +00:00
jey 369889ace5 - fixed a small bug regarding prop_attr in the SetCOS driver
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@425 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-02 21:26:42 +00:00
jey 7ddcb3d692 - sec_attr and prop_attr are now dynamically allocated in
struct sc_file


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@404 c6295689-39f2-0310-b995-f0e70906c6a9
2002-03-28 14:13:36 +00:00
jey ffe0282a93 - fixed a typo in one ATR string
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@377 c6295689-39f2-0310-b995-f0e70906c6a9
2002-03-24 14:06:40 +00:00
jey 3fa7a056f1 - Fixed a couple of memory leaks
- Fixed a bug in decoding EF(TokenInfo)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@344 c6295689-39f2-0310-b995-f0e70906c6a9
2002-03-19 10:04:11 +00:00
jey ae306cf06f - GPK now reports it's PK abilities correctly
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@286 c6295689-39f2-0310-b995-f0e70906c6a9
2002-03-10 11:48:57 +00:00
aet 2a4afb8319 Include stdlib.h where needed
Warning fixes for various OS's
mcheck.h is not portable, so remove it


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@285 c6295689-39f2-0310-b995-f0e70906c6a9
2002-03-09 17:54:16 +00:00
jey 3416461c4b - Added X.509 algorithm id decoding and encoding to asn1.c
- Implemented a generic ATR matching helper function
- Made signing much smarter (should even work now)
- Added info about supported crypto algorithms to struct sc_card


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@276 c6295689-39f2-0310-b995-f0e70906c6a9
2002-03-08 05:59:57 +00:00
jey 4ac49d6e88 - intermediary checkin
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@249 c6295689-39f2-0310-b995-f0e70906c6a9
2002-03-01 11:52:55 +00:00
jey 4fa7283ae2 - added some missing files
- renamed card-setec.c to card-setcos.c


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@243 c6295689-39f2-0310-b995-f0e70906c6a9
2002-02-26 11:27:49 +00:00
jey 04dfc47d92 - added a driver for MioCOS cards by Miotec
- implemented EF(DIR) updating


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@242 c6295689-39f2-0310-b995-f0e70906c6a9
2002-02-26 11:23:25 +00:00
jey 3fa1b27736 - implemented reader abstraction layer; now it's easier to
add support for e.g. CT-API
- renamed ops_data field to drv_data in struct sc_card
- copied coding style document from Linux kernel


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@221 c6295689-39f2-0310-b995-f0e70906c6a9
2002-02-24 19:32:14 +00:00
jey e78dc96440 - added ATR for RSA SecurID 3100
- exported pkcs15_encode_* functions
- minor modification to sc_file_add_acl_entry()
- boosted up opensc-explorer
- added error(), warn() and fatal()
- implemented a generic PKCS #15 structure generation tool


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@215 c6295689-39f2-0310-b995-f0e70906c6a9
2002-02-21 18:53:23 +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 709727d469 - added partial support for TCOS 2.0 cards
- default card driver now tries to do a GET RESPONSE
  instead of SELECT FILE to detect the correct
  CLA byte
- moved security attribute parsing from iso7816.c to card-setec.c
- added some more sanity checking to sc_check_apdu
- added 'debug' command line option to opensc-explorer


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@210 c6295689-39f2-0310-b995-f0e70906c6a9
2002-02-11 15:55:34 +00:00
jey d9792242cc - fixed a bug with file permissions in flex_create_file()
- added RSA signature generation with Cryptoflex cards
- improved security environment handling
- implemented cryptoflex-tool


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@177 c6295689-39f2-0310-b995-f0e70906c6a9
2002-01-20 21:20:09 +00:00
jey 54e5d23e93 - improved PKCS #15 generation
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@170 c6295689-39f2-0310-b995-f0e70906c6a9
2002-01-17 11:44:27 +00:00
jey 5c993e1136 - added PIN verification, file creation and file deletion to
opensc-explorer
- documented the core API a bit using doxygen


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@158 c6295689-39f2-0310-b995-f0e70906c6a9
2002-01-10 23:02:48 +00:00
jey 7ff4c4544c - added preliminary CryptoFlex 16k support
- added short names to card drivers
- moved various ISO 7816-9 functions to their correct places
- added write binary support
- renamed opensc-crypt to pkcs15-crypt
- split a part opensc-tool to pkcs15-tool


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@150 c6295689-39f2-0310-b995-f0e70906c6a9
2002-01-08 13:56:50 +00:00
aet 607271df53 Merges with SCIDI to help integrating build process with it
Remove some gcc specific flags from Makefile.am
Rename some header defines
size_t vs. int fixups
opensc.h: Define inline as null for other compilers than gcc, for now
Port pam_pkcs15 to compile for Solaris and HP-UX, untested
Fix compiler warnings

OpenSC now compiles cleanly for Tru64, AIX and HP-UX.

The only problem is the tools using getopt_long() (GNU extension),
to be fixed later..


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@120 c6295689-39f2-0310-b995-f0e70906c6a9
2001-12-30 21:17:34 +00:00
jey 2b99f2df14 - added default driver for unidentified cards
- added select_file operation in Multiflex driver
- added 'list-drivers' command to opensc-tool
- moved stuff from opensc.h to sc-internal.h
- improved locking behaviour


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@106 c6295689-39f2-0310-b995-f0e70906c6a9
2001-12-25 20:45:48 +00:00
jey c344e28a92 - added card abstraction layer support
- pretty much finished migrating to new ASN.1 code
- changed call semantics for sc_select_file()
- moved functions around


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@89 c6295689-39f2-0310-b995-f0e70906c6a9
2001-12-22 20:43:09 +00:00