Changeset 3405 for trunk/src/libopensc
- Timestamp:
- 03/06/08 16:06:59 (10 months ago)
- Location:
- trunk
- Files:
-
- 1 removed
- 31 modified
- 2 copied
-
. (modified) (1 prop)
-
src (modified) (1 prop)
-
src/libopensc (modified) (1 prop)
-
src/libopensc/Makefile.am (modified) (2 diffs)
-
src/libopensc/card-gpk.c (modified) (2 diffs)
-
src/libopensc/card-oberthur.c (modified) (2 diffs)
-
src/libopensc/card-piv.c (modified) (4 diffs)
-
src/libopensc/card-rutoken.c (modified) (5 diffs)
-
src/libopensc/compression.c (modified) (2 diffs)
-
src/libopensc/ctx.c (modified) (7 diffs)
-
src/libopensc/internal-winscard.h (copied) (copied from branches/alonbl/mingw/src/libopensc/internal-winscard.h) (1 diff)
-
src/libopensc/internal.h (modified) (1 diff)
-
src/libopensc/libopensc.exports (copied) (copied from branches/alonbl/mingw/src/libopensc/libopensc.exports)
-
src/libopensc/log.c (modified) (3 diffs)
-
src/libopensc/log.h (modified) (1 diff)
-
src/libopensc/opensc-config.in (modified) (3 diffs)
-
src/libopensc/p15card-helper.c (modified) (2 diffs)
-
src/libopensc/part10.h (deleted)
-
src/libopensc/pkcs15-actalis.c (modified) (3 diffs)
-
src/libopensc/pkcs15-atrust-acos.c (modified) (1 diff)
-
src/libopensc/pkcs15-esteid.c (modified) (1 diff)
-
src/libopensc/pkcs15-gemsafeGPK.c (modified) (1 diff)
-
src/libopensc/pkcs15-infocamere.c (modified) (3 diffs)
-
src/libopensc/pkcs15-openpgp.c (modified) (1 diff)
-
src/libopensc/pkcs15-piv.c (modified) (2 diffs)
-
src/libopensc/pkcs15-postecert.c (modified) (1 diff)
-
src/libopensc/pkcs15-prkey-rutoken.c (modified) (8 diffs)
-
src/libopensc/pkcs15-starcert.c (modified) (1 diff)
-
src/libopensc/pkcs15-tcos.c (modified) (1 diff)
-
src/libopensc/pkcs15-wrap.c (modified) (4 diffs)
-
src/libopensc/reader-openct.c (modified) (2 diffs)
-
src/libopensc/reader-pcsc.c (modified) (32 diffs)
-
src/libopensc/sc.c (modified) (2 diffs)
-
src/libopensc/ui.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 Makefile 2 Makefile.in 3 core 4 archive 5 acinclude.m4 6 aclocal.m4 7 autom4te.cache 8 compile 9 confdefs.h 10 config.* 11 configure 12 conftest 13 conftest.c 14 depcomp 15 install-sh 16 libtool 17 libtool.m4 18 ltmain.sh 19 missing 20 mkinstalldirs 21 so_locations 22 stamp-h* 23 1 24 .deps 2 25 .libs … … 19 42 *.rej 20 43 *.u 44 *.rc 45 *.pc 21 46 *~ 22 Makefile 23 Makefile.in 24 core 25 gmon.out 26 archive 27 acinclude.m4 28 aclocal.m4 29 autom4te.cache 30 compile 31 confdefs.h 32 config.cache 33 config.guess 34 config.h 35 config.h.in 36 config.log 37 config.status 38 config.sub 39 configure 40 conftest 41 conftest.c 42 depcomp 43 install-sh 44 libtool 45 libtool.m4 46 ltmain.sh 47 missing 48 mkinstalldirs 49 so_locations 50 stamp-h* 47 *.gz 48 *.bz2 49 *.[0-9] 50 *.html 51 *.gif 52 *.css 53 *.out 54 55 ChangeLog 56 opensc.conf 57 xsl-stylesheets 58 opensc-config 59 test-conf 60 pkcs15-tool 61 pkcs15-crypt 62 pkcs15-init 63 piv-tool 64 eidenv 65 opensc-explorer 66 opensc-tool 67 rutoken-tool 68 cardos-info 69 cryptoflex-tool 70 netkey-tool 71 pkcs11-tool 72 pintest 73 p15dump 74 prngtest 75 base64 76 lottery 77
-
- Property svn:ignore
-
trunk/src
- Property svn:ignore
-
old new 1 Makefile 2 Makefile.in 3 core 4 archive 5 acinclude.m4 6 aclocal.m4 7 autom4te.cache 8 compile 9 confdefs.h 10 config.* 11 configure 12 conftest 13 conftest.c 14 depcomp 15 install-sh 16 libtool 17 libtool.m4 18 ltmain.sh 19 missing 20 mkinstalldirs 21 so_locations 22 stamp-h* 23 1 24 .deps 2 25 .libs … … 19 42 *.rej 20 43 *.u 44 *.rc 45 *.pc 21 46 *~ 22 Makefile 23 Makefile.in 24 core 25 gmon.out 47 *.gz 48 *.bz2 49 *.[0-9] 50 *.html 51 *.gif 52 *.css 53 *.out 54 55 ChangeLog 56 opensc.conf 57 xsl-stylesheets 58 opensc-config 59 test-conf 60 pkcs15-tool 61 pkcs15-crypt 62 pkcs15-init 63 piv-tool 64 eidenv 65 opensc-explorer 66 opensc-tool 67 rutoken-tool 68 cardos-info 69 cryptoflex-tool 70 netkey-tool 71 pkcs11-tool 72 pintest 73 p15dump 74 prngtest 75 base64 76 lottery 77
-
- Property svn:ignore
-
trunk/src/libopensc
- Property svn:ignore
-
old new 1 Makefile 2 Makefile.in 3 core 4 archive 5 acinclude.m4 6 aclocal.m4 7 autom4te.cache 8 compile 9 confdefs.h 10 config.* 11 configure 12 conftest 13 conftest.c 14 depcomp 15 install-sh 16 libtool 17 libtool.m4 18 ltmain.sh 19 missing 20 mkinstalldirs 21 so_locations 22 stamp-h* 23 1 24 .deps 2 25 .libs … … 19 42 *.rej 20 43 *.u 44 *.rc 45 *.pc 21 46 *~ 22 Makefile 23 Makefile.in 24 core 25 gmon.out 26 *.pc 47 *.gz 48 *.bz2 49 *.[0-9] 50 *.html 51 *.gif 52 *.css 53 *.out 54 55 ChangeLog 56 opensc.conf 57 xsl-stylesheets 27 58 opensc-config 59 test-conf 60 pkcs15-tool 61 pkcs15-crypt 62 pkcs15-init 63 piv-tool 64 eidenv 65 opensc-explorer 66 opensc-tool 67 rutoken-tool 68 cardos-info 69 cryptoflex-tool 70 netkey-tool 71 pkcs11-tool 72 pintest 73 p15dump 74 prngtest 75 base64 76 lottery 77
-
- Property svn:ignore
-
trunk/src/libopensc/Makefile.am
r3310 r3405 1 1 # Process this file with automake to create Makefile.in 2 2 3 include dir = @includedir@/opensc3 include $(top_srcdir)/win32/ltrc.inc 4 4 5 5 MAINTAINERCLEANFILES = Makefile.in 6 7 EXTRA_DIST = Makefile.mak libopensc.pc.in libpkcs15init.pc.in libscconf.pc.in 8 9 INCLUDES = $(CPPFLAGS) $(OPENSSL_CFLAGS) $(OPENCT_CFLAGS) $(PCSC_CFLAGS) \ 10 $(LTLIB_CFLAGS) -I$(top_srcdir)/src/common 11 AM_LDFLAGS = 6 CLEANFILES = versioninfo.rc 7 EXTRA_DIST = Makefile.mak 12 8 13 9 bin_SCRIPTS = opensc-config 10 lib_LTLIBRARIES = libopensc.la 11 openscinclude_HEADERS = \ 12 opensc.h pkcs15.h emv.h \ 13 cardctl.h asn1.h log.h ui.h \ 14 errors.h types.h compression.h 15 noinst_HEADERS = cards.h ctbcs.h internal.h esteid.h muscle.h muscle-filesystem.h \ 16 internal-winscard.h p15card-helper.h 17 pkgconfig_DATA = libopensc.pc libpkcs15init.pc libscconf.pc 14 18 15 lib_LTLIBRARIES = libopensc.la 19 AM_CFLAGS = $(OPTIONAL_OPENSSL_CFLAGS) $(OPTIONAL_OPENCT_CFLAGS) \ 20 $(OPTIONAL_ZLIB_CFLAGS) $(LTLIB_CFLAGS) 21 INCLUDES = -I$(top_srcdir)/src/include -I$(top_srcdir)/src/common 22 16 23 libopensc_la_SOURCES = \ 17 24 sc.c ctx.c ui.c log.c errors.c \ … … 38 45 pkcs15-actalis.c pkcs15-atrust-acos.c pkcs15-tccardos.c pkcs15-piv.c \ 39 46 pkcs15-rutoken.c pkcs15-prkey-rutoken.c \ 40 compression.c p15card-helper.c 41 libopensc_la_LDFLAGS = -version-info @OPENSC_LT_CURRENT@:@OPENSC_LT_REVISION@:@OPENSC_LT_AGE@ 42 libopensc_la_LIBADD = @LIBSCCONF@ $(OPENSSL_LIBS) $(OPENCT_LIBS) $(PCSC_LIBS) $(LTLIB_LIBS) 47 compression.c p15card-helper.c \ 48 \ 49 libopensc.exports 50 if WIN32 51 nodist_libopensc_la_SOURCES = versioninfo.rc 52 endif 53 libopensc_la_LIBADD = $(OPTIONAL_OPENSSL_LIBS) $(OPTIONAL_OPENCT_LIBS) \ 54 $(OPTIONAL_ZLIB_LIBS) $(LTLIB_LIBS) \ 55 $(top_builddir)/src/scconf/libscconf.la \ 56 $(top_builddir)/src/common/libcompat.la 57 if WIN32 58 libopensc_la_LIBADD += -lws2_32 59 endif 60 libopensc_la_LDFLAGS = $(AM_LDFLAGS) \ 61 -version-info @OPENSC_LT_CURRENT@:@OPENSC_LT_REVISION@:@OPENSC_LT_AGE@ \ 62 -export-symbols libopensc.exports \ 63 -no-undefined 43 64 44 include_HEADERS = \ 45 opensc.h pkcs15.h emv.h \ 46 cardctl.h asn1.h log.h ui.h \ 47 errors.h types.h compression.h 65 versioninfo.rc: 66 sed 's/@@FILE_DESCRIPTION@@/OpenSC Core Library/g' \ 67 "$(top_srcdir)/win32/versioninfo.rc" > versioninfo.rc 48 68 49 noinst_HEADERS = cards.h ctbcs.h internal.h esteid.h muscle.h muscle-filesystem.h part10.h p15card-helper.h 50 51 pkgconfigdir = $(libdir)/pkgconfig 52 pkgconfig_DATA = libopensc.pc libpkcs15init.pc libscconf.pc 69 if WIN32 70 # def file required for MS users to build library 71 mylibdir=$(libdir) 72 if CYGWIN 73 mylib_DATA=.libs/cygopensc-@OPENSC_LT_CURRENT@.dll.def 74 .libs/cygopensc-@OPENSC_LT_CURRENT@.dll.def: libopensc.la 75 else 76 mylib_DATA=.libs/libopensc-@OPENSC_LT_CURRENT@.dll.def 77 .libs/libopensc-@OPENSC_LT_CURRENT@.dll.def: libopensc.la 78 endif 79 endif -
trunk/src/libopensc/card-gpk.c
r3177 r3405 22 22 #include "cardctl.h" 23 23 #include "pkcs15.h" 24 #ifdef HAVE_OPENSSL24 #ifdef ENABLE_OPENSSL 25 25 #include <stdlib.h> 26 26 #include <string.h> … … 1903 1903 return sc_get_driver(); 1904 1904 } 1905 #endif /* HAVE_OPENSSL */1905 #endif /* ENABLE_OPENSSL */ -
trunk/src/libopensc/card-oberthur.c
r3206 r3405 27 27 #include "pkcs15.h" 28 28 29 #ifdef HAVE_OPENSSL29 #ifdef ENABLE_OPENSSL 30 30 #include <stdlib.h> 31 31 #include <string.h> … … 2505 2505 } 2506 2506 2507 #endif /* HAVE_OPENSSL */2507 #endif /* ENABLE_OPENSSL */ -
trunk/src/libopensc/card-piv.c
r3292 r3405 24 24 25 25 #include "internal.h" 26 27 #ifdef ENABLE_OPENSSL 28 26 29 #include <ctype.h> 27 30 #include <string.h> … … 33 36 #include "asn1.h" 34 37 #include "cardctl.h" 35 #ifdef HAVE_ZLIB_H38 #ifdef ENABLE_ZLIB 36 39 #include "compression.h" 37 40 #endif … … 743 746 /* Potential truncation */ 744 747 if(compressed) { 745 #ifdef HAVE_ZLIB_H748 #ifdef ENABLE_ZLIB 746 749 size_t len = count; 747 750 u8* newBuf = NULL; … … 1803 1806 } 1804 1807 #endif 1808 1809 #endif -
trunk/src/libopensc/card-rutoken.c
r3310 r3405 26 26 #include <stdlib.h> 27 27 #include "pkcs15.h" 28 #if defined(HAVE_INTTYPES_H) 29 #include <inttypes.h> 30 #elif defined(HAVE_STDINT_H) 31 #include <stdint.h> 32 #elif defined(_MSC_VER) 33 typedef unsigned __int32 uint32_t; 34 typedef unsigned __int16 uint16_t; 35 #else 36 #warning no uint32_t type available, please contact opensc-devel@opensc-project.org 37 #endif 28 38 29 39 #define BIG_ENDIAN_RUTOKEN 30 40 31 #ifdef HAVE_OPENSSL41 #ifdef ENABLE_OPENSSL 32 42 #include <openssl/evp.h> 33 43 #include <openssl/rsa.h> … … 43 53 #define ID_RESERVED_CURDF 0x3FFF /*Reserved ID for current DF*/ 44 54 45 #ifdef HAVE_OPENSSL55 #ifdef ENABLE_OPENSSL 46 56 int get_prkey_from_bin(const u8 *data, size_t len, struct sc_pkcs15_prkey **key); 47 57 #endif … … 343 353 { 344 354 #ifdef BIG_ENDIAN_RUTOKEN 345 file->size = pIn[3] + ((u _int16_t)pIn[2])*256;346 file->id = pIn[7] + ((u _int16_t)pIn[6])*256;355 file->size = pIn[3] + ((uint16_t)pIn[2])*256; 356 file->id = pIn[7] + ((uint16_t)pIn[6])*256; 347 357 #else 348 file->size = pIn[2] + ((u _int16_t)pIn[3])*256;349 file->id = pIn[6] + ((u _int16_t)pIn[7])*256;358 file->size = pIn[2] + ((uint16_t)pIn[3])*256; 359 file->id = pIn[6] + ((uint16_t)pIn[7])*256; 350 360 #endif 351 361 … … 1070 1080 /* RSA emulation */ 1071 1081 1072 #ifdef HAVE_OPENSSL1082 #ifdef ENABLE_OPENSSL 1073 1083 1074 1084 static int rutoken_get_current_fileid(sc_card_t *card, u8 id[2]) … … 1416 1426 rutoken_ops.get_challenge = rutoken_get_challenge; 1417 1427 1418 #ifdef HAVE_OPENSSL1428 #ifdef ENABLE_OPENSSL 1419 1429 rutoken_ops.decipher = rutoken_decipher; 1420 1430 rutoken_ops.compute_signature = rutoken_compute_signature; -
trunk/src/libopensc/compression.c
r3178 r3405 19 19 */ 20 20 #include "internal.h" 21 #ifdef HAVE_ZLIB_H21 #ifdef ENABLE_ZLIB 22 22 #include "compression.h" 23 23 … … 180 180 } 181 181 } 182 #endif /* HAVE_ZLIB_H*/182 #endif /* ENABLE_ZLIB */ -
trunk/src/libopensc/ctx.c
r3304 r3405 57 57 { "flex", (void *(*)(void)) sc_get_cryptoflex_driver }, 58 58 { "cyberflex", (void *(*)(void)) sc_get_cyberflex_driver }, 59 #ifdef HAVE_OPENSSL59 #ifdef ENABLE_OPENSSL 60 60 { "gpk", (void *(*)(void)) sc_get_gpk_driver }, 61 61 #endif … … 69 69 { "opengpg", (void *(*)(void)) sc_get_openpgp_driver }, 70 70 { "jcop", (void *(*)(void)) sc_get_jcop_driver }, 71 #ifdef HAVE_OPENSSL71 #ifdef ENABLE_OPENSSL 72 72 { "oberthur", (void *(*)(void)) sc_get_oberthur_driver }, 73 73 #endif … … 77 77 { "emv", (void *(*)(void)) sc_get_emv_driver }, 78 78 { "incrypto34", (void *(*)(void)) sc_get_incrypto34_driver }, 79 #ifdef HAVE_OPENSSL79 #ifdef ENABLE_OPENSSL 80 80 { "PIV-II", (void *(*)(void)) sc_get_piv_driver }, 81 81 #endif … … 89 89 90 90 static const struct _sc_driver_entry internal_reader_drivers[] = { 91 #if defined( HAVE_PCSC)91 #if defined(ENABLE_PCSC) 92 92 { "pcsc", (void *(*)(void)) sc_get_pcsc_driver }, 93 93 #endif 94 94 { "ctapi", (void *(*)(void)) sc_get_ctapi_driver }, 95 95 #ifndef _WIN32 96 #ifdef HAVE_OPENCT96 #ifdef ENABLE_OPENCT 97 97 { "openct", (void *(*)(void)) sc_get_openct_driver }, 98 98 #endif … … 557 557 #ifdef _WIN32 558 558 char temp_path[PATH_MAX]; 559 inttemp_len;559 DWORD temp_len; 560 560 long rc; 561 561 HKEY hKey; … … 848 848 849 849 while (1) { 850 #ifdef _WIN32 851 if (mkdir(dirname) >= 0) 852 #else 850 853 if (mkdir(dirname, 0700) >= 0) 854 #endif 851 855 break; 852 856 if (errno != ENOENT … … 864 868 break; 865 869 dirname[j] = '/'; 870 #ifdef _WIN32 871 if (mkdir(dirname) < 0) 872 #else 866 873 if (mkdir(dirname, 0700) < 0) 874 #endif 867 875 goto failed; 868 876 } -
trunk/src/libopensc/internal-winscard.h
r3330 r3405 56 56 #define SCARD_E_NO_READERS_AVAILABLE 0x8010002E /**< Cannot find a smart card reader. */ 57 57 #define SCARD_W_UNRESPONSIVE_CARD 0x80100066 /**< The smart card is not responding to a reset. */ 58 #define SCARD_W_UNPOWERED_CARD 0x80100067 /**< Power has been removed from the smart card, so that further communication is not possible. */ 58 59 #define SCARD_W_RESET_CARD 0x80100068 /**< The smart card has been reset, so any shared state information is invalid. */ 59 60 #define SCARD_W_REMOVED_CARD 0x80100069 /**< The smart card has been removed, so further communication is not possible. */ -
trunk/src/libopensc/internal.h
r3115 r3405 36 36 #include "cards.h" 37 37 #include <assert.h> 38 #ifdef _WIN32 39 #include <windows.h> 40 #endif 38 41 39 42 #define SC_FILE_MAGIC 0x14426950 -
trunk/src/libopensc/log.c
r3173 r3405 36 36 #endif 37 37 38 #ifndef __GNUC__ 39 void sc_error(sc_context_t *ctx, const char *format, ...)38 /* Although not used, we need this for consistent exports */ 39 void _sc_error(sc_context_t *ctx, const char *format, ...) 40 40 { 41 41 va_list ap; … … 46 46 } 47 47 48 void sc_debug(sc_context_t *ctx, const char *format, ...) 48 /* Although not used, we need this for consistent exports */ 49 void _sc_debug(sc_context_t *ctx, const char *format, ...) 49 50 { 50 51 va_list ap; … … 54 55 va_end(ap); 55 56 } 56 57 #endif58 57 59 58 void sc_do_log(sc_context_t *ctx, int type, const char *file, int line, const char *func, const char *format, ...) -
trunk/src/libopensc/log.h
r3084 r3405 45 45 46 46 #else 47 48 void sc_error(struct sc_context *ctx, const char *format, ...); 49 void sc_debug(struct sc_context *ctx, const char *format, ...); 50 47 #define sc_error _sc_error 48 #define sc_debug _sc_debug 51 49 #endif 52 50 51 void _sc_error(struct sc_context *ctx, const char *format, ...); 52 void _sc_debug(struct sc_context *ctx, const char *format, ...); 53 53 void sc_do_log(struct sc_context *ctx, int type, const char *file, int line, const char *func, const char *format, ...); 54 54 void sc_do_log_va(struct sc_context *ctx, int type, const char *file, int line, const char *func, const char *format, va_list args); -
trunk/src/libopensc/opensc-config.in
r196 r3405 10 10 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 11 12 version="@VERSION@" 12 13 13 prefix= @prefix@14 exec_prefix= @exec_prefix@14 prefix="@prefix@" 15 exec_prefix="@exec_prefix@" 15 16 exec_prefix_set=no 16 17 17 opensc_libs="@OPENSC_LIBS@" 18
