PSARC/2016/220 libPKI
authornaoki.tanaka@oracle.com <naoki.tanaka@oracle.com>
Fri, 29 Apr 2016 16:32:46 -0700
changeset 5897 495a9e2444e4
parent 5896 f6a52b8a207c
child 5898 bec0360592b2
PSARC/2016/220 libPKI 22673523 Add libpki v0.8.9 to Userland consolidation
components/libpki/Makefile
components/libpki/files/setup_test.sh
components/libpki/libpki.license
components/libpki/libpki.p5m
components/libpki/patches/01-configure.patch
components/libpki/patches/02-makefile.patch
components/libpki/patches/03-libtool.patch
components/libpki/patches/04-studio.patch
components/libpki/patches/05-tests.patch
components/libpki/test/results-64.master
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/libpki/Makefile	Fri Apr 29 16:32:46 2016 -0700
@@ -0,0 +1,68 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+
+#
+# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+#
+
+BUILD_BITS= 64
+include ../../make-rules/shared-macros.mk
+
+COMPONENT_NAME=		libpki
+COMPONENT_VERSION=	0.8.9
+COMPONENT_PROJECT_URL=	https://www.openca.org/projects/libpki/
+COMPONENT_ARCHIVE_SRC=	git
+COMPONENT_BUGDB=	utility/smartcard
+
+GIT_REPO= https://github.com/openca/libpki
+GIT_COMMIT_ID= b46aebc
+GIT_HASH=  sha256:16e84a529f0871dcff175c717cf472bdad0de0a4719bf1f204d49d9011eace2c
+
+TPNO =			26905
+
+include $(WS_MAKE_RULES)/common.mk
+
+PKG_PROTO_DIRS += $(COMPONENT_SRC)/docs
+
+# This is necessary because 'gmake install' tries to install some files under
+# /usr/bin without it.
+CONFIGURE_ENV +=	DESTDIR="$(PROTO_DIR)"
+
+CONFIGURE_OPTIONS +=	--with-libdir=$(USRLIBDIR64)
+CONFIGURE_OPTIONS +=	--with-lib-prefix=$(USRLIBDIR64)
+
+COMPONENT_PRE_TEST_ACTION = files/setup_test.sh $(@D) $(COMPONENT_SRC)
+
+# Tests may output some compilation lines, so just pull out the relevant test
+# output lines for the test results comparison.
+COMPONENT_TEST_TRANSFORMS += \
+	'-n ' \
+	'-e "/\# TOTAL:/p" ' \
+	'-e "/\# PASS:/p" ' \
+	'-e "/\# SKIP:/p" ' \
+	'-e "/\# XFAIL:/p" ' \
+	'-e "/\# FAIL:/p" ' \
+	'-e "/\# XPASS:/p" ' \
+	'-e "/\# ERROR:/p" '
+
+REQUIRED_PACKAGES += library/libxml2
+REQUIRED_PACKAGES += library/security/openssl
+REQUIRED_PACKAGES += library/security/openssl/openssl-fips-140
+REQUIRED_PACKAGES += shell/ksh93
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/libpki/files/setup_test.sh	Fri Apr 29 16:32:46 2016 -0700
@@ -0,0 +1,55 @@
+#!/bin/sh
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+#
+
+BUILD_DIR=$1
+COMPONENT_SRC=$2
+
+export PATH=/bin:$PATH
+
+# Replace the path to that under component build dir
+gsed -i.orig 's|\"etc\"|'\""$BUILD_DIR"'/etc\"|g' $COMPONENT_SRC/src/tests/test6.c
+rm $COMPONENT_SRC/src/tests/test6.c.orig
+gsed -i.orig 's|\"etc\"|'\""$BUILD_DIR"'/etc\"|g' $COMPONENT_SRC/src/tests/test8.c
+rm $COMPONENT_SRC/src/tests/test8.c.orig
+
+# Make dirs under component build dir and copy necessary files under them
+rm -rf $BUILD_DIR/etc/hsm.d
+mkdir $BUILD_DIR/etc/hsm.d
+cp $COMPONENT_SRC/etc/hsm.d/etoken-engine.xml $BUILD_DIR/etc/hsm.d
+rm $BUILD_DIR/etc/objectIdentifiers.xml
+cp $COMPONENT_SRC/etc/objectIdentifiers.xml $BUILD_DIR/etc
+rm -rf $BUILD_DIR/etc/token.d
+mkdir $BUILD_DIR/etc/token.d
+cp $COMPONENT_SRC/etc/token.d/test.xml $BUILD_DIR/etc/token.d
+
+# Replace the path to that under component build dir
+sed -e 's|/$HOME|'"$BUILD_DIR"'/etc|g' $COMPONENT_SRC/etc/token.d/default.xml > $BUILD_DIR/etc/token.d/default.xml
+
+# Copy .libpki dir under component build dir
+rm -rf $BUILD_DIR/etc/.libpki
+cp -R $COMPONENT_SRC/etc/.libpki $BUILD_DIR/etc
+
+# Make results dir under component build dir
+rm -rf $BUILD_DIR/results
+mkdir $BUILD_DIR/results
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/libpki/libpki.license	Fri Apr 29 16:32:46 2016 -0700
@@ -0,0 +1,59 @@
+====================================================================
+                  LibPKI - Open Source Project
+        (c) 2007-2013 by OpenCA Labs and Massimiliano Pala
+                      All Rights Reserved
+====================================================================
+
+ This software have been released under an Apache-style licence.
+
+ This software consists of voluntary contributions made by many
+ individuals on behalf of the OpenCA Labs. For more information
+ on the OpenCA Team and the OpenCA Project please refer to
+ <http://www.OpenCA.org/>.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer. 
+
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+ 3. All advertising materials mentioning features or use of this
+    software must display the following acknowledgment:
+    "This product includes software developed by the OpenCA Labs
+    for use in the OpenCA project (http://www.OpenCA.org/)."
+
+ 4. The names "OpenCA" and "OpenCA Labs" must not be used to
+    endorse or promote products derived from this software without
+    prior written permission. For written permission, please contact
+    [email protected]
+
+ 5. Products derived from this software may not be called "OpenCA"
+    nor may "OpenCA" appear in their names without prior written
+    permission of the OpenCA Labs.
+
+ 6. Redistributions of any form whatsoever must retain the following
+    acknowledgment:
+
+       "This product includes software developed by Massimiliano
+        Pala and the OpenCA Labs for use in the OpenCA project
+        (http://www.openca.org/)."
+
+ THIS SOFTWARE IS PROVIDED BY THE OPENCA TEAM ``AS IS'' AND ANY
+ EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OPENCA TEAM OR
+ ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ OF THE POSSIBILITY OF SUCH DAMAGE.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/libpki/libpki.p5m	Fri Apr 29 16:32:46 2016 -0700
@@ -0,0 +1,193 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+#
+
+set name=pkg.fmri \
+    value=pkg:/library/security/ocsp/[email protected]$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
+set name=pkg.summary \
+    value="Provides a library for managing certificates for smartcards"
+set name=pkg.description \
+    value="Provides a library to manage PKI-enabled application certificates from generation to validation for smartcards."
+set name=com.oracle.info.description value="the LibPKI Project"
+set name=com.oracle.info.tpno value=$(TPNO)
+set name=info.classification \
+    value=org.opensolaris.category.2008:System/Libraries \
+    value=org.opensolaris.category.2008:System/Security
+set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
+set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
+set name=org.opensolaris.arc-caseid value=PSARC/2016/220
+set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
+dir  path=etc/libpki/hsm.d
+file path=etc/libpki/profile.d/server.xml
+file path=etc/libpki/profile.d/test.xml
+file path=etc/libpki/profile.d/user.xml
+file path=etc/libpki/store.d/empty.xml
+dir  path=etc/libpki/token.d
+file path=etc/pki.conf
+file path=usr/bin/libpki-config
+file path=usr/bin/pki-cert
+file path=usr/bin/pki-crl
+file path=usr/bin/pki-derenc
+file path=usr/bin/pki-lirt
+file path=usr/bin/pki-query
+file path=usr/bin/pki-request
+file path=usr/bin/pki-siginfo
+file path=usr/bin/pki-tool
+file path=usr/bin/pki-xpair
+file path=usr/bin/url-tool
+file path=usr/include/libpki/cms.h
+file path=usr/include/libpki/cms/cms_cert_req.h
+file path=usr/include/libpki/config.h
+file path=usr/include/libpki/crypto.h
+file path=usr/include/libpki/drivers/engine/data_st.h
+file path=usr/include/libpki/drivers/engine/engine_hsm.h
+file path=usr/include/libpki/drivers/engine/engine_hsm_obj.h
+file path=usr/include/libpki/drivers/engine/engine_hsm_pkey.h
+file path=usr/include/libpki/drivers/engine/engine_st.h
+file path=usr/include/libpki/drivers/hsm_keypair.h
+file path=usr/include/libpki/drivers/hsm_main.h
+file path=usr/include/libpki/drivers/hsm_slot.h
+file path=usr/include/libpki/drivers/kmf/data_st.h
+file path=usr/include/libpki/drivers/kmf/kmf_hsm.h
+file path=usr/include/libpki/drivers/kmf/kmf_hsm_engine.h
+file path=usr/include/libpki/drivers/kmf/kmf_hsm_pkey.h
+file path=usr/include/libpki/drivers/kmf/kmf_hsm_sign.h
+file path=usr/include/libpki/drivers/kmf/pki_kmflib.h
+file path=usr/include/libpki/drivers/openssl/data_st.h
+file path=usr/include/libpki/drivers/openssl/openssl_hsm.h
+file path=usr/include/libpki/drivers/openssl/openssl_hsm_cb.h
+file path=usr/include/libpki/drivers/openssl/openssl_hsm_obj.h
+file path=usr/include/libpki/drivers/openssl/openssl_hsm_pkey.h
+file path=usr/include/libpki/drivers/pkcs11/pkcs11_hsm.h
+file path=usr/include/libpki/drivers/pkcs11/pkcs11_hsm_obj.h
+file path=usr/include/libpki/drivers/pkcs11/pkcs11_hsm_pkey.h
+file path=usr/include/libpki/drivers/pkcs11/pkcs11_utils.h
+file path=usr/include/libpki/drivers/pkcs11/rsa/cryptoki.h
+file path=usr/include/libpki/drivers/pkcs11/rsa/pkcs11_func.h
+file path=usr/include/libpki/drivers/pkcs11/rsa/pkcs11t.h
+file path=usr/include/libpki/errors-new.h
+file path=usr/include/libpki/errors.h
+file path=usr/include/libpki/extensions.h
+file path=usr/include/libpki/hsm_st.h
+file path=usr/include/libpki/io/pki_keypair_io.h
+file path=usr/include/libpki/io/pki_msg_req_io.h
+file path=usr/include/libpki/io/pki_msg_resp_io.h
+file path=usr/include/libpki/io/pki_ocsp_req_io.h
+file path=usr/include/libpki/io/pki_ocsp_resp_io.h
+file path=usr/include/libpki/io/pki_x509_cert_io.h
+file path=usr/include/libpki/io/pki_x509_crl_io.h
+file path=usr/include/libpki/io/pki_x509_io.h
+file path=usr/include/libpki/io/pki_x509_p12_io.h
+file path=usr/include/libpki/io/pki_x509_pkcs7_io.h
+file path=usr/include/libpki/io/pki_x509_req_io.h
+file path=usr/include/libpki/io/pki_x509_xpair_io.h
+file path=usr/include/libpki/lirt/lirt.h
+file path=usr/include/libpki/lirt/lirt_asn1.h
+file path=usr/include/libpki/lirt/lirt_bio.h
+file path=usr/include/libpki/lirt/lirt_lib.h
+file path=usr/include/libpki/net/dns.h
+file path=usr/include/libpki/net/http_s.h
+file path=usr/include/libpki/net/ldap.h
+file path=usr/include/libpki/net/pkcs11.h
+file path=usr/include/libpki/net/pki_mysql.h
+file path=usr/include/libpki/net/pki_pg.h
+file path=usr/include/libpki/net/pki_socket.h
+file path=usr/include/libpki/net/sock.h
+file path=usr/include/libpki/net/ssl.h
+file path=usr/include/libpki/net/url.h
+file path=usr/include/libpki/openssl/data_st.h
+file path=usr/include/libpki/openssl/pthread_init.h
+file path=usr/include/libpki/os.h
+file path=usr/include/libpki/pki.h
+file path=usr/include/libpki/pki_algor.h
+file path=usr/include/libpki/pki_algorithm.h
+file path=usr/include/libpki/pki_conf.h
+file path=usr/include/libpki/pki_cred.h
+file path=usr/include/libpki/pki_digest.h
+file path=usr/include/libpki/pki_hmac.h
+file path=usr/include/libpki/pki_id.h
+file path=usr/include/libpki/pki_id_info.h
+file path=usr/include/libpki/pki_init.h
+file path=usr/include/libpki/pki_integer.h
+file path=usr/include/libpki/pki_io.h
+file path=usr/include/libpki/pki_keypair.h
+file path=usr/include/libpki/pki_keyparams.h
+file path=usr/include/libpki/pki_log.h
+file path=usr/include/libpki/pki_mem.h
+file path=usr/include/libpki/pki_msg.h
+file path=usr/include/libpki/pki_msg_req.h
+file path=usr/include/libpki/pki_msg_resp.h
+file path=usr/include/libpki/pki_ocsp_req.h
+file path=usr/include/libpki/pki_ocsp_resp.h
+file path=usr/include/libpki/pki_oid.h
+file path=usr/include/libpki/pki_string.h
+file path=usr/include/libpki/pki_threads.h
+file path=usr/include/libpki/pki_threads_vars.h
+file path=usr/include/libpki/pki_time.h
+file path=usr/include/libpki/pki_x509.h
+file path=usr/include/libpki/pki_x509_attribute.h
+file path=usr/include/libpki/pki_x509_cert.h
+file path=usr/include/libpki/pki_x509_cert_mem.h
+file path=usr/include/libpki/pki_x509_crl.h
+file path=usr/include/libpki/pki_x509_data_st.h
+file path=usr/include/libpki/pki_x509_extension.h
+file path=usr/include/libpki/pki_x509_mem.h
+file path=usr/include/libpki/pki_x509_mime.h
+file path=usr/include/libpki/pki_x509_name.h
+file path=usr/include/libpki/pki_x509_p12.h
+file path=usr/include/libpki/pki_x509_pkcs7.h
+file path=usr/include/libpki/pki_x509_profile.h
+file path=usr/include/libpki/pki_x509_req.h
+file path=usr/include/libpki/pki_x509_signature.h
+file path=usr/include/libpki/pki_x509_xpair.h
+file path=usr/include/libpki/pki_x509_xpair_asn1.h
+file path=usr/include/libpki/profile.h
+file path=usr/include/libpki/prqp/http_client.h
+file path=usr/include/libpki/prqp/prqp.h
+file path=usr/include/libpki/prqp/prqp_asn1.h
+file path=usr/include/libpki/prqp/prqp_bio.h
+file path=usr/include/libpki/prqp/prqp_lib.h
+file path=usr/include/libpki/prqp/prqp_req_io.h
+file path=usr/include/libpki/prqp/prqp_resp_io.h
+file path=usr/include/libpki/prqp/prqp_srv.h
+file path=usr/include/libpki/prqp/prqp_stack.h
+file path=usr/include/libpki/scep/pki_x509_scep_asn1.h
+file path=usr/include/libpki/scep/pki_x509_scep_attrs.h
+file path=usr/include/libpki/scep/pki_x509_scep_data.h
+file path=usr/include/libpki/scep/pki_x509_scep_msg.h
+file path=usr/include/libpki/scep/scep.h
+file path=usr/include/libpki/stack.h
+file path=usr/include/libpki/support.h
+file path=usr/include/libpki/token.h
+file path=usr/include/libpki/token_data.h
+file path=usr/include/libpki/token_id.h
+file path=usr/include/libpki/token_st.h
+link path=usr/lib/$(MACH64)/libpki.so target=libpki.so.89.89.9
+link path=usr/lib/$(MACH64)/libpki.so.89 target=libpki.so.89.89.9
+file path=usr/lib/$(MACH64)/libpki.so.89.89.9
+file path=usr/lib/$(MACH64)/pkgconfig/libpki.pc
+file README.data_structures path=usr/share/doc/libpki/README.data_structures
+file README.functions path=usr/share/doc/libpki/README.functions
+file path=usr/share/doc/libpki/pkginfo
+license COPYING license=Apache
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/libpki/patches/01-configure.patch	Fri Apr 29 16:32:46 2016 -0700
@@ -0,0 +1,38 @@
+Patch origin: in-house
+Patch status: Solaris-specific; not suitable for upstream
+
+Need to add architectures for Oracle build environments.
+Also need to disable rpath to avoid including 32-bit runpath in 64-bit binary.
+
+--- libpki-0.8.9/configure	2015-11-10 13:50:26.446036204 -0800
++++ libpki-0.8.9/configure	2016-03-03 14:26:17.948469807 -0800
[email protected]@ -2529,11 +2529,20 @@
+     mybits="64"
+     mybits_install="64"
+     ;;
++  *i86pc)
++    mybits="64"
++    mybits_install="64"
++    ;;
+   *sparc*)
+     mybits="64"
+     mybits_install="64"
+     is_sparc="yes"
+     ;;
++  *sun4v*)
++    mybits="64"
++    mybits_install="64"
++    is_sparc="yes"
++    ;;
+   *aix*)
+     mybits="64"
+     mybits_install="64"
[email protected]@ -2626,7 +2635,7 @@
+ 
+ 
+ 
+-enable_rpath=yes
++enable_rpath=no
+ 
+ # Export variables to prevent autoconf to use rpl_malloc instead
+ # of malloc (it won't link properly otherwise!) - needed for iPhone
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/libpki/patches/02-makefile.patch	Fri Apr 29 16:32:46 2016 -0700
@@ -0,0 +1,443 @@
+Patch origin: in-house
+Patch status: Solaris-specific; not suitable for upstream
+
+There are nine test cases included in this component, but test 7 & 8 are
+intentionally disabled because test 7 requires us to set up mysql server,
+ldap serves, etc, and because test 8 uses libeTPkcs11.so, which is a
+commercial product. 
+
+Documents should be installed under /usr/share/doc/libpki instead of
+/usr/share/libpki.
+
+Need to include $(top_srcdir)/src because not all headers are available in
+$(top_builddir)src/libpki.
+
+Configuration files should be installed under /etc/libpki.
+
+Test scripts need escapes because they are executed indirectly.
+
+--- libpki-0.8.9/Makefile.in	Tue Nov 10 13:50:26 2015
++++ libpki-0.8.9/Makefile.in	Fri Jan 22 15:20:53 2016
[email protected]@ -720,8 +720,6 @@
+  	src/tests/test4 \
+  	src/tests/test5 \
+  	src/tests/test6 \
+- 	src/tests/test7 \
+- 	src/tests/test8 \
+ 	src/tests/test9
+ 
+ MAKEFILE = Makefile
+--- libpki-0.8.9/docs/Makefile.in	2015-11-10 13:50:26.216743764 -0800
++++ libpki-0.8.9/docs/Makefile.in	2016-04-15 10:52:12.325254362 -0700
[email protected]@ -550,10 +550,11 @@
+ install-data-am: install-man
+ 	@$(NORMAL_INSTALL) ; \
+         $(mkinstalldirs) $(DESTDIR)$(exec_prefix)/share; \
+-        $(mkinstalldirs) $(DESTDIR)$(exec_prefix)/share/libpki; \
++        $(mkinstalldirs) $(DESTDIR)$(exec_prefix)/share/doc; \
++        $(mkinstalldirs) $(DESTDIR)$(exec_prefix)/share/doc/libpki; \
+         for file in $(EXTRA_DIST) latex/refman.pdf; do \
+             if test -f $$file; then \
+-              $(INSTALL_DATA) $$file $(DESTDIR)$(exec_prefix)/share/libpki; \
++              $(INSTALL_DATA) $$file $(DESTDIR)$(exec_prefix)/share/doc/libpki; \
+             fi \
+           done
+ 
+--- libpki-0.8.9/src/drivers/openssl/Makefile.in	Tue Nov 10 13:50:28 2015
++++ libpki-0.8.9/src/drivers/openssl/Makefile.in	Fri Nov 13 11:47:48 2015
[email protected]@ -123,7 +123,7 @@
+ am__v_at_ = $([email protected][email protected])
+ am__v_at_0 = @
+ am__v_at_1 = 
+-DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)/src/libpki
++DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)/src/libpki -I$(top_srcdir)/src
+ depcomp = $(SHELL) $(top_srcdir)/build/depcomp
+ am__depfiles_maybe = depfiles
+ am__mv = mv -f
+--- libpki-0.8.9/src/drivers/engine/Makefile.in	Tue Nov 10 13:50:28 2015
++++ libpki-0.8.9/src/drivers/engine/Makefile.in	Fri Nov 13 11:48:47 2015
[email protected]@ -121,7 +121,7 @@
+ am__v_at_ = $([email protected][email protected])
+ am__v_at_0 = @
+ am__v_at_1 = 
+-DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)/src/libpki
++DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)/src/libpki -I$(top_srcdir)/src
+ depcomp = $(SHELL) $(top_srcdir)/build/depcomp
+ am__depfiles_maybe = depfiles
+ am__mv = mv -f
+--- libpki-0.8.9/src/drivers/pkcs11/Makefile.in	Tue Nov 10 13:50:28 2015
++++ libpki-0.8.9/src/drivers/pkcs11/Makefile.in	Fri Nov 13 11:50:19 2015
[email protected]@ -122,7 +122,7 @@
+ am__v_at_ = $([email protected][email protected])
+ am__v_at_0 = @
+ am__v_at_1 = 
+-DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)/src/libpki
++DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)/src/libpki -I$(top_srcdir)/src
+ depcomp = $(SHELL) $(top_srcdir)/build/depcomp
+ am__depfiles_maybe = depfiles
+ am__mv = mv -f
+--- libpki-0.8.9/src/drivers/Makefile.in	Tue Nov 10 13:50:28 2015
++++ libpki-0.8.9/src/drivers/Makefile.in	Fri Nov 13 11:51:56 2015
[email protected]@ -120,7 +120,7 @@
+ am__v_at_ = $([email protected][email protected])
+ am__v_at_0 = @
+ am__v_at_1 = 
+-DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)/src/libpki
++DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)/src/libpki -I$(top_srcdir)/src
+ depcomp = $(SHELL) $(top_srcdir)/build/depcomp
+ am__depfiles_maybe = depfiles
+ am__mv = mv -f
+--- libpki-0.8.9/src/openssl/Makefile.in	Tue Nov 10 13:50:29 2015
++++ libpki-0.8.9/src/openssl/Makefile.in	Fri Nov 13 11:53:25 2015
[email protected]@ -140,7 +140,7 @@
+ am__v_at_ = $([email protected][email protected])
+ am__v_at_0 = @
+ am__v_at_1 = 
+-DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)/src/libpki
++DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)/src/libpki -I$(top_srcdir)/src
+ depcomp = $(SHELL) $(top_srcdir)/build/depcomp
+ am__depfiles_maybe = depfiles
+ am__mv = mv -f
+--- libpki-0.8.9/src/io/Makefile.in	Tue Nov 10 13:50:29 2015
++++ libpki-0.8.9/src/io/Makefile.in	Fri Nov 13 11:56:27 2015
[email protected]@ -127,7 +127,7 @@
+ am__v_at_ = $([email protected][email protected])
+ am__v_at_0 = @
+ am__v_at_1 = 
+-DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)/src/libpki
++DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)/src/libpki -I$(top_srcdir)/src
+ depcomp = $(SHELL) $(top_srcdir)/build/depcomp
+ am__depfiles_maybe = depfiles
+ am__mv = mv -f
+--- libpki-0.8.9/src/net/Makefile.in	Tue Nov 10 13:50:29 2015
++++ libpki-0.8.9/src/net/Makefile.in	Fri Nov 13 11:58:14 2015
[email protected]@ -122,7 +122,7 @@
+ am__v_at_ = $([email protected][email protected])
+ am__v_at_0 = @
+ am__v_at_1 = 
+-DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)/src/libpki
++DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)/src/libpki -I$(top_srcdir)/src
+ depcomp = $(SHELL) $(top_srcdir)/build/depcomp
+ am__depfiles_maybe = depfiles
+ am__mv = mv -f
+--- libpki-0.8.9/src/scep/Makefile.in	Tue Nov 10 13:50:26 2015
++++ libpki-0.8.9/src/scep/Makefile.in	Fri Nov 13 12:00:02 2015
[email protected]@ -122,7 +122,7 @@
+ am__v_at_ = $([email protected][email protected])
+ am__v_at_0 = @
+ am__v_at_1 = 
+-DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)/src/libpki
++DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)/src/libpki -I$(top_srcdir)/src
+ depcomp = $(SHELL) $(top_srcdir)/build/depcomp
+ am__depfiles_maybe = depfiles
+ am__mv = mv -f
+--- libpki-0.8.9/src/cms/Makefile.in	Tue Nov 10 13:50:26 2015
++++ libpki-0.8.9/src/cms/Makefile.in	Fri Nov 13 12:01:44 2015
[email protected]@ -119,7 +119,7 @@
+ am__v_at_ = $([email protected][email protected])
+ am__v_at_0 = @
+ am__v_at_1 = 
+-DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)/src/libpki
++DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)/src/libpki -I$(top_srcdir)/src
+ depcomp = $(SHELL) $(top_srcdir)/build/depcomp
+ am__depfiles_maybe = depfiles
+ am__mv = mv -f
+--- libpki-0.8.9/src/prqp/Makefile.in	Tue Nov 10 13:50:26 2015
++++ libpki-0.8.9/src/prqp/Makefile.in	Fri Nov 13 12:03:37 2015
[email protected]@ -122,7 +122,7 @@
+ am__v_at_ = $([email protected][email protected])
+ am__v_at_0 = @
+ am__v_at_1 = 
+-DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)/src/libpki
++DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)/src/libpki -I$(top_srcdir)/src
+ depcomp = $(SHELL) $(top_srcdir)/build/depcomp
+ am__depfiles_maybe = depfiles
+ am__mv = mv -f
+--- libpki-0.8.9/src/lirt/Makefile.in	Tue Nov 10 13:50:28 2015
++++ libpki-0.8.9/src/lirt/Makefile.in	Fri Nov 13 12:05:33 2015
[email protected]@ -120,7 +120,7 @@
+ am__v_at_ = $([email protected][email protected])
+ am__v_at_0 = @
+ am__v_at_1 = 
+-DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)/src/libpki
++DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)/src/libpki -I$(top_srcdir)/src
+ depcomp = $(SHELL) $(top_srcdir)/build/depcomp
+ am__depfiles_maybe = depfiles
+ am__mv = mv -f
+--- libpki-0.8.9/src/Makefile.in	Tue Nov 10 13:50:28 2015
++++ libpki-0.8.9/src/Makefile.in	Fri Nov 13 12:58:39 2015
[email protected]@ -84,7 +84,7 @@
+ subdir = src
+ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ 	$(top_srcdir)/build/mkinstalldirs $(srcdir)/global-vars.in \
+-	$(top_srcdir)/build/depcomp $(nobase_include_HEADERS)
++	$(top_srcdir)/build/depcomp $(include_HEADERS)
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
[email protected]@ -200,7 +200,7 @@
+     n|no|NO) false;; \
+     *) (install-info --version) >/dev/null 2>&1;; \
+   esac
+-HEADERS = $(nobase_include_HEADERS)
++HEADERS = $(include_HEADERS)
+ RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+   distclean-recursive maintainer-clean-recursive
+ am__recursive_targets = \
[email protected]@ -487,22 +487,26 @@
+ 	-I$(top_srcdir)/src/libpki \
+ 	$(COND_INCLUDES)
+ 
+-nobase_include_HEADERS = \
+-	libpki/*.h \
+-	libpki/net/*.h \
+-	libpki/io/*.h \
+-	libpki/scep/*.h \
+-	libpki/prqp/*.h \
+-	libpki/lirt/*.h \
+-	libpki/cms/*.h \
+-	libpki/openssl/*.h \
+-	libpki/drivers/*.h \
+-	libpki/drivers/openssl/*.h \
+-	libpki/drivers/engine/*.h \
+-	libpki/drivers/pkcs11/*.h \
+-	libpki/drivers/pkcs11/rsa/*.h \
+-	libpki/drivers/kmf/*.h
++include_HEADERS = $(nobase_include_HEADERS) $(src_include_HEADERS)
+ 
++nobase_include_HEADERS = libpki/*.h
++
++src_include_HEADERS = \
++	$(top_srcdir)/src/libpki/*.h \
++	$(top_srcdir)/src/libpki/net/*.h \
++	$(top_srcdir)/src/libpki/io/*.h \
++	$(top_srcdir)/src/libpki/scep/*.h \
++	$(top_srcdir)/src/libpki/prqp/*.h \
++	$(top_srcdir)/src/libpki/lirt/*.h \
++	$(top_srcdir)/src/libpki/cms/*.h \
++	$(top_srcdir)/src/libpki/openssl/*.h \
++	$(top_srcdir)/src/libpki/drivers/*.h \
++	$(top_srcdir)/src/libpki/drivers/openssl/*.h \
++	$(top_srcdir)/src/libpki/drivers/engine/*.h \
++	$(top_srcdir)/src/libpki/drivers/pkcs11/*.h \
++	$(top_srcdir)/src/libpki/drivers/pkcs11/rsa/*.h \
++	$(top_srcdir)/src/libpki/drivers/kmf/*.h
++
+ SRCS = \
+ 	pki_init.c \
+ 	stack.c \
[email protected]@ -848,9 +852,9 @@
+ 
+ clean-libtool:
+ 	-rm -rf .libs _libs
+-install-nobase_includeHEADERS: $(nobase_include_HEADERS)
++install-includeHEADERS: $(include_HEADERS)
+ 	@$(NORMAL_INSTALL)
+-	@list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \
++	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+ 	if test -n "$$list"; then \
+ 	  echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
+ 	  $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
[email protected]@ -867,9 +871,9 @@
+ 	    $(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(includedir)/$$dir" || exit $$?; }; \
+ 	done
+ 
+-uninstall-nobase_includeHEADERS:
++uninstall-includeHEADERS:
+ 	@$(NORMAL_UNINSTALL)
+-	@list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \
++	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+ 	$(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
+ 	dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
+ 
[email protected]@ -1088,7 +1092,7 @@
+ 
+ info-am:
+ 
+-install-data-am: install-nobase_includeHEADERS
++install-data-am: install-includeHEADERS
+ 
+ install-dvi: install-dvi-recursive
+ 
[email protected]@ -1135,7 +1139,7 @@
+ ps-am:
+ 
+ uninstall-am: uninstall-binSCRIPTS uninstall-libLTLIBRARIES \
+-	uninstall-nobase_includeHEADERS
++	uninstall-includeHEADERS
+ 
+ .MAKE: $(am__recursive_targets) install-am install-strip
+ 
[email protected]@ -1148,13 +1152,13 @@
+ 	install-data-am install-dvi install-dvi-am install-exec \
+ 	install-exec-am install-html install-html-am install-info \
+ 	install-info-am install-libLTLIBRARIES install-man \
+-	install-nobase_includeHEADERS install-pdf install-pdf-am \
++	install-includeHEADERS install-pdf install-pdf-am \
+ 	install-ps install-ps-am install-strip installcheck \
+ 	installcheck-am installdirs installdirs-am maintainer-clean \
+ 	maintainer-clean-generic mostlyclean mostlyclean-compile \
+ 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ 	tags tags-am uninstall uninstall-am uninstall-binSCRIPTS \
+-	uninstall-libLTLIBRARIES uninstall-nobase_includeHEADERS
++	uninstall-libLTLIBRARIES uninstall-includeHEADERS
+ 
+ include $(TOP)/global-vars
+ 
+--- libpki-0.8.9/src/tools/Makefile.in	Tue Nov 10 13:50:28 2015
++++ libpki-0.8.9/src/tools/Makefile.in	Fri Nov 13 13:02:54 2015
[email protected]@ -186,7 +186,7 @@
+ am__v_at_ = $([email protected][email protected])
+ am__v_at_0 = @
+ am__v_at_1 = 
+-DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)/src/libpki
++DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)/src/libpki -I$(top_srcdir)/src
+ depcomp = $(SHELL) $(top_srcdir)/build/depcomp
+ am__depfiles_maybe = depfiles
+ am__mv = mv -f
+--- libpki-0.8.9/etc/Makefile.in	2015-11-10 13:50:29.721576908 -0800
++++ libpki-0.8.9/etc/Makefile.in	2016-03-03 16:52:45.825183809 -0800
[email protected]@ -340,7 +340,7 @@
+ HSMS = hsm.d/*.xml
+ STORES = store.d/*.xml
+ CONFIGS = *.xml
+-PKI_CONFIG = pki.conf
++PKI_CONFIG = $(srcdir)/pki.conf
+ EXTRA_DIST = $(PROFILES) $(TOKENS) $(HSMS) $(STORES) $(CONFIGS) $(PKI_CONFIG)
+ all: all-am
+ 
[email protected]@ -536,37 +536,37 @@
+ 
+ install-data-local:
+ 	@$(NORMAL_INSTALL) ; \
+-        $(mkinstalldirs) $(DESTDIR)$(exec_prefix)/etc/libpki; \
+-        $(mkinstalldirs) $(DESTDIR)$(exec_prefix)/etc/libpki/hsm.d; \
+-        $(mkinstalldirs) $(DESTDIR)$(exec_prefix)/etc/libpki/token.d; \
+-        $(mkinstalldirs) $(DESTDIR)$(exec_prefix)/etc/libpki/store.d; \
+-        $(mkinstalldirs) $(DESTDIR)$(exec_prefix)/etc/libpki/profile.d; \
++        $(mkinstalldirs) $(DESTDIR)/etc/libpki; \
++        $(mkinstalldirs) $(DESTDIR)/etc/libpki/hsm.d; \
++        $(mkinstalldirs) $(DESTDIR)/etc/libpki/token.d; \
++        $(mkinstalldirs) $(DESTDIR)/etc/libpki/store.d; \
++        $(mkinstalldirs) $(DESTDIR)/etc/libpki/profile.d; \
+         for file in $(PROFILES) ; do \
+             if test -f $$file; then \
+-              $(INSTALL_DATA) $$file $(DESTDIR)$(exec_prefix)/etc/libpki/profile.d; \
++              $(INSTALL_DATA) $$file $(DESTDIR)/etc/libpki/profile.d; \
+             fi \
+           done
+ 	@for file in $(TOKENS) ; do \
+             if test -f $$file; then \
+-              $(INSTALL_DATA) $$file $(DESTDIR)$(exec_prefix)/etc/libpki/token.d; \
++              $(INSTALL_DATA) $$file $(DESTDIR)/etc/libpki/token.d; \
+             fi \
+           done
+ 	@for file in $(HSMS) ; do \
+             if test -f $$file; then \
+-              $(INSTALL_DATA) $$file $(DESTDIR)$(exec_prefix)/etc/libpki/hsm.d; \
++              $(INSTALL_DATA) $$file $(DESTDIR)/etc/libpki/hsm.d; \
+             fi \
+           done
+ 	@for file in $(STORES) ; do \
+             if test -f $$file; then \
+-              $(INSTALL_DATA) $$file $(DESTDIR)$(exec_prefix)/etc/libpki/store.d; \
++              $(INSTALL_DATA) $$file $(DESTDIR)/etc/libpki/store.d; \
+             fi \
+           done
+ 	@for file in $(CONFIGS) ; do \
+             if test -f $$file; then \
+-              $(INSTALL_DATA) $$file $(DESTDIR)$(exec_prefix)/etc/libpki; \
++              $(INSTALL_DATA) $$file $(DESTDIR)/etc/libpki; \
+             fi \
+           done
+-	@$(INSTALL_DATA) $(PKI_CONFIG) $(DESTDIR)$(exec_prefix)/etc
++	@$(INSTALL_DATA) $(PKI_CONFIG) $(DESTDIR)/etc
+ 
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+--- libpki-0.8.9/src/tests/Makefile.in	2015-11-10 13:50:26.783174638 -0800
++++ libpki-0.8.9/src/tests/Makefile.in	2016-02-05 14:22:47.657049798 -0800
[email protected]@ -166,7 +166,7 @@
+ am__v_at_ = $([email protected][email protected])
+ am__v_at_0 = @
+ am__v_at_1 = 
+-DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)/src/libpki
++DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)/src/libpki -I$(top_srcdir)/src
+ depcomp = $(SHELL) $(top_srcdir)/build/depcomp
+ am__depfiles_maybe = depfiles
+ am__mv = mv -f
[email protected]@ -522,7 +522,7 @@
+ test9_SOURCES = test9.c
+ test9_LDFLAGS = $(testLDFLAGS)
+ test9_LDADD = $(testLDADD)
+-test9_CFLAGS = -I$(TOP) $(LIBPKI_CFLAGS) -ggdb
++test9_CFLAGS = -I$(TOP) $(LIBPKI_CFLAGS)
+ all: all-recursive
+ 
+ .SUFFIXES:
[email protected]@ -570,38 +570,65 @@
+ test1$(EXEEXT): $(test1_OBJECTS) $(test1_DEPENDENCIES) $(EXTRA_test1_DEPENDENCIES) 
+ 	@rm -f test1$(EXEEXT)
+ 	$(AM_V_CCLD)$(test1_LINK) $(test1_OBJECTS) $(test1_LDADD) $(LIBS)
++	@gsed -i 's/$$libtool_install_magic/$$$$libtool_install_magic/g' test1$(EXEEXT)
++	@gsed -i 's/$$libtool_execute_magic/$$$$libtool_execute_magic/g' test1$(EXEEXT)
++	@gsed -i 's/:$$LD_LIBRARY_PATH/:$$$$LD_LIBRARY_PATH/g' test1$(EXEEXT)
+ 
+ test2$(EXEEXT): $(test2_OBJECTS) $(test2_DEPENDENCIES) $(EXTRA_test2_DEPENDENCIES) 
+ 	@rm -f test2$(EXEEXT)
+ 	$(AM_V_CCLD)$(test2_LINK) $(test2_OBJECTS) $(test2_LDADD) $(LIBS)
++	@gsed -i 's/$$libtool_install_magic/$$$$libtool_install_magic/g' test2$(EXEEXT)
++	@gsed -i 's/$$libtool_execute_magic/$$$$libtool_execute_magic/g' test2$(EXEEXT)
++	@gsed -i 's/:$$LD_LIBRARY_PATH/:$$$$LD_LIBRARY_PATH/g' test2$(EXEEXT)
+ 
+ test3$(EXEEXT): $(test3_OBJECTS) $(test3_DEPENDENCIES) $(EXTRA_test3_DEPENDENCIES) 
+ 	@rm -f test3$(EXEEXT)
+ 	$(AM_V_CCLD)$(test3_LINK) $(test3_OBJECTS) $(test3_LDADD) $(LIBS)
++	@gsed -i 's/$$libtool_install_magic/$$$$libtool_install_magic/g' test3$(EXEEXT)
++	@gsed -i 's/$$libtool_execute_magic/$$$$libtool_execute_magic/g' test3$(EXEEXT)
++	@gsed -i 's/:$$LD_LIBRARY_PATH/:$$$$LD_LIBRARY_PATH/g' test3$(EXEEXT)
+ 
+ test4$(EXEEXT): $(test4_OBJECTS) $(test4_DEPENDENCIES) $(EXTRA_test4_DEPENDENCIES) 
+ 	@rm -f test4$(EXEEXT)
+ 	$(AM_V_CCLD)$(test4_LINK) $(test4_OBJECTS) $(test4_LDADD) $(LIBS)
++	@gsed -i 's/$$libtool_install_magic/$$$$libtool_install_magic/g' test4$(EXEEXT)
++	@gsed -i 's/$$libtool_execute_magic/$$$$libtool_execute_magic/g' test4$(EXEEXT)
++	@gsed -i 's/:$$LD_LIBRARY_PATH/:$$$$LD_LIBRARY_PATH/g' test4$(EXEEXT)
+ 
+ test5$(EXEEXT): $(test5_OBJECTS) $(test5_DEPENDENCIES) $(EXTRA_test5_DEPENDENCIES) 
+ 	@rm -f test5$(EXEEXT)
+ 	$(AM_V_CCLD)$(test5_LINK) $(test5_OBJECTS) $(test5_LDADD) $(LIBS)
++	@gsed -i 's/$$libtool_install_magic/$$$$libtool_install_magic/g' test5$(EXEEXT)
++	@gsed -i 's/$$libtool_execute_magic/$$$$libtool_execute_magic/g' test5$(EXEEXT)
++	@gsed -i 's/:$$LD_LIBRARY_PATH/:$$$$LD_LIBRARY_PATH/g' test5$(EXEEXT)
+ 
+ test6$(EXEEXT): $(test6_OBJECTS) $(test6_DEPENDENCIES) $(EXTRA_test6_DEPENDENCIES) 
+ 	@rm -f test6$(EXEEXT)
+ 	$(AM_V_CCLD)$(test6_LINK) $(test6_OBJECTS) $(test6_LDADD) $(LIBS)
++	@gsed -i 's/$$libtool_install_magic/$$$$libtool_install_magic/g' test6$(EXEEXT)
++	@gsed -i 's/$$libtool_execute_magic/$$$$libtool_execute_magic/g' test6$(EXEEXT)
++	@gsed -i 's/:$$LD_LIBRARY_PATH/:$$$$LD_LIBRARY_PATH/g' test6$(EXEEXT)
+ 
+ test7$(EXEEXT): $(test7_OBJECTS) $(test7_DEPENDENCIES) $(EXTRA_test7_DEPENDENCIES) 
+ 	@rm -f test7$(EXEEXT)
+ 	$(AM_V_CCLD)$(test7_LINK) $(test7_OBJECTS) $(test7_LDADD) $(LIBS)
++	@gsed -i 's/$$libtool_install_magic/$$$$libtool_install_magic/g' test7$(EXEEXT)
++	@gsed -i 's/$$libtool_execute_magic/$$$$libtool_execute_magic/g' test7$(EXEEXT)
++	@gsed -i 's/:$$LD_LIBRARY_PATH/:$$$$LD_LIBRARY_PATH/g' test7$(EXEEXT)
+ 
+ test8$(EXEEXT): $(test8_OBJECTS) $(test8_DEPENDENCIES) $(EXTRA_test8_DEPENDENCIES) 
+ 	@rm -f test8$(EXEEXT)
+ 	$(AM_V_CCLD)$(test8_LINK) $(test8_OBJECTS) $(test8_LDADD) $(LIBS)
++	@gsed -i 's/$$libtool_install_magic/$$$$libtool_install_magic/g' test8$(EXEEXT)
++	@gsed -i 's/$$libtool_execute_magic/$$$$libtool_execute_magic/g' test8$(EXEEXT)
++	@gsed -i 's/:$$LD_LIBRARY_PATH/:$$$$LD_LIBRARY_PATH/g' test8$(EXEEXT)
+ 
+ test9$(EXEEXT): $(test9_OBJECTS) $(test9_DEPENDENCIES) $(EXTRA_test9_DEPENDENCIES) 
+ 	@rm -f test9$(EXEEXT)
+ 	$(AM_V_CCLD)$(test9_LINK) $(test9_OBJECTS) $(test9_LDADD) $(LIBS)
++	@gsed -i 's/$$libtool_install_magic/$$$$libtool_install_magic/g' test9$(EXEEXT)
++	@gsed -i 's/$$libtool_execute_magic/$$$$libtool_execute_magic/g' test9$(EXEEXT)
++	@gsed -i 's/:$$LD_LIBRARY_PATH/:$$$$LD_LIBRARY_PATH/g' test9$(EXEEXT)
+ 
+ mostlyclean-compile:
+ 	-rm -f *.$(OBJEXT)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/libpki/patches/03-libtool.patch	Fri Apr 29 16:32:46 2016 -0700
@@ -0,0 +1,16 @@
+Patch origin: in-house
+Patch status: Solaris-specific; not suitable for upstream
+
+eval doesn't work as expected with quotes on Solaris.
+
+--- libpki-0.8.9/build/ltmain.sh	Tue Nov 10 13:50:30 2015
++++ libpki-0.8.9/build/ltmain.sh	Wed Nov 11 14:43:19 2015
[email protected]@ -657,7 +657,7 @@
+     }
+ 
+     if ${opt_dry_run-false}; then :; else
+-      eval "$my_cmd"
++      eval $my_cmd
+       my_status=$?
+       if test "$my_status" -eq 0; then :; else
+ 	eval "(exit $my_status); $my_fail_exp"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/libpki/patches/04-studio.patch	Fri Apr 29 16:32:46 2016 -0700
@@ -0,0 +1,36 @@
+Patch origin: in-house
+Patch status: Solaris-specific; not suitable for upstream
+
+Need to add a dummy variable to struct dsa because Studio doesn't allow
+zero-sized struct/union.
+
+void function cannot return value. gcc just ignores it, but Studio considers
+it as an error.
+
+--- libpki-0.8.9/src/libpki/openssl/data_st.h	2015-11-10 13:50:27.428271277 -0800
++++ libpki-0.8.9/src/libpki/openssl/data_st.h	2016-02-05 10:23:52.741804145 -0800
[email protected]@ -425,7 +425,9 @@
+ 		int exponent;
+ 	} rsa;
+ 	// DSA scheme parameters
+-	struct {} dsa;
++	struct {
++		int dummy;
++	} dsa;
+ 
+ #ifdef ENABLE_ECDSA
+ 	// EC scheme parameters
+--- libpki-0.8.9/src/pki_mem.c	2015-11-10 13:50:29.132816749 -0800
++++ libpki-0.8.9/src/pki_mem.c	2016-02-05 10:42:12.359660890 -0800
[email protected]@ -322,7 +322,10 @@
+ 	if (!pnt) return;
+ 
+ 	/* If No size is provided, normal PKI_Free() is used */
+-	if ( size <= 0 ) return PKI_Free ( pnt );
++	if ( size <= 0 ) {
++		PKI_Free ( pnt );
++		return;
++	}
+ 
+ 	/* Zeroize the Memory */
+ 	memset( pnt, '\xFF', size );
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/libpki/patches/05-tests.patch	Fri Apr 29 16:32:46 2016 -0700
@@ -0,0 +1,165 @@
+Patchin: in-house
+Patch status: Solaris-specific; not suitable for upstream
+
+Need to add sample pem files to make component tests work.
+
+--- libpki-0.8.9/src/token.c	Tue Nov 10 13:50:28 2015
++++ libpki-0.8.9/src/token.c	Wed Jan 20 14:21:10 2016
[email protected]@ -120,7 +120,7 @@
+ 	if (PKI_get_init_status() == PKI_STATUS_NOT_INIT) PKI_init_all();
+ 
+ 	// Sets the default callback for getting the credentials
+-	PKI_TOKEN_cred_set_cb(tk, PKI_TOKEN_cred_cb_stdin, NULL);
++	PKI_TOKEN_cred_set_cb(tk, PKI_TOKEN_cred_cb_env, NULL);
+ 
+ 	// Initializes the token
+ 	PKI_TOKEN_init( tk, NULL, NULL );
+--- libpki-0.8.9/etc/token.d/default.xml	Tue Nov 10 13:50:29 2015
++++ libpki-0.8.9/etc/token.d/default.xml	Wed Jan 20 14:31:35 2016
[email protected]@ -12,10 +12,10 @@
+   <!-- CA Certificate -->
+   <pki:cacert>file:///$HOME/.libpki/certs/cacert.pem</pki:cacert>
+   <!-- Certificates -->
+-  <pki:othercerts>file::///$HOME/.libpki/certs/other-certs.pem</pki:othercerts>
+-  <pki:trustedcerts>file::///$HOME/.libpki/certs/trusted-certs.pem</pki:trustedcerts>
++  <!-- <pki:othercerts>file::///$HOME/.libpki/certs/other-certs.pem</pki:othercerts> -->
++  <!-- <pki:trustedcerts>file::///$HOME/.libpki/certs/trusted-certs.pem</pki:trustedcerts> -->
+   <!-- Where the Password should be read from -->
+-  <pki:passin>stdin</pki:passin>
++  <pki:passin>env</pki:passin>
+   <!-- ... or simply specify the password here -->
+   <!-- <pki:password></pki:password> -->
+ </pki:tokenConfig>
+--- libpki-0.8.9/etc/.libpki/certs/cacert.pem	1969-12-31 16:00:00.000000000 -0800
++++ libpki-0.8.9/etc/.libpki/certs/cacert.pem	2016-01-15 15:57:07.721997458 -0800
[email protected]@ -0,0 +1,25 @@
++-----BEGIN CERTIFICATE-----
++MIIEOTCCAyGgAwIBAgIJAMvfuAXWxNmsMA0GCSqGSIb3DQEBCwUAMIGyMQswCQYD
++VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEUMBIGA1UEBwwLU2FudGEgQ2xh
++cmExHTAbBgNVBAoMFE9yYWNsZSBBbWVyaWNhLCBJbmMuMRQwEgYDVQQLDAtVc2Vy
++bGFuZCBDQTEfMB0GA1UEAwwWdXNlcmxhbmQudXMub3JhY2xlLmNvbTEiMCAGCSqG
++SIb3DQEJARYTdXNlcmxhbmRAb3JhY2xlLmNvbTAeFw0xNjAxMTEyMTM4MzdaFw0x
++NjAyMTAyMTM4MzdaMIGyMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5p
++YTEUMBIGA1UEBwwLU2FudGEgQ2xhcmExHTAbBgNVBAoMFE9yYWNsZSBBbWVyaWNh
++LCBJbmMuMRQwEgYDVQQLDAtVc2VybGFuZCBDQTEfMB0GA1UEAwwWdXNlcmxhbmQu
++dXMub3JhY2xlLmNvbTEiMCAGCSqGSIb3DQEJARYTdXNlcmxhbmRAb3JhY2xlLmNv
++bTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMzwfyDlWbVLMKqmAUhG
++KuRhjLS03DrOumIuYwI1oQvLXZz4u4wnbMc5GgViUNw04AC7geJjWYunI1U5LAG5
++dQpbrMK1xL1iDMA0vc8EHvuUFY59tzjcGY1CAYtCNok1dau8FUWBfxV9wWEW00t3
++PEGREPuz5UtUcor7KX+JJ6r9/sT7pAKj6Y0G4v77RBDLtJ6hBXEJhqZ8eahtzOv3
++DBDSlOEimkCLxvlZnk0vTgpKCRmksIp7xq4MM61JiWuKNx9oJUgrEMgk2gP8Ox09
++RX1sG3GvDwW3L8rxKxCftWXPo22GV9OB5FAiHoqi+aLaSMXxHEyAlwXX2Fs9ZV8U
++iKkCAwEAAaNQME4wHQYDVR0OBBYEFJizE+yWESOeJaEhBGEkYSlrMldCMB8GA1Ud
++IwQYMBaAFJizE+yWESOeJaEhBGEkYSlrMldCMAwGA1UdEwQFMAMBAf8wDQYJKoZI
++hvcNAQELBQADggEBAI5UFjJJtPP4tsEdzAiH8dvEBG2tuDkPRpxbVd1G8lfDFLsD
++9MgawSeM8F4e0NQg4mP7/sshp3JpZ+NJMMNZkY57UYs28FuXa7WKx05aiMaXCxOH
++IDs/H8YCfcZq7JcpX5mdiiRqCU0w3h0/1w0b38JGSQF5tj6InjkNqD+jqrYiQeTj
++MPysxoAGiEDIq0AOuYgAG0kD7WytQRj6p3uxR2eWGIE2GYr715DiBjleaZoX1YQM
++AXTPEyqtES4ma+J3mRFUNWAvQTfsBpYS4/a32H2j+5tZchJd2T3AUvNcG5p+PvZB
++Ckks3qIQUXinjtZLtO3ZpSySW3XjRUeWpW+ij+A=
++-----END CERTIFICATE-----
+--- libpki-0.8.9/etc/.libpki/certs/cert.pem	1969-12-31 16:00:00.000000000 -0800
++++ libpki-0.8.9/etc/.libpki/certs/cert.pem	2016-01-15 15:57:07.747595458 -0800
[email protected]@ -0,0 +1,72 @@
++Certificate:
++    Data:
++        Version: 1 (0x0)
++        Serial Number: 0 (0x0)
++    Signature Algorithm: sha1WithRSAEncryption
++        Issuer: C=US, ST=California, L=Santa Clara, O=Oracle America, Inc., OU=Userland CA, CN=userland.us.oracle.com/[email protected]
++        Validity
++            Not Before: Jan 11 21:40:47 2016 GMT
++            Not After : Jan 10 21:40:47 2021 GMT
++        Subject: C=US, ST=California, L=Santa Clara, O=Oracle America, Inc., OU=Userland, CN=userland.us.oracle.com/[email protected]
++        Subject Public Key Info:
++            Public Key Algorithm: rsaEncryption
++                Public-Key: (2048 bit)
++                Modulus:
++                    00:f1:dc:ab:d3:72:2d:8f:7b:71:7d:15:46:32:8a:
++                    da:97:db:91:70:ce:37:a8:18:dd:1f:aa:5d:83:c0:
++                    bc:44:23:fb:b0:da:2c:14:e8:b0:56:05:ef:98:22:
++                    54:28:a0:53:c4:24:7a:1c:d3:23:97:8d:8f:ea:ee:
++                    ff:6b:d4:b8:65:0f:33:28:35:3c:71:9c:6c:e5:bf:
++                    03:87:5c:51:5e:5a:23:da:24:8e:6d:92:56:c7:93:
++                    d5:73:54:42:aa:59:23:8b:ce:87:ea:bb:5a:06:c4:
++                    ac:ce:6a:44:ba:b7:14:6b:f6:88:49:8d:3f:d5:b7:
++                    ab:4f:2a:8a:32:15:4a:87:78:e6:d4:18:49:b0:6c:
++                    c3:29:25:ab:15:82:b1:e0:59:ef:d7:ef:c2:5e:e3:
++                    b7:bb:63:c3:d4:f1:c8:fe:8e:eb:fd:5c:6c:63:7d:
++                    17:88:62:24:86:5d:cb:ad:93:e2:fb:4d:02:c3:15:
++                    49:43:d0:15:5d:21:63:9b:d1:49:41:f6:b5:52:c9:
++                    5e:3b:42:61:53:dd:20:6c:9e:4b:4e:ab:c2:e1:15:
++                    30:12:ad:73:f1:42:ad:4e:84:10:ec:29:4d:55:69:
++                    ee:32:88:8b:81:50:09:d5:dc:9b:90:87:cb:42:8d:
++                    5b:1f:94:e7:10:be:81:1a:13:2a:92:df:8d:2d:78:
++                    5e:89
++                Exponent: 65537 (0x10001)
++    Signature Algorithm: sha1WithRSAEncryption
++         91:5d:fb:3e:f8:4d:45:98:18:68:d1:12:a0:34:93:30:ce:80:
++         fa:13:43:bb:65:90:07:6c:e1:c1:7b:b8:30:72:81:02:e9:a1:
++         ae:1f:3a:f4:72:20:bc:9a:90:84:5e:0e:1f:db:15:aa:90:cc:
++         0a:ad:7b:08:0e:88:99:3d:93:31:f5:8f:d2:3f:bf:12:2a:45:
++         96:ad:48:e6:2f:37:93:1d:ae:95:61:a2:01:ec:5d:ae:43:b4:
++         7e:b7:02:92:6e:98:0f:94:9c:68:e5:f8:b4:ea:89:5a:55:fb:
++         46:81:0c:1d:2a:74:95:95:ba:ad:6a:a4:08:40:2e:8d:e1:39:
++         4c:74:c4:3c:39:68:18:93:da:2e:f1:ea:6e:96:8c:54:9f:33:
++         58:76:2a:d9:a9:25:fc:87:03:f2:d8:e1:91:17:fe:55:8e:9a:
++         c0:dd:d2:98:02:ae:65:b3:79:a6:98:f3:01:4c:d7:d1:f1:00:
++         17:20:5c:04:48:77:5d:84:c0:bc:99:7a:4e:7a:0f:31:1b:b9:
++         be:c4:4b:5b:b1:e5:3d:8b:34:f1:5a:c0:97:c7:b6:be:70:dc:
++         74:03:fe:be:96:2d:be:0c:0e:0b:5b:67:d4:1d:21:cf:21:1d:
++         67:b5:b6:4a:50:1e:bd:d1:f6:00:87:c3:cb:98:9f:6c:3a:d4:
++         f3:a2:ee:d1
++-----BEGIN CERTIFICATE-----
++MIID1zCCAr8CAQAwDQYJKoZIhvcNAQEFBQAwgbIxCzAJBgNVBAYTAlVTMRMwEQYD
++VQQIDApDYWxpZm9ybmlhMRQwEgYDVQQHDAtTYW50YSBDbGFyYTEdMBsGA1UECgwU
++T3JhY2xlIEFtZXJpY2EsIEluYy4xFDASBgNVBAsMC1VzZXJsYW5kIENBMR8wHQYD
++VQQDDBZ1c2VybGFuZC51cy5vcmFjbGUuY29tMSIwIAYJKoZIhvcNAQkBFhN1c2Vy
++bGFuZEBvcmFjbGUuY29tMB4XDTE2MDExMTIxNDA0N1oXDTIxMDExMDIxNDA0N1ow
++ga8xCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRQwEgYDVQQHDAtT
++YW50YSBDbGFyYTEdMBsGA1UECgwUT3JhY2xlIEFtZXJpY2EsIEluYy4xETAPBgNV
++BAsMCFVzZXJsYW5kMR8wHQYDVQQDDBZ1c2VybGFuZC51cy5vcmFjbGUuY29tMSIw
++IAYJKoZIhvcNAQkBFhN1c2VybGFuZEBvcmFjbGUuY29tMIIBIjANBgkqhkiG9w0B
++AQEFAAOCAQ8AMIIBCgKCAQEA8dyr03Itj3txfRVGMoral9uRcM43qBjdH6pdg8C8
++RCP7sNosFOiwVgXvmCJUKKBTxCR6HNMjl42P6u7/a9S4ZQ8zKDU8cZxs5b8Dh1xR
++Xloj2iSObZJWx5PVc1RCqlkji86H6rtaBsSszmpEurcUa/aISY0/1berTyqKMhVK
++h3jm1BhJsGzDKSWrFYKx4Fnv1+/CXuO3u2PD1PHI/o7r/VxsY30XiGIkhl3LrZPi
+++00CwxVJQ9AVXSFjm9FJQfa1UsleO0JhU90gbJ5LTqvC4RUwEq1z8UKtToQQ7ClN
++VWnuMoiLgVAJ1dybkIfLQo1bH5TnEL6BGhMqkt+NLXheiQIDAQABMA0GCSqGSIb3
++DQEBBQUAA4IBAQCRXfs++E1FmBho0RKgNJMwzoD6E0O7ZZAHbOHBe7gwcoEC6aGu
++Hzr0ciC8mpCEXg4f2xWqkMwKrXsIDoiZPZMx9Y/SP78SKkWWrUjmLzeTHa6VYaIB
++7F2uQ7R+twKSbpgPlJxo5fi06olaVftGgQwdKnSVlbqtaqQIQC6N4TlMdMQ8OWgY
++k9ou8epuloxUnzNYdirZqSX8hwPy2OGRF/5VjprA3dKYAq5ls3mmmPMBTNfR8QAX
++IFwESHddhMC8mXpOeg8xG7m+xEtbseU9izTxWsCXx7a+cNx0A/6+li2+DA4LW2fU
++HSHPIR1ntbZKUB690fYAh8PLmJ9sOtTzou7R
++-----END CERTIFICATE-----
+--- libpki-0.8.9/etc/.libpki/private/key.pem	1969-12-31 16:00:00.000000000 -0800
++++ libpki-0.8.9/etc/.libpki/private/key.pem	2016-01-15 15:57:07.794138570 -0800
[email protected]@ -0,0 +1,27 @@
++-----BEGIN RSA PRIVATE KEY-----
++MIIEpgIBAAKCAQEA8dyr03Itj3txfRVGMoral9uRcM43qBjdH6pdg8C8RCP7sNos
++FOiwVgXvmCJUKKBTxCR6HNMjl42P6u7/a9S4ZQ8zKDU8cZxs5b8Dh1xRXloj2iSO
++bZJWx5PVc1RCqlkji86H6rtaBsSszmpEurcUa/aISY0/1berTyqKMhVKh3jm1BhJ
++sGzDKSWrFYKx4Fnv1+/CXuO3u2PD1PHI/o7r/VxsY30XiGIkhl3LrZPi+00CwxVJ
++Q9AVXSFjm9FJQfa1UsleO0JhU90gbJ5LTqvC4RUwEq1z8UKtToQQ7ClNVWnuMoiL
++gVAJ1dybkIfLQo1bH5TnEL6BGhMqkt+NLXheiQIDAQABAoIBAQCjCZBCfws7V4lP
++OlIRrAxipb5K/pgCFpCo0d0r/XZrsJ3vv4JLrfeAZYv3T9zPbhRJehVe7O1nMiQ7
++yFQhyklqxm5Dwm82Xq4ByVuFmbO4GKdmW5IvRqB89KjEj55I2sHdcqGomBa9zUJ3
+++qbN/rAjfxKsEi1f0eoG+bQiwrt0ybmqshFeW3c9c6HVZBT9nC1v/+Z6Wz0Na0E+
++eixIrZww3sxz/fsc5iUGehCB7z+poVvdHLVgsZ9fh3UEZfua9AqlHIfQujx/rtVw
++flk99rWjjYWozFN65dyXhSKYDIXhMg/61L6iFUdsu1pYNt9lf6FrBKDwhcPGLWDe
++sN20G2oBAoGBAP9JUnX9JKEkRkY0cTVNynMBfFH69kmG5ZNZuJmqZNMLLH2m+C7P
++GptHH5WbY+glDFPEqM3tlxUnB/yUrCMRm9EsCf3GKoEL516FZkVQ1dyFKpcYkNv2
++biYfhAhWG+DxV2jAC1qkcr69fE2fIUrRnBo3sJPSDlsBsOaU/phEDuwhAoGBAPKJ
++vip62Qbh+7YXoc7k9HXw4PfqjXAx01hT2IBDxwx5FUHrzT6D+9WGgBpxFV9quyz6
++936npQC270WDEMxLo4NiVXd9b/ji0o2+K43+BXEzEX8VkTeMWfveu6Szfq0bskaC
++3FrtgebMwBXUR9Od4WTRX45s+O3UI2jnX52mIOVpAoGBAJpP+P+HUF/zrGL9ijz9
++U9Xm3P41JDDX0OgcAOEqRZ3okDE3/6dT2zJncKkfb+nAk04Df0JTTtMjb8l3GQJt
++v3FWHIgBBGpTBr11B5f4v/13pYIGAHJl6Lk0rbvYSSvU1tBj3bkh1JaFtaC6AwbV
++43VZmmwQOks6n3MSNz9VTGvhAoGBAMFF9M2jQckTUmPEJ0RY/VnzD0NgnT9X5URQ
++5Ikp+be90avLfa4gvRFl8jWgAdkck3X/tDQw4fNU1A1/qWYzrGSpetQSmKUsE3+y
++mMC5OZsAiCPOiv9KD/b/gmZ4Ry0pkgJQi8rF06uZZETA+k/vU0rk8hHsUt4rG+Cf
++6HkXhsVpAoGBAOYLL5vjqV1DyX4smWk4SHnZS27E0fT8yCCMh0ZGRv9AZNTixs9f
++jZ8YI74uVd6WzrR720H/VLCqSQk7hqzZXGF589xlDENQoMxrdNy7oDYblVjv8/Rk
++T5YG6xxJnnCfM30waRWG3fatt6+c+Hy2SfVDpiJnP2+pbMzxgqnznhIq
++-----END RSA PRIVATE KEY-----
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/libpki/test/results-64.master	Fri Apr 29 16:32:46 2016 -0700
@@ -0,0 +1,7 @@
+# TOTAL: 7
+# PASS:  7
+# SKIP:  0
+# XFAIL: 0
+# FAIL:  0
+# XPASS: 0
+# ERROR: 0