Skip to contentSkip to conversation

libcacard AFE support and bug fixes

GIT PULL Alon Levy 2 participants 4 messages Jul 22, 2011 – Jul 29, 2011

lore
Share & tools
lore

Alon Levy

author
#0 lore raw

Hi,

Please pull fixes for AFE smart cards, cleanup and missing frees by Robert Relyea and Christophe Fergeau. Thanks.

The following changes since commit d1afc48b7cfdb4490f322d5d82a2aae6d545ec06:

SPARC64: implement addtional MMU faults related to nonfaulting load (2011-07-21 20:02:22 +0000)

are available in the git repository at:
git://anongit.freedesktop.org/~alon/qemu pull-libcacard.afe

Christophe Fergeau (5):
libcacard: don't leak vcard_emul_alloc_arrays mem
libcacard: s/strip(args++)/strip(args+1)
libcacard: fix soft=... parsing in vcard_emul_options
libcacard: introduce NEXT_TOKEN macro
libcacard: replace copy_string with strndup

Robert Relyea (1):
libcacard/vcard_emul_nss: support cards lying about CKM_RSA_X_509 support

 libcacard/vcard_emul_nss.c |  257 +++++++++++++++++++++++++++++++-------------
 1 files changed, 182 insertions(+), 75 deletions(-)

Alon

author
#1 lore raw
Quoted 2 lines · Alon Levy

Hi,

Hi Anthony,

Forgot to mention I would like this to be pulled for 0.15.0.

Alon

Quoted 25 lines

Please pull fixes for AFE smart cards, cleanup and missing frees by Robert Relyea and Christophe Fergeau. Thanks.

The following changes since commit d1afc48b7cfdb4490f322d5d82a2aae6d545ec06:

SPARC64: implement addtional MMU faults related to nonfaulting load (2011-07-21 20:02:22 +0000)

are available in the git repository at:
git://anongit.freedesktop.org/~alon/qemu pull-libcacard.afe

Christophe Fergeau (5):
libcacard: don't leak vcard_emul_alloc_arrays mem
libcacard: s/strip(args++)/strip(args+1)
libcacard: fix soft=... parsing in vcard_emul_options
libcacard: introduce NEXT_TOKEN macro
libcacard: replace copy_string with strndup

Robert Relyea (1):
libcacard/vcard_emul_nss: support cards lying about CKM_RSA_X_509 support

 libcacard/vcard_emul_nss.c |  257 +++++++++++++++++++++++++++++++-------------
 1 files changed, 182 insertions(+), 75 deletions(-)

Alon

author
#2 lore raw
Quoted 9 lines · Alon Levy
Quoted 2 lines · Alon Levy

Hi,

Hi Anthony,

Forgot to mention I would like this to be pulled for 0.15.0.

Alon

Also, I've added a revised patch for libcacard.pc. The original is
http://lists.gnu.org/archive/html/qemu-devel/2011-06/msg02733.html
The revised patch is:

commit 0f94d6da357954857f95d5be69817d8551a5526f

Author: Alon Levy <[email protected]>
Date:   Mon Jun 27 11:58:20 2011 +0200

libcacard: add pc file, install it + includes

Additionally:
+ add --includedir configure parameters
+ make install-libcacard install vscclient as well

configure +5 -0
index e57efb1..1cc3767 100755
@@ -146,6 +146,7 @@ datadir="\${prefix}/share/qemu"
 docdir="\${prefix}/share/doc/qemu"
 bindir="\${prefix}/bin"
 libdir="\${prefix}/lib"
+includedir="\${prefix}/include"
 sysconfdir="\${prefix}/etc"
 confsuffix="/qemu"
 slirp="yes"
@@ -539,6 +540,8 @@ for opt do
   ;;
   --libdir=*) libdir="$optarg"
   ;;
+  --includedir=*) includedir="$optarg"
+  ;;
   --datadir=*) datadir="$optarg"
   ;;
   --docdir=*) docdir="$optarg"
@@ -2542,6 +2545,7 @@ echo "Install prefix    $prefix"
 echo "BIOS directory    `eval echo $datadir`"
 echo "binary directory  `eval echo $bindir`"
 echo "library directory `eval echo $libdir`"
+echo "include directory `eval echo $includedir`"
 echo "config directory  `eval echo $sysconfdir`"
 if test "$mingw32" = "no" ; then
 echo "Manual directory  `eval echo $mandir`"
@@ -2635,6 +2639,7 @@ echo all: >> $config_host_mak
 echo "prefix=$prefix" >> $config_host_mak
 echo "bindir=$bindir" >> $config_host_mak
 echo "libdir=$libdir" >> $config_host_mak
+echo "includedir=$includedir" >> $config_host_mak
 echo "mandir=$mandir" >> $config_host_mak
 echo "datadir=$datadir" >> $config_host_mak
 echo "sysconfdir=$sysconfdir" >> $config_host_mak
libcacard/Makefile +24 -3
index 9802c37..bc34bf2 100644
@@ -2,7 +2,10 @@
 -include $(SRC_PATH)/Makefile.objs
 -include $(SRC_PATH)/rules.mak
 
-$(call set-vpath, $(SRC_PATH):$(SRC_PATH)/libcacard)
+libcacard_srcpath=$(SRC_PATH)/libcacard
+libcacard_includedir=$(includedir)/cacard
+
+$(call set-vpath, $(SRC_PATH):$(libcacard_srcpath))
 
 # objects linked against normal qemu binaries, not compiled with libtool
 QEMU_OBJS=$(addprefix ../,$(oslib-obj-y) qemu-malloc.o qemu-timer-common.o $(trace-obj-y))
@@ -18,7 +21,7 @@ vscclient: $(libcacard-y) $(QEMU_OBJS) vscclient.o
 	$(call quiet-command,$(CC) $(libcacard_libs) -lrt -o $@ $^,"  LINK  $@")
 
 clean:
-	rm -f *.o */*.o *.d */*.d *.a */*.a *~ */*~ vscclient *.lo .libs/* *.la
+	rm -f *.o */*.o *.d */*.d *.a */*.a *~ */*~ vscclient *.lo .libs/* *.la *.pc
 	rm -Rf .libs
 
 all: vscclient
@@ -36,7 +39,25 @@ else
 libcacard.la: $(libcacard.lib-y) $(QEMU_OBJS_LIB)
 	$(call quiet-command,libtool --mode=link --quiet --tag=CC $(CC) $(libcacard_libs) -lrt -rpath $(libdir) -o $@ $^,"  lt LINK $@")
 
-install-libcacard: libcacard.la
+libcacard.pc: $(libcacard_srcpath)/libcacard.pc.in
+	sed -e 's|@LIBDIR@|$(libdir)|' \
+		-e 's|@INCLUDEDIR@|$(libcacard_includedir)|' \
+	    -e 's|@VERSION@|$(shell cat $(SRC_PATH)/VERSION)|' \
+		-e 's|@PREFIX@|$(prefix)|' \
+		< $(libcacard_srcpath)/libcacard.pc.in > libcacard.pc
+
+.PHONY: install-libcacard
+
+install-libcacard: libcacard.pc libcacard.la vscclient
 	$(INSTALL_DIR) "$(DESTDIR)$(libdir)"
+	$(INSTALL_DIR) "$(DESTDIR)$(libdir)/pkgconfig"
+	$(INSTALL_DIR) "$(DESTDIR)$(libcacard_includedir)"
+	$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
+	libtool --mode=install $(INSTALL_PROG) vscclient "$(DESTDIR)$(bindir)"
 	libtool --mode=install $(INSTALL_PROG) libcacard.la "$(DESTDIR)$(libdir)"
+	libtool --mode=install $(INSTALL_PROG) libcacard.pc "$(DESTDIR)$(libdir)/pkgconfig"
+	for inc in *.h; do \
+		libtool --mode=install $(INSTALL_PROG) $(libcacard_srcpath)/$$inc "$(DESTDIR)$(libcacard_includedir)"; \
+	done
+
 endif
libcacard/libcacard.pc.in new file +13 -0
new file mode 100644
index 0000000..b6859b0
@@ -0,0 +1,13 @@
+prefix=@PREFIX@
+exec_prefix=${prefix}
+libdir=@LIBDIR@
+includedir=@INCLUDEDIR@
+
+Name: cacard
+Description: CA Card library
+Version: @VERSION@
+
+Requires:  nss
+Libs: -L${libdir} -lcacard
+Libs.private:
+Cflags: -I${includedir}
#3 lore raw
In reply to Alon Levy
Quoted 11 lines · Alon Levy

Hi,

Please pull fixes for AFE smart cards, cleanup and missing frees by Robert Relyea and Christophe Fergeau. Thanks.

The following changes since commit d1afc48b7cfdb4490f322d5d82a2aae6d545ec06:

SPARC64: implement addtional MMU faults related to nonfaulting load (2011-07-21 20:02:22 +0000)

are available in the git repository at:
git://anongit.freedesktop.org/~alon/qemu pull-libcacard.afe

Pulled. Thanks.

Regards,

Anthony Liguori

Quoted 17 lines

Christophe Fergeau (5):
libcacard: don't leak vcard_emul_alloc_arrays mem
libcacard: s/strip(args++)/strip(args+1)
libcacard: fix soft=... parsing in vcard_emul_options
libcacard: introduce NEXT_TOKEN macro
libcacard: replace copy_string with strndup

Robert Relyea (1):
libcacard/vcard_emul_nss: support cards lying about CKM_RSA_X_509 support

  libcacard/vcard_emul_nss.c |  257 +++++++++++++++++++++++++++++++-------------
  1 files changed, 182 insertions(+), 75 deletions(-)

Alon