MiniDriver: rename cardmod to minidriver in source.
Also change some grammar, whitespace (reported by git) and wording (Opensc->OpenSC) issues. Add some comments here and there. See http://www.opensc-project.org/pipermail/opensc-devel/2011-April/016261.html git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5329 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
577ccdbf26
commit
44cf3d06ae
23
configure.ac
23
configure.ac
|
@ -128,10 +128,10 @@ AC_ARG_ENABLE(
|
|||
)
|
||||
|
||||
AC_ARG_ENABLE(
|
||||
[cardmod],
|
||||
[AS_HELP_STRING([--enable-cardmod],[enable cardmod module on Windows @<:@disabled@:>@])],
|
||||
[minidriver],
|
||||
[AS_HELP_STRING([--enable-minidriver],[enable minidriver on Windows @<:@disabled@:>@])],
|
||||
,
|
||||
[enable_cardmod="no"]
|
||||
[enable_minidriver="no"]
|
||||
)
|
||||
|
||||
AC_ARG_ENABLE(
|
||||
|
@ -293,14 +293,14 @@ if test "${WIN32}" = "no"; then
|
|||
CC="${PTHREAD_CC}"
|
||||
fi
|
||||
|
||||
if test "${enable_cardmod}" = "yes"; then
|
||||
if test "${enable_minidriver}" = "yes"; then
|
||||
dnl win32 special test for minidriver
|
||||
AC_CHECK_HEADER(
|
||||
[cardmod.h],
|
||||
,
|
||||
[AC_MSG_ERROR([cardmod.h is not found and required for cardmod])]
|
||||
[AC_MSG_ERROR([cardmod.h is not found and required for minidriver])]
|
||||
)
|
||||
AC_DEFINE([ENABLE_CARDMOD], [1], [Enable cardmod support])
|
||||
AC_DEFINE([ENABLE_MINIDRIVER], [1], [Enable minidriver support])
|
||||
fi
|
||||
|
||||
AC_ARG_VAR([ZLIB_CFLAGS], [C compiler flags for zlib])
|
||||
|
@ -523,9 +523,6 @@ fi
|
|||
if test "${enable_ctapi}" = "yes"; then
|
||||
OPENSC_FEATURES="${OPENSC_FEATURES} ctapi"
|
||||
fi
|
||||
if test "${enable_cardmod}" = "yes"; then
|
||||
OPENSC_FEATURES="${OPENSC_FEATURES} cardmod"
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED([OPENSC_VERSION_MAJOR], [${OPENSC_VERSION_MAJOR}], [OpenSC version major component])
|
||||
AC_DEFINE_UNQUOTED([OPENSC_VERSION_MINOR], [${OPENSC_VERSION_MINOR}], [OpenSC version minor component])
|
||||
|
@ -564,7 +561,7 @@ AM_CONDITIONAL([ENABLE_OPENCT], [test "${enable_openct}" = "yes"])
|
|||
AM_CONDITIONAL([ENABLE_DOC], [test "${enable_doc}" = "yes"])
|
||||
AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"])
|
||||
AM_CONDITIONAL([CYGWIN], [test "${CYGWIN}" = "yes"])
|
||||
AM_CONDITIONAL([ENABLE_CARDMOD], [test "${enable_cardmod}" = "yes"])
|
||||
AM_CONDITIONAL([ENABLE_MINIDRIVER], [test "${enable_minidriver}" = "yes"])
|
||||
|
||||
if test "${enable_pedantic}" = "yes"; then
|
||||
enable_strict="yes";
|
||||
|
@ -592,8 +589,8 @@ AC_CONFIG_FILES([
|
|||
src/tests/Makefile
|
||||
src/tests/regression/Makefile
|
||||
src/tools/Makefile
|
||||
src/cardmod/Makefile
|
||||
src/cardmod/cardmod.inf
|
||||
src/minidriver/Makefile
|
||||
src/minidriver/opensc-minidriver.inf
|
||||
win32/Makefile
|
||||
win32/versioninfo.rc
|
||||
win32/winconfig.h
|
||||
|
@ -620,7 +617,7 @@ OpenSSL support: ${enable_openssl}
|
|||
PC/SC support: ${enable_pcsc}
|
||||
OpenCT support: ${enable_openct}
|
||||
CT-API support: ${enable_ctapi}
|
||||
cardmod support: ${enable_cardmod}
|
||||
minidriver support: ${enable_minidriver}
|
||||
|
||||
PC/SC default provider: ${DEFAULT_PCSC_PROVIDER}
|
||||
|
||||
|
|
|
@ -447,6 +447,7 @@ app tokend {
|
|||
}
|
||||
}
|
||||
|
||||
# XXX: remove cardmod pseudodriver
|
||||
app cardmod {
|
||||
# cardmod app name use special pcsc reader subset
|
||||
# fix options for this reader driver here.
|
||||
|
@ -457,4 +458,3 @@ app cardmod {
|
|||
# enable_pinpad = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,4 +3,4 @@ EXTRA_DIST = Makefile.mak
|
|||
|
||||
# Order IS important
|
||||
SUBDIRS = common scconf pkcs15init libopensc pkcs11 \
|
||||
tools tests cardmod
|
||||
tools tests minidriver
|
||||
|
|
|
@ -4,13 +4,8 @@ TOPDIR = ..
|
|||
|
||||
SUBDIRS = common scconf pkcs15init libopensc pkcs11 tools tests
|
||||
|
||||
!IF "$(MINIDRIVER_DEF)" == "/DENABLE_CARDMOD"
|
||||
SUBDIRS = $(SUBDIRS) cardmod
|
||||
!ENDIF
|
||||
|
||||
!IF "$(WIX_MSI_DEF)" == "/DBUILD_MSI"
|
||||
SUBDIRS = $(SUBDIRS) "$(TOPDIR)\etc"
|
||||
SUBDIRS = $(SUBDIRS) "$(TOPDIR)\win32\opensc-msi"
|
||||
!IF "$(MINIDRIVER_DEF)" == "/DENABLE_MINIDRIVER"
|
||||
SUBDIRS = $(SUBDIRS) minidriver
|
||||
!ENDIF
|
||||
|
||||
all::
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
include $(top_srcdir)/win32/ltrc.inc
|
||||
|
||||
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
|
||||
EXTRA_DIST = Makefile.mak
|
||||
|
||||
if ENABLE_CARDMOD
|
||||
lib_LTLIBRARIES = opensc-cardmod@LIBRARY_BITNESS@.la
|
||||
# Do we need this on bin? Why can't we
|
||||
# put it in dedicated directory
|
||||
dist_sbin_SCRIPTS = cardmod.inf cardmod-westcos.reg
|
||||
else
|
||||
dist_noinst_DATA = cardmod.inf cardmod-westcos.reg
|
||||
endif
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/src
|
||||
|
||||
opensc_cardmod@LIBRARY_BITNESS@_la_SOURCES = cardmod.c cardmod.exports \
|
||||
$(top_builddir)/win32/versioninfo.rc
|
||||
opensc_cardmod@LIBRARY_BITNESS@_la_LIBADD = $(LTLIB_LIBS) \
|
||||
$(top_builddir)/src/libopensc/libopensc.la \
|
||||
-lcrypt32
|
||||
opensc_cardmod@LIBRARY_BITNESS@_la_LDFLAGS = $(AM_LDFLAGS) \
|
||||
-export-symbols "$(srcdir)/cardmod.exports" \
|
||||
-module -avoid-version -no-undefined
|
||||
|
||||
if ENABLE_CARDMOD
|
||||
install-exec-hook:
|
||||
mv "$(DESTDIR)$(libdir)/opensc-cardmod@LIBRARY_BITNESS@.dll" "$(DESTDIR)$(bindir)/"
|
||||
endif
|
|
@ -654,11 +654,12 @@ int sc_context_create(sc_context_t **ctx_out, const sc_context_param_t *parm)
|
|||
|
||||
#ifdef ENABLE_PCSC
|
||||
ctx->reader_driver = sc_get_pcsc_driver();
|
||||
#ifdef ENABLE_CARDMOD
|
||||
/* XXX: remove cardmod pseudoreader driver */
|
||||
#ifdef ENABLE_MINIDRIVER
|
||||
if(strcmp(ctx->app_name, "cardmod") == 0) {
|
||||
ctx->reader_driver = sc_get_cardmod_driver();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#elif ENABLE_CTAPI
|
||||
ctx->reader_driver = sc_get_ctapi_driver();
|
||||
#elif ENABLE_OPENCT
|
||||
|
@ -681,8 +682,8 @@ int sc_context_create(sc_context_t **ctx_out, const sc_context_param_t *parm)
|
|||
return SC_SUCCESS;
|
||||
}
|
||||
|
||||
/* use by cardmod to pass in provided handles to reader-pcsc */
|
||||
int sc_ctx_use_reader(sc_context_t *ctx, void * pcsc_context_handle, void * pcsc_card_handle)
|
||||
/* Used by minidriver to pass in provided handles to reader-pcsc */
|
||||
int sc_ctx_use_reader(sc_context_t *ctx, void *pcsc_context_handle, void *pcsc_card_handle)
|
||||
{
|
||||
SC_FUNC_CALLED(ctx, SC_LOG_DEBUG_NORMAL);
|
||||
if (ctx->reader_driver->ops->use_reader != NULL)
|
||||
|
|
|
@ -388,8 +388,8 @@ struct sc_reader_operations {
|
|||
int timeout, void **reader_states);
|
||||
/* Reset a reader */
|
||||
int (*reset)(struct sc_reader *, int);
|
||||
/* used to pass in reader handles in cardmod mode */
|
||||
int (*use_reader)(struct sc_context *ctx, void * pcsc_context_handle, void * pcsc_card_handle);
|
||||
/* Used to pass in PC/SC handles to minidriver */
|
||||
int (*use_reader)(struct sc_context *ctx, void *pcsc_context_handle, void *pcsc_card_handle);
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -1551,7 +1551,7 @@ struct sc_reader_driver * sc_get_pcsc_driver(void)
|
|||
return &pcsc_drv;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_CARDMOD
|
||||
#ifdef ENABLE_MINIDRIVER
|
||||
|
||||
#define SCARD_CLASS_SYSTEM 0x7fff
|
||||
#define SCARD_ATTR_VALUE(Class, Tag) ((((ULONG)(Class)) << 16) | ((ULONG)(Tag)))
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
include $(top_srcdir)/win32/ltrc.inc
|
||||
|
||||
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
|
||||
EXTRA_DIST = Makefile.mak
|
||||
|
||||
if ENABLE_MINIDRIVER
|
||||
lib_LTLIBRARIES = opensc-minidriver@LIBRARY_BITNESS@.la
|
||||
# Do we need this on bin? Why can't we
|
||||
# put it in dedicated directory
|
||||
dist_sbin_SCRIPTS = opensc-minidriver.inf minidriver-westcos.reg
|
||||
else
|
||||
dist_noinst_DATA = opensc-minidriver.inf minidriver-westcos.reg
|
||||
endif
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/src
|
||||
|
||||
opensc_minidriver@LIBRARY_BITNESS@_la_SOURCES = minidriver.c minidriver.exports \
|
||||
$(top_builddir)/win32/versioninfo.rc
|
||||
opensc_minidriver@LIBRARY_BITNESS@_la_LIBADD = $(LTLIB_LIBS) \
|
||||
$(top_builddir)/src/libopensc/libopensc.la \
|
||||
-lcrypt32
|
||||
opensc_minidriver@LIBRARY_BITNESS@_la_LDFLAGS = $(AM_LDFLAGS) \
|
||||
-export-symbols "$(srcdir)/minidriver.exports" \
|
||||
-module -avoid-version -no-undefined
|
||||
|
||||
if ENABLE_MINIDRIVER
|
||||
install-exec-hook:
|
||||
mv "$(DESTDIR)$(libdir)/opensc-minidriver@LIBRARY_BITNESS@.dll" "$(DESTDIR)$(bindir)/"
|
||||
endif
|
|
@ -1,7 +1,7 @@
|
|||
TOPDIR = ..\..
|
||||
|
||||
TARGET = opensc-cardmod.dll
|
||||
OBJECTS = cardmod.obj
|
||||
TARGET = opensc-minidriver.dll
|
||||
OBJECTS = opensc-minidriver.obj
|
||||
|
||||
!INCLUDE $(TOPDIR)\win32\Make.rules.mak
|
||||
|
||||
|
@ -10,6 +10,6 @@ all: $(TARGET)
|
|||
$(TARGET): $(OBJECTS)
|
||||
echo LIBRARY $* > $*.def
|
||||
echo EXPORTS >> $*.def
|
||||
type cardmod.exports >> $*.def
|
||||
type minidriver.exports >> $*.def
|
||||
link /dll $(LINKFLAGS) /def:$*.def /out:$(TARGET) $(OBJECTS) ..\libopensc\opensc_a.lib $(ZLIB_LIB) $(OPENSSL_LIB) ..\common\libscdl.lib ws2_32.lib gdi32.lib advapi32.lib winscard.lib Crypt32.lib User32.lib
|
||||
if EXIST $(TARGET).manifest mt -manifest $(TARGET).manifest -outputresource:$(TARGET);2
|
|
@ -1,8 +1,7 @@
|
|||
Windows Registry Editor Version 5.00
|
||||
Windows Registry Editor Version 5.00
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\Calais\SmartCards\CEV WESTCOS]
|
||||
"80000001"="opensc-cardmod.dll"
|
||||
"80000001"="opensc-minidriver.dll"
|
||||
"ATR"=hex:3f,69,00,00,00,64,01,00,00,00,80,90,00
|
||||
"ATRMask"=hex:ff,ff,ff,ff,ff,ff,ff,00,00,00,f0,ff,ff
|
||||
"Crypto Provider"="Microsoft Base Smart Card Crypto Provider"
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -140,10 +140,9 @@ wow64_CopyFiles=10,syswow64
|
|||
; =================== Generic ==================================
|
||||
|
||||
[Strings]
|
||||
ProviderName ="Opensc"
|
||||
MediaDescription="Opensc Smart Card Minidriver Installation Disk"
|
||||
CardDeviceName="Opensc Minidriver for Smart Card"
|
||||
ProviderName ="OpenSC"
|
||||
MediaDescription="OpenSC Smart Card Minidriver Installation Disk"
|
||||
CardDeviceName="OpenSC Minidriver"
|
||||
SmartCardName="SOFTWARE\Microsoft\Cryptography\Calais\SmartCards\Cev Westcos"
|
||||
SmartCardNameWOW64="SOFTWARE\Wow6432Node\Microsoft\Cryptography\Calais\SmartCards\Cev Westcos"
|
||||
SmartCardCardModule="opensc-cardmod32.dll"
|
||||
SmartCardCardModule64="opensc-cardmod64.dll"
|
||||
SmartCardCardModule="opensc-minidriver.dll"
|
|
@ -1,7 +1,7 @@
|
|||
OPENSC_FEATURES = pcsc
|
||||
|
||||
#Include support of minidriver 'cardmod'
|
||||
MINIDRIVER_DEF = /DENABLE_CARDMOD
|
||||
#Include support for minidriver
|
||||
MINIDRIVER_DEF = /DENABLE_MINIDRIVER
|
||||
|
||||
#Build MSI with the Windows Installer XML (WIX) toolkit, requires WIX >= 3.6
|
||||
!IF "$(BUILD_ON)" == "WIN64"
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<File Source="$(var.SOURCE_DIR)\src\libopensc\opensc.dll" Vital="yes"/>
|
||||
</Component>
|
||||
<Component Id="opensc_minidriver.dll" Guid="*">
|
||||
<File Source="$(var.SOURCE_DIR)\src\cardmod\opensc-cardmod.dll" Vital="yes"/>
|
||||
<File Source="$(var.SOURCE_DIR)\src\minidriver\opensc-minidriver.dll" Vital="yes"/>
|
||||
</Component>
|
||||
</Directory>
|
||||
<!-- Install tools and profiles to Program Files -->
|
||||
|
|
Loading…
Reference in New Issue