author | Ivo Raisr <ivo.raisr@oracle.com> |
Wed, 14 Sep 2016 07:52:16 -0700 | |
changeset 6997 | a189d9fb566c |
parent 6401 | 8e624b116c1d |
child 6998 | ecb236c14ed7 |
permissions | -rw-r--r-- |
6401
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
1 |
# |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
2 |
# CDDL HEADER START |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
3 |
# |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
4 |
# The contents of this file are subject to the terms of the |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
5 |
# Common Development and Distribution License (the "License"). |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
6 |
# You may not use this file except in compliance with the License. |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
7 |
# |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
8 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
9 |
# or http://www.opensolaris.org/os/licensing. |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
10 |
# See the License for the specific language governing permissions |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
11 |
# and limitations under the License. |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
12 |
# |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
13 |
# When distributing Covered Code, include this CDDL HEADER in each |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
14 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
15 |
# If applicable, add the following below this CDDL HEADER, with the |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
16 |
# fields enclosed by brackets "[]" replaced with your own identifying |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
17 |
# information: Portions Copyright [yyyy] [name of copyright owner] |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
18 |
# |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
19 |
# CDDL HEADER END |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
20 |
|
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
21 |
# |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
22 |
# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
23 |
# |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
24 |
|
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
25 |
# TESTING: |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
26 |
# Requires physical card reader attached to USB with card inserted. |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
27 |
# SCM Microsystems, model SCR3310 is what was used in-house to test. |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
28 |
# The pkcs11_coolkey package, once built needs to be installed on |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
29 |
# the system building and running the test. |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
30 |
# |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
31 |
# To build the test: |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
32 |
# $ cd components/coolkey/test |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
33 |
# $ gmake build-test |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
34 |
# |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
35 |
# To run the test, as root: |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
36 |
# # cd components/coolkey/test |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
37 |
# # ./testcoolkey> testoutput.log |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
38 |
# enter PIN at prompt and press <enter> |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
39 |
# |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
40 |
# If the last line of output says: |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
41 |
# Testing libcoolkey... DONE. Status = 0 |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
42 |
# then you have a finished test and results. |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
43 |
# Search for "failed" in testoutput.log to see the actual failures, then |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
44 |
# review any failed messages to determine if the test ran successfully or not. |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
45 |
|
6997
a189d9fb566c
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Ivo Raisr <ivo.raisr@oracle.com>
parents:
6401
diff
changeset
|
46 |
BUILD_BITS= 64_and_32 |
6401
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
47 |
include ../../make-rules/shared-macros.mk |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
48 |
|
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
49 |
COMPONENT_NAME= coolkey |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
50 |
COMPONENT_VERSION= 1.1.0 |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
51 |
COMPONENT_PROJECT_URL= http://pki.fedoraproject.org/wiki/CoolKey |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
52 |
COMPONENT_DOWNLOAD_URL= http://pkgs.fedoraproject.org/repo/pkgs/$(COMPONENT_NAME)/$(COMPONENT_NAME)-$(COMPONENT_VERSION).tar.gz/815a1811a46bf9b8782107c073149cbe |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
53 |
COMPONENT_ARCHIVE_HASH= sha256:8448e3abb81bffc593c96b577dcfbc05b40e8684188456c31be15fae73d730f7 |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
54 |
COMPONENT_ARCHIVE_URL= $(COMPONENT_DOWNLOAD_URL)/$(COMPONENT_ARCHIVE) |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
55 |
COMPONENT_BUGDB= library/smartcard |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
56 |
|
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
57 |
TPNO = 25487 |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
58 |
|
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
59 |
include $(WS_MAKE_RULES)/common.mk |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
60 |
|
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
61 |
# configuration related patch needs aclocal to be regenerated |
6997
a189d9fb566c
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Ivo Raisr <ivo.raisr@oracle.com>
parents:
6401
diff
changeset
|
62 |
COMPONENT_PREP_ACTION += (cd $(@D); autoconf); |
6401
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
63 |
|
6997
a189d9fb566c
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Ivo Raisr <ivo.raisr@oracle.com>
parents:
6401
diff
changeset
|
64 |
# Do not add the SUNWspro area to the RUNPATH. Follow exactly what CC does. |
a189d9fb566c
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Ivo Raisr <ivo.raisr@oracle.com>
parents:
6401
diff
changeset
|
65 |
LD_UNSET.32.i386 = -R$(SPRO_VROOT)/lib |
a189d9fb566c
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Ivo Raisr <ivo.raisr@oracle.com>
parents:
6401
diff
changeset
|
66 |
LD_UNSET.32.sparc = -R$(SPRO_VROOT)/lib/$(MACH):$(SPRO_VROOT)/lib |
a189d9fb566c
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Ivo Raisr <ivo.raisr@oracle.com>
parents:
6401
diff
changeset
|
67 |
LD_UNSET.32 = $(LD_UNSET.32.$(MACH)) |
a189d9fb566c
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Ivo Raisr <ivo.raisr@oracle.com>
parents:
6401
diff
changeset
|
68 |
LD_UNSET.64 = -R$(SPRO_VROOT)/lib/$(MACH64) |
a189d9fb566c
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Ivo Raisr <ivo.raisr@oracle.com>
parents:
6401
diff
changeset
|
69 |
LD_UNSET += $(LD_UNSET.$(BITS)) |
a189d9fb566c
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Ivo Raisr <ivo.raisr@oracle.com>
parents:
6401
diff
changeset
|
70 |
COMPONENT_BUILD_ENV += LD_UNSET="$(LD_UNSET)" |
a189d9fb566c
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Ivo Raisr <ivo.raisr@oracle.com>
parents:
6401
diff
changeset
|
71 |
COMPONENT_INSTALL_ENV += LD_UNSET="$(LD_UNSET)" |
a189d9fb566c
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Ivo Raisr <ivo.raisr@oracle.com>
parents:
6401
diff
changeset
|
72 |
|
a189d9fb566c
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Ivo Raisr <ivo.raisr@oracle.com>
parents:
6401
diff
changeset
|
73 |
# Propagate correct LDFLAGS to the linking phase. |
a189d9fb566c
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Ivo Raisr <ivo.raisr@oracle.com>
parents:
6401
diff
changeset
|
74 |
LDFLAGS += $(CC_BITS) |
a189d9fb566c
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Ivo Raisr <ivo.raisr@oracle.com>
parents:
6401
diff
changeset
|
75 |
COMPONENT_BUILD_ARGS += LDFLAGS="$(LDFLAGS)" |
a189d9fb566c
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Ivo Raisr <ivo.raisr@oracle.com>
parents:
6401
diff
changeset
|
76 |
COMPONENT_INSTALL_ARGS += LDFLAGS="$(LDFLAGS)" |
6401
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
77 |
|
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
78 |
# requires PC/SC headers and library |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
79 |
CONFIGURE_ENV += PCSC_CFLAGS="-I$(USRINCDIR)/PCSC" |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
80 |
CONFIGURE_ENV += PCSC_LIBS="-lpcsclite" |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
81 |
|
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
82 |
# no dependency information exists the first time this package is built |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
83 |
CONFIGURE_OPTIONS += --disable-dependency-tracking |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
84 |
|
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
85 |
# required packages |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
86 |
REQUIRED_PACKAGES += library/security/pcsc/pcsclite |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
87 |
REQUIRED_PACKAGES += library/zlib |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
88 |
REQUIRED_PACKAGES += system/library/c++-runtime |