Commit Graph

34 Commits

Author SHA1 Message Date
aj cea32a8016 make app_name, options and option_help static.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3192 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-29 13:19:19 +00:00
ludovic.rousseau be309330e5 do not use global variables app_name, options and option_help so they
can be static


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3188 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 13:46:08 +00:00
aj b0bc6df80c fix more warnings.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3187 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 13:38:16 +00:00
aj 0c604cb294 silence more warnings.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3183 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 12:58:57 +00:00
aj db0a552d7b convert to utf-8.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3090 c6295689-39f2-0310-b995-f0e70906c6a9
2006-12-19 21:35:42 +00:00
ludovic.rousseau 126593aa01 - use strlcpy() instead of strncpy() to always have a terminating
NUL-byte

- use sizeof(field) instead of SC_PKCS15_MAX_LABEL_SIZE-1 or equivalent as
  the 3rd argument of strlcpy()


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2993 c6295689-39f2-0310-b995-f0e70906c6a9
2006-07-12 08:12:38 +00:00
nils 9c42d1dc8c use sc_ctx_get_reader() etc. instead of of accessing the structure members directly
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2848 c6295689-39f2-0310-b995-f0e70906c6a9
2006-02-15 17:29:40 +00:00
nils 25e5c95dde use sc_context_create instead of sc_establish_context
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2833 c6295689-39f2-0310-b995-f0e70906c6a9
2006-02-07 20:14:43 +00:00
aj 4863fb752d free buf if pin was entered incorrectly.
check if file is not NULL (out of memory).
free file, if something goes wrong.
free pin/puk once no longer needed.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2706 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:31:20 +00:00
nils 47ee84e72d add functions
void sc_ctx_suppress_errors_on(sc_context_t *ctx);
	void sc_ctx_suppress_errors_off(sc_context_t *ctx);
to turn on/off error suppression (to avoid accessing
sc_context_t directly) and use it.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2671 c6295689-39f2-0310-b995-f0e70906c6a9
2005-10-30 19:08:06 +00:00
bert eb4717ea17 API fixup: use defined type instead of struct for exposed structs (part 2)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2233 c6295689-39f2-0310-b995-f0e70906c6a9
2005-03-09 00:04:44 +00:00
nils 7d6b3937e9 cleanup
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2138 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-05 09:54:05 +00:00
aj 856cbdebfa fix short options as well.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1794 c6295689-39f2-0310-b995-f0e70906c6a9
2004-06-18 09:12:50 +00:00
aj 9b7cdbffad cleanup debug/quiet/verbose handling.
now all tools accept "-v" for verbose
operation, and you can specify -v several
times to get more verbose i.e. debugging
output.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1792 c6295689-39f2-0310-b995-f0e70906c6a9
2004-06-13 20:13:12 +00:00
okir fffe5b79ef - Error logging changes: replace ctx->log_errors with ctx->suppress_errors
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1520 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-14 09:57:50 +00:00
okir 5b1eb43b93 - add some support for card removal in pkcs11
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@867 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-19 17:47:07 +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 546f920fc1 - PKCS #15 objects and DFs are now stored with linked lists
in struct sc_pkcs15_card; this way we can have 'floating'
  objects that don't belong in any DF, for e.g. generating
  public key objects from certificates
- Removed some unused function prototypes


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@572 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-19 09:22:44 +00:00
aet 076a26bbac Rework the header structure
Currently fails to compile, unless you symlink
all the necessary headers to src/include/opensc
by yourself.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@459 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-05 13:48:00 +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 ec6f8961b0 Don't hardcode initial debugging level and error/debug_file
pointers to the code, get the values from opensc.conf instead.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@386 c6295689-39f2-0310-b995-f0e70906c6a9
2002-03-24 21:56:13 +00:00
jey f21926af00 - Started to add configuration file support to
libopensc
- Added typedefs for some basic structs (e.g.
  struct sc_card --> sc_card_t)
- Added a second argument to sc_establish_context()
  to identify the calling application
- Renamed sc_destroy_context() to sc_release_context()


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@378 c6295689-39f2-0310-b995-f0e70906c6a9
2002-03-24 14:12:38 +00:00
jey 7d2171c1d2 - Improved support for MioCOS cards
- Removed PKCS #15 creation from cryptoflex-tool
- Added PIN pad character option to profile.c


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@282 c6295689-39f2-0310-b995-f0e70906c6a9
2002-03-09 15:11:46 +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
aet 4aa18a9ff9 Added support for checking libreadline and use it
for opensc-explorer if one is found.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@235 c6295689-39f2-0310-b995-f0e70906c6a9
2002-02-25 16:30:38 +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 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 17332ea10e - last minute changes before the new release
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@194 c6295689-39f2-0310-b995-f0e70906c6a9
2002-01-24 18:37:12 +00:00
jey c1cac5f311 - bumped up version number in preparation of the new release
- unified PKCS #15 DF decoding
- added PKCS #15 file caching


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@191 c6295689-39f2-0310-b995-f0e70906c6a9
2002-01-24 16:02:54 +00:00
aet c8313fb07c Fix compiler warnings, for digital cc this time
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@187 c6295689-39f2-0310-b995-f0e70906c6a9
2002-01-22 16:26:19 +00:00
jey 623e5ad1b4 - changed PIN1 path in PKCS #15 structure
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@184 c6295689-39f2-0310-b995-f0e70906c6a9
2002-01-21 15:37:01 +00:00
jey a016a59259 - added PKCS #15 structure generation to cryptoflex-tool
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@182 c6295689-39f2-0310-b995-f0e70906c6a9
2002-01-21 12:49:00 +00:00
aet 6d533a1c3d Compiler warning fixups for various compilers
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@180 c6295689-39f2-0310-b995-f0e70906c6a9
2002-01-21 10:56:30 +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