components/openssl/openssl-fips/Makefile
author Norm Jacobs <Norm.Jacobs@Sun.COM>
Sun, 15 Feb 2015 19:02:09 -0600
changeset 3817 30b42c38bbc4
parent 2225 f064d3d3190d
child 4252 891a844655c4
permissions -rw-r--r--
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
363
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
     1
#
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
     2
# CDDL HEADER START
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
     3
#
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
     7
#
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    11
# and limitations under the License.
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    12
#
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    18
#
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    19
# CDDL HEADER END
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    20
#
3817
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 2225
diff changeset
    21
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
363
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    22
#
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    23
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    24
#
1596
59869c4257d0 PSARC/2013/383 OpenSSL FIPS 140-2 version update
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 1587
diff changeset
    25
# This component is not to be installed. It is used to build FIPS-140
59869c4257d0 PSARC/2013/383 OpenSSL FIPS 140-2 version update
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 1587
diff changeset
    26
# certified OpenSSL libraries.
363
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    27
#
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    28
364
73fbb345104d 7039910 move OpenSSL from SFW to Userland gate (fix path/make args)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 363
diff changeset
    29
include ../../../make-rules/shared-macros.mk
363
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    30
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    31
COMPONENT_NAME =	openssl-fips
2037
3559e1505b2b 19314980 Update the OpenSSL FIPS-140 module version to 2.0.6
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 1969
diff changeset
    32
COMPONENT_VERSION =	2.0.6
1596
59869c4257d0 PSARC/2013/383 OpenSSL FIPS 140-2 version update
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 1587
diff changeset
    33
COMPONENT_SRC =		$(COMPONENT_NAME)-ecp-$(COMPONENT_VERSION)
363
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    34
COMPONENT_ARCHIVE =	$(COMPONENT_SRC).tar.gz
800
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    35
COMPONENT_ARCHIVE_HASH=	\
2037
3559e1505b2b 19314980 Update the OpenSSL FIPS-140 module version to 2.0.6
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 1969
diff changeset
    36
    sha256:861b431c625c27daf440041fd67c0866ebb84b44cc672cf1ea8f23e883518897
363
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    37
COMPONENT_ARCHIVE_URL =	http://www.openssl.org/source/$(COMPONENT_ARCHIVE)
1969
ac6c35e6af98 19005730 COMPONENT_BUGDB needs to be updated in components/openssl/*/Makefile
jenny.yung@oracle.com <jenny.yung@oracle.com>
parents: 1940
diff changeset
    38
COMPONENT_BUGDB=	library/openssl
363
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    39
3817
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 2225
diff changeset
    40
include $(WS_MAKE_RULES)/prep.mk
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 2225
diff changeset
    41
include $(WS_MAKE_RULES)/configure.mk
363
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    42
678
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 648
diff changeset
    43
PATH=$(SPRO_VROOT)/bin:/usr/bin:/usr/gnu/bin:/usr/perl5/bin
365
f10c11e3a4a5 7039910 move OpenSSL from SFW to Userland gate (fix fips path and make targets)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 364
diff changeset
    44
363
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    45
# In order to build a 32bit version on a 64bit system the isalist(1) command
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    46
# must be substituted for the 32bit build so that amd64|sparcv9 is not part of
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    47
# its output. isalist is used internally when configuring the canister before
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    48
# building it. In order to allow make install to be run as a no-op we have to
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    49
# fake "make install" since we do not want to install the files anywhere. The
1596
59869c4257d0 PSARC/2013/383 OpenSSL FIPS 140-2 version update
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 1587
diff changeset
    50
# command sets U1 and U2 are defined in the FIPS 2.0.5 security policy and must be
363
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    51
# run as shown there. Nothing from the tarball can be modified. We use the U2
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    52
# command set, see below.
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    53
FAKE_ISALIST = 32/isalist
678
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 648
diff changeset
    54
FAKE_MAKE = fips-gmake
363
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    55
FAKE_CC = cc
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    56
FAKE_APPS = $(FAKE_ISALIST) $(FAKE_MAKE) $(FAKE_CC)
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    57
774
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 758
diff changeset
    58
CLOBBER_PATHS += $(FAKE_APPS)
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 758
diff changeset
    59
363
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    60
# Do not use $(PWD), it would not work if run from a different directory with
1596
59869c4257d0 PSARC/2013/383 OpenSSL FIPS 140-2 version update
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 1587
diff changeset
    61
# "gmake -C" as we do from openssl-1.0.1
758
8d61ac17827e 7156914 openssl-fips fails to build if gcc-45 is installed
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 678
diff changeset
    62
# we'll also pick up gcc if we find it in the path, so force it to
8d61ac17827e 7156914 openssl-fips fails to build if gcc-45 is installed
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 678
diff changeset
    63
# find one that doesn't work like it wants
8d61ac17827e 7156914 openssl-fips fails to build if gcc-45 is installed
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 678
diff changeset
    64
FIPS_PATH_32 = $(COMPONENT_DIR)/32:$(COMPONENT_DIR)/gcc:$(PATH)
8d61ac17827e 7156914 openssl-fips fails to build if gcc-45 is installed
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 678
diff changeset
    65
FIPS_PATH_64 = $(COMPONENT_DIR)/gcc:$(PATH)
363
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    66
2037
3559e1505b2b 19314980 Update the OpenSSL FIPS-140 module version to 2.0.6
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 1969
diff changeset
    67
# HMAC-SHA-1 digest of the OpenSSL FIPS tar file is used for the
3559e1505b2b 19314980 Update the OpenSSL FIPS-140 module version to 2.0.6
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 1969
diff changeset
    68
# integrity test requirement for the FIPS-140 validation.
3559e1505b2b 19314980 Update the OpenSSL FIPS-140 module version to 2.0.6
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 1969
diff changeset
    69
# Note: COMPONENT_ARCHIVE_HASH is a SHA256 digest used by the Userland
3559e1505b2b 19314980 Update the OpenSSL FIPS-140 module version to 2.0.6
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 1969
diff changeset
    70
# Consolidation to check the file integrity.
363
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    71
OPENSSL_FIPS_HMAC_KEY = etaonrishdlcupfm
2037
3559e1505b2b 19314980 Update the OpenSSL FIPS-140 module version to 2.0.6
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 1969
diff changeset
    72
OPENSSL_FIPS_HMAC = 852f43cd9ae1bd2eba60e4f9f1f266d3c16c0319
363
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    73
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    74
# There is a broken link in the tarball which causes cp(1) to fail which would
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    75
# fail the whole configure process. It's safer to get rid of the link than
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    76
# adding "true" at the end of COMPONENT_PRE_CONFIGURE_ACTION since that could
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    77
# hide real issues.
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    78
COMPONENT_PRE_CONFIGURE_ACTION = ( cd $(@D); \
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    79
    $(RM) $(SOURCE_DIR)/test/fips_aes_data; $(CP) -r $(SOURCE_DIR)/* .; )
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    80
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    81
# There is a specific way that must be followed to build the FIPS-140 canister.
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    82
# It is "./config fipscanisterbuild; make; make install" and is called a command
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    83
# set "U2" in the OpenSSL FIPS-140 User Guide.
1596
59869c4257d0 PSARC/2013/383 OpenSSL FIPS 140-2 version update
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 1587
diff changeset
    84
ifeq ($(MACH), sparc)
59869c4257d0 PSARC/2013/383 OpenSSL FIPS 140-2 version update
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 1587
diff changeset
    85
CONFIGURE_SCRIPT_32 = config
59869c4257d0 PSARC/2013/383 OpenSSL FIPS 140-2 version update
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 1587
diff changeset
    86
# For 64-bit, use './Configure fipscanisterbuild solaris64-sparcv9-cc'.
59869c4257d0 PSARC/2013/383 OpenSSL FIPS 140-2 version update
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 1587
diff changeset
    87
CONFIGURE_SCRIPT_64 = ./Configure
59869c4257d0 PSARC/2013/383 OpenSSL FIPS 140-2 version update
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 1587
diff changeset
    88
CONFIGURE_OPTIONS.64 = solaris64-sparcv9-cc
59869c4257d0 PSARC/2013/383 OpenSSL FIPS 140-2 version update
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 1587
diff changeset
    89
CONFIGURE_SCRIPT = $(CONFIGURE_SCRIPT_$(BITS))
59869c4257d0 PSARC/2013/383 OpenSSL FIPS 140-2 version update
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 1587
diff changeset
    90
else
363
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    91
CONFIGURE_SCRIPT = config
1596
59869c4257d0 PSARC/2013/383 OpenSSL FIPS 140-2 version update
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 1587
diff changeset
    92
endif
59869c4257d0 PSARC/2013/383 OpenSSL FIPS 140-2 version update
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 1587
diff changeset
    93
363
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    94
CONFIGURE_OPTIONS = fipscanisterbuild
1596
59869c4257d0 PSARC/2013/383 OpenSSL FIPS 140-2 version update
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 1587
diff changeset
    95
CONFIGURE_OPTIONS += $(CONFIGURE_OPTIONS.$(BITS))
363
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    96
COMPONENT_BUILD_ARGS =
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    97
COMPONENT_BUILD_TARGETS =
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    98
COMPONENT_INSTALL_ARGS =
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    99
COMPONENT_INSTALL_TARGETS = install
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
   100
CONFIGURE_ENV += FIPS_SITE_LD=$(LD) PATH=$(FIPS_PATH_$(BITS))
678
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 648
diff changeset
   101
# Add COMPONENT_DIR to PATH so cc wrapper can be found.
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 648
diff changeset
   102
COMPONENT_BUILD_ENV += FIPS_SITE_LD=$(LD) REALCC=$(CC) MYMAKE=$(MAKE) PATH=$(COMPONENT_DIR):$(PATH)
363
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
   103
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
   104
$(BUILD_32_and_64): $(FAKE_APPS)
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
   105
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
   106
# You should not use this target with this component unless testing or
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
   107
# debugging. The OpenSSL FIPS-140 policy is strict and full U2 command set
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
   108
# should be run. See above for more information.
2225
f064d3d3190d 20078677 Userland Makefiles should support a configure: target
John Beck <John.Beck@Oracle.COM>
parents: 2037
diff changeset
   109
configure:	$(CONFIGURE_32_and_64)
f064d3d3190d 20078677 Userland Makefiles should support a configure: target
John Beck <John.Beck@Oracle.COM>
parents: 2037
diff changeset
   110
363
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
   111
build:		$(BUILD_32_and_64)
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
   112
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
   113
# We must make the "install" target a no-op (but must run it to be compliant).
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
   114
# See above for more information.
678
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 648
diff changeset
   115
install:	GMAKE = $(COMPONENT_DIR)/fips-gmake
363
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
   116
install:	$(BUILD_DIR_32)/.verified $(BUILD_DIR_64)/.verified
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
   117
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
   118
# This is a recommended set of commands to verify that the FIPS-140 mode can be
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
   119
# used and that we used the correct tarball.
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
   120
$(BUILD_DIR)/%/.verified:	$(BUILD_DIR)/%/.installed
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
   121
	(printf x; \
1940
9b35341f1085 18908406 Checksum of OpenSSL FIPS tar ball should be checked with FIPS validated openssl
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 1596
diff changeset
   122
	$(ENV) - OPENSSL_FIPS=1 LD_LIBRARY_PATH=$(@D) \
9b35341f1085 18908406 Checksum of OpenSSL FIPS tar ball should be checked with FIPS validated openssl
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 1596
diff changeset
   123
	/lib/openssl/fips-140/openssl sha1 -hmac $(OPENSSL_FIPS_HMAC_KEY) \
363
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
   124
	    $(COMPONENT_ARCHIVE)) | \
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
   125
	    $(NAWK) '{ if ($$2 != "$(OPENSSL_FIPS_HMAC)") exit 1 }'
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
   126
	@echo Basic FIPS-140 mode verification passed.
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
   127
	$(TOUCH) $@	    	
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
   128
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
   129
test:		$(NO_TESTS)
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
   130