summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorAnthony Scarpino <Anthony.Scarpino@Sun.COM>2008-11-14 13:57:26 -0800
committerAnthony Scarpino <Anthony.Scarpino@Sun.COM>2008-11-14 13:57:26 -0800
commit71269a2275bf5a143dad6461eee2710a344e7261 (patch)
tree35560c9f83b6a7ffcf7164d8d8c26b955e69065e /usr/src
parentafdda45f890ee5dfc86e5131a30b11b354d51633 (diff)
downloadillumos-joyent-71269a2275bf5a143dad6461eee2710a344e7261.tar.gz
PSARC/2006/684 libsoftcrypto
4911870 pkcs11_softtoken crypto should be factored out into a new library to support $PLATFORM & $HWCAP
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/Makefile.psm3
-rw-r--r--usr/src/common/crypto/aes/aes_impl.c8
-rw-r--r--usr/src/common/crypto/arcfour/sun4v/arcfour_crypt.c15
-rw-r--r--usr/src/lib/pkcs11/Makefile6
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/Makefile55
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/Makefile.com165
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/amd64/Makefile77
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/common/llib-lsoftcrypto39
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/common/mapfile-vers73
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/i386/Makefile37
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/i386_hwcap1/Makefile58
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/sparc/Makefile38
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/sparcv9/Makefile39
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/sun4u/Makefile46
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/sun4u/Makefile.com67
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/sun4u/Makefile.links62
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/sun4u/mapfile-vers49
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/sun4u/sparc/Makefile41
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/sun4u/sparcv9/Makefile41
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/sun4v/Makefile47
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/sun4v/Makefile.com58
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/sun4v/Makefile.links41
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/sun4v/mapfile-vers33
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/sun4v/sparc/Makefile37
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/sun4v/sparcv9/Makefile37
-rw-r--r--usr/src/lib/pkcs11/pkcs11_softtoken/Makefile.com98
-rw-r--r--usr/src/lib/pkcs11/pkcs11_softtoken/amd64/Makefile47
-rw-r--r--usr/src/lib/pkcs11/pkcs11_softtoken/i386/Makefile24
-rw-r--r--usr/src/lib/pkcs11/pkcs11_softtoken/sparc/Makefile30
-rw-r--r--usr/src/lib/pkcs11/pkcs11_softtoken/sparcv9/Makefile31
-rw-r--r--usr/src/pkgdefs/SUNWcsl/prototype_com2
-rw-r--r--usr/src/pkgdefs/SUNWcsl/prototype_i3864
-rw-r--r--usr/src/pkgdefs/SUNWcsl/prototype_sparc2
-rw-r--r--usr/src/pkgdefs/SUNWkvm.u/prototype_com106
-rw-r--r--usr/src/pkgdefs/SUNWkvmt200.v/prototype_com42
-rw-r--r--usr/src/pkgdefs/etc/exception_list_i3863
-rw-r--r--usr/src/pkgdefs/etc/exception_list_sparc3
37 files changed, 1327 insertions, 237 deletions
diff --git a/usr/src/Makefile.psm b/usr/src/Makefile.psm
index ec70b29aa0..839634463b 100644
--- a/usr/src/Makefile.psm
+++ b/usr/src/Makefile.psm
@@ -22,8 +22,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
# usr/src/Makefile.psm
#
# Makefile.psm, global definitions for platform specific modules
@@ -203,6 +201,7 @@ USR_PSM_SBIN_PROG= $(PROG:%=$(USR_PSM_SBIN_DIR)/%)
ROOT_PSM_LIBS= $(LIBS:%=$(ROOT_PSM_LIB_DIR)/%)
USR_PSM_LIBS= $(LIBS:%=$(USR_PSM_LIB_DIR)/%)
+USR_PSM_LIBS64= $(LIBS:%=$(USR_PSM_LIB64_DIR)/%)
$(ROOT_PSM_LIB_DIR)/$(DYNLIB) := FILEMODE= 755
$(ROOT_PSM_LIB64_DIR)/$(DYNLIB) := FILEMODE= 755
$(USR_PSM_LIB_DIR)/$(DYNLIB) := FILEMODE= 755
diff --git a/usr/src/common/crypto/aes/aes_impl.c b/usr/src/common/crypto/aes/aes_impl.c
index 1c34641229..fa6fe88050 100644
--- a/usr/src/common/crypto/aes/aes_impl.c
+++ b/usr/src/common/crypto/aes/aes_impl.c
@@ -101,7 +101,8 @@ extern int rijndael_key_setup_dec(uint32_t rk[], const uint32_t cipherKey[],
#define AES_BYTE_SWAP
#endif
-#ifndef __amd64
+
+#if !defined(__amd64)
/*
* Constant tables
*/
@@ -122,6 +123,8 @@ extern int rijndael_key_setup_dec(uint32_t rk[], const uint32_t cipherKey[],
/* Encrypt Sbox constants (for the substitute bytes operation) */
+#ifndef sun4u
+
static const uint32_t Te0[256] =
{
0xc66363a5U, 0xf87c7c84U, 0xee777799U, 0xf67b7b8dU,
@@ -397,6 +400,7 @@ static const uint32_t Te3[256] =
0xb0b0cb7bU, 0x5454fca8U, 0xbbbbd66dU, 0x16163a2cU
};
+#endif /* !sun4u */
static const uint32_t Te4[256] =
{
0x63636363U, 0x7c7c7c7cU, 0x77777777U, 0x7b7b7b7bU,
@@ -739,6 +743,7 @@ static const uint32_t Td3[256] =
0xcb84617bU, 0x32b670d5U, 0x6c5c7448U, 0xb85742d0U
};
+#ifndef sun4u
static const uint32_t Td4[256] =
{
@@ -808,6 +813,7 @@ static const uint32_t Td4[256] =
0x55555555U, 0x21212121U, 0x0c0c0c0cU, 0x7d7d7d7dU
};
+#endif /* !sun4u */
/* Rcon is Round Constant; used for encryption key expansion */
static const uint32_t rcon[RC_LENGTH] =
{
diff --git a/usr/src/common/crypto/arcfour/sun4v/arcfour_crypt.c b/usr/src/common/crypto/arcfour/sun4v/arcfour_crypt.c
index bc0ba123d8..b752d62646 100644
--- a/usr/src/common/crypto/arcfour/sun4v/arcfour_crypt.c
+++ b/usr/src/common/crypto/arcfour/sun4v/arcfour_crypt.c
@@ -23,8 +23,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include "../arcfour.h"
/* Initialize the key stream 'key' using the key value */
@@ -67,10 +65,10 @@ arcfour_key_init(ARCFour_key *key, uchar_t *keyval, int keyvallen)
void
arcfour_crypt(ARCFour_key *key, uchar_t *in, uchar_t *out, size_t len)
{
- size_t ii, it;
- unsigned long long in0, out0, merge = 0, merge0 = 0, merge1, mask = 0;
+ size_t ii;
+ unsigned long long in0, merge = 0, merge0 = 0, merge1, mask = 0;
uchar_t i, j, *base, jj, *base1, tmp;
- unsigned int tmp0, tmp1, i_accum, count = 0, shift = 0, i1;
+ unsigned int tmp0, tmp1, i_accum, shift = 0, i1;
/* EXPORT DELETE START */
@@ -253,6 +251,7 @@ arcfour_crypt(ARCFour_key *key, uchar_t *in, uchar_t *out, size_t len)
* Speculation suceeded! Update [i]
* in 2B chunk
*/
+ /* LINTED E_BAD_PTR_CAST_ALIGN */
*((unsigned short *) &base[i1]) =
i_accum;
@@ -361,6 +360,7 @@ arcfour_crypt(ARCFour_key *key, uchar_t *in, uchar_t *out, size_t len)
tmp0 += tmp1;
tmp0 = tmp0 & 0xff;
+ /* LINTED E_BAD_PTR_CAST_ALIGN */
*((unsigned short *) &base[i1]) =
i_accum;
@@ -432,6 +432,7 @@ arcfour_crypt(ARCFour_key *key, uchar_t *in, uchar_t *out, size_t len)
tmp0 += tmp1;
tmp0 = tmp0 & 0xff;
+ /* LINTED E_BAD_PTR_CAST_ALIGN */
*((unsigned short *) &base[jj]) =
i_accum;
@@ -531,6 +532,7 @@ arcfour_crypt(ARCFour_key *key, uchar_t *in, uchar_t *out, size_t len)
(unsigned long long)(base[tmp0]);
} else {
+
tmp1 = base[j];
i_accum = i_accum << 8;
@@ -541,6 +543,7 @@ arcfour_crypt(ARCFour_key *key, uchar_t *in, uchar_t *out, size_t len)
tmp0 += tmp1;
tmp0 = tmp0 & 0xff;
+ /* LINTED E_BAD_PTR_CAST_ALIGN */
*((unsigned short *) &base[jj]) =
i_accum;
@@ -553,6 +556,7 @@ arcfour_crypt(ARCFour_key *key, uchar_t *in, uchar_t *out, size_t len)
* Perform update to [out]
* Remember could be alignment issues
*/
+ /* LINTED E_BAD_PTR_CAST_ALIGN */
in0 = *((unsigned long long *) (&in[ii]));
merge1 = merge0 | (merge >> shift);
@@ -561,6 +565,7 @@ arcfour_crypt(ARCFour_key *key, uchar_t *in, uchar_t *out, size_t len)
in0 = in0 ^ merge1;
+ /* LINTED E_BAD_PTR_CAST_ALIGN */
*((unsigned long long *) (&out[ii])) = in0;
}
diff --git a/usr/src/lib/pkcs11/Makefile b/usr/src/lib/pkcs11/Makefile
index cd1f71f39a..def16574f1 100644
--- a/usr/src/lib/pkcs11/Makefile
+++ b/usr/src/lib/pkcs11/Makefile
@@ -22,8 +22,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
-#
# lib/pkcs11/Makefile
include ../Makefile.lib
@@ -36,8 +34,8 @@ ROOTHDRDIR = $(ROOT)/usr/include/security
CHECKHDRS = $(HDRDIR)/cryptoki.h
SUBDIRS = \
- libpkcs11
-
+ libpkcs11 \
+ libsoftcrypto
#
# Don't build these for OpenSolaris, since they will be replaced by
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/Makefile b/usr/src/lib/pkcs11/libsoftcrypto/Makefile
new file mode 100644
index 0000000000..ff69f0195a
--- /dev/null
+++ b/usr/src/lib/pkcs11/libsoftcrypto/Makefile
@@ -0,0 +1,55 @@
+#
+# 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 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# lib/libsoftcrypto/Makefile
+#
+
+include $(SRC)/lib/Makefile.lib
+
+$(SPARC_BLD)PLATFORMS = sun4u sun4v
+$(INTEL_BLD)PLATFORMS = i386_hwcap1
+
+SUBDIRS = $(MACH) $(MACH64) $(PLATFORMS)
+
+all := TARGET= all
+check := TARGET= check
+clean := TARGET= clean
+clobber := TARGET= clobber
+install := TARGET= install
+lint := TARGET= lint
+
+
+.PARALLEL: $(SUBDIRS)
+
+all check clean clobber install lint: $(SUBDIRS)
+
+install_h: $(ROOTHDRS)
+
+check: $(CHECKHDRS)
+
+
+$(SUBDIRS): FRC
+ @cd $@; pwd; $(MAKE) $(TARGET)
+
+FRC:
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/Makefile.com b/usr/src/lib/pkcs11/libsoftcrypto/Makefile.com
new file mode 100644
index 0000000000..e83926da50
--- /dev/null
+++ b/usr/src/lib/pkcs11/libsoftcrypto/Makefile.com
@@ -0,0 +1,165 @@
+#
+# 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 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# lib/pkcs11/libsoftcrypto/Makefile.com
+#
+
+# AES
+AES_DIR= $(SRC)/common/crypto/aes
+AES_COMMON_OBJS= aes_impl.o
+AES_COMMON_SRC= $(AES_COMMON_OBJS:%.o=$(AES_DIR)/%.c)
+AES_FLAGS= -I$(AES_DIR)
+
+# Blowfish
+BLOWFISH_DIR= $(SRC)/common/crypto/blowfish
+BLOWFISH_COMMON_OBJS= blowfish_impl.o
+BLOWFISH_COMMON_SRC= $(BLOWFISH_COMMON_OBJS:%.o=$(BLOWFISH_DIR)/%.c)
+BLOWFISH_FLAGS= -I$(BLOWFISH_DIR)
+
+# ARCFour
+ARCFOUR_DIR= $(SRC)/common/crypto/arcfour
+ARCFOUR_COMMON_OBJS= arcfour_crypt.o
+ARCFOUR_COMMON_SRC= $(ARCFOUR_COMMON_OBJS:%.o=$(ARCFOUR_DIR)/%.c)
+ARCFOUR_FLAGS= -I$(ARCFOUR_DIR)
+
+# DES
+DES_DIR= $(SRC)/common/crypto/des
+DES_COMMON_OBJS= des_impl.o des_ks.o
+DES_COMMON_SRC= $(DES_COMMON_OBJS:%.o=$(DES_DIR)/%.c)
+DES_FLAGS= -I$(DES_DIR)
+
+# BIGNUM
+BIGNUM_DIR= $(SRC)/common/bignum
+BIGNUM_COMMON_OBJS= bignumimpl.o
+BIGNUM_COMMON_SRC= $(BIGNUM_COMMON_OBJS:%.o=$(BIGNUM_DIR)/%.c)
+BIGNUM_FLAGS= -I$(BIGNUM_DIR)
+
+# Modes
+MODES_DIR= $(SRC)/common/crypto/modes
+MODES_COMMON_OBJS= modes.o ecb.o cbc.o ctr.o
+MODES_COMMON_SRC= $(MODES_COMMON_OBJS:%.o=$(MODES_DIR)/%.c)
+
+
+# Object setup
+AES_OBJS= $(AES_COMMON_OBJS) $(AES_PSM_OBJS)
+ARCFOUR_OBJS= $(ARCFOUR_COMMON_OBJS) $(ARCFOUR_PSM_OBJS)
+BLOWFISH_OBJS= $(BLOWFISH_COMMON_OBJS) $(BLOWFISH_PSM_OBJS)
+DES_OBJS= $(DES_COMMON_OBJS) $(DES_PSM_OBJS)
+BIGNUM_OBJS= $(BIGNUM_COMMON_OBJS) $(BIGNUM_PSM_OBJS)
+MODES_OBJS= $(MODES_COMMON_OBJS)
+
+OBJECTS= $(AES_OBJS) $(ARCFOUR_OBJS) $(BIGNUM_OBJS) $(BLOWFISH_OBJS) \
+ $(DES_OBJS) $(MODES_OBJS)
+
+include $(SRC)/lib/Makefile.lib
+
+# Source file setup
+AES_SRC= $(AES_COMMON_SRC) $(AES_PSM_SRC)
+ARCFOUR_SRC= $(ARCFOUR_COMMON_SRC) $(ARCFOUR_PSM_SRC)
+BLOWFISH_SRC= $(BLOWFISH_COMMON_SRC) $(BLOWFISH_PSM_SRC)
+DES_SRC= $(DES_COMMON_SRC) $(DES_PSM_SRC)
+BIGNUM_SRC= $(BIGNUM_COMMON_SRC) $(BIGNUM_PSM_SRC)
+MODES_SRC= $(MODES_COMMON_SRC)
+
+SRCS= $(AES_SRC) $(ARCFOUR_SRC) $(BIGNUM_SRC) $(BLOWFISH_SRC) $(DES_SRC) \
+ $(MODES_SRC)
+
+#
+# Compiler settings
+#
+
+SRCDIR= $(SRC)/lib/pkcs11/libsoftcrypto/common/
+CRYPTODIR= $(SRC)/common/crypto/
+MODESDIR= $(SRC)/uts/common/
+ROOTLIBDIR= $(ROOT)/usr/lib
+ROOTLIBDIR64= $(ROOT)/usr/lib/$(MACH64)
+ROOTHWCAPDIR= $(ROOTLIBDIR)/libsoftcrypto
+
+LIBS = $(DYNLIB)
+
+CFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
+CPPFLAGS += -I$(SRCDIR) -I$(CRYPTODIR) -I$(MODESDIR) -D_POSIX_PTHREAD_SEMANTICS
+ASFLAGS = $(AS_PICFLAGS) -P -D__STDC__ -D_ASM
+LINTFLAGS64 += -errchk=longptr64
+
+all: $(LIBS)
+
+lint: $(SRCS)
+ $(LINT.c) $(LINTCHECKFLAGS) $(SRCS) $(LDLIBS)
+
+pics/%.o: $(AES_DIR)/%.c
+ $(COMPILE.c) $(AES_FLAGS) -o $@ $<
+ $(POST_PROCESS_O)
+
+pics/%.o: $(ARCFOUR_DIR)/%.c
+ $(COMPILE.c) $(ARCFOUR_FLAGS) -o $@ $<
+ $(POST_PROCESS_O)
+
+pics/%.o: $(BIGNUM_DIR)/%.c
+ $(COMPILE.c) $(BIGNUM_FLAGS) -o $@ $<
+ $(POST_PROCESS_O)
+
+pics/%.o: $(BLOWFISH_DIR)/%.c
+ $(COMPILE.c) $(BLOWFISH_FLAGS) -o $@ $<
+ $(POST_PROCESS_O)
+
+pics/%.o: $(DES_DIR)/%.c
+ $(COMPILE.c) $(DES_FLAGS) -o $@ $<
+ $(POST_PROCESS_O)
+
+pics/%.o: $(MODES_DIR)/%.c
+ $(COMPILE.c) -o $@ $<
+ $(POST_PROCESS_O)
+
+
+#
+# Platform-specific targets
+#
+
+
+SOFT_PSR_DIRS = $(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib)
+SOFT_PSR_LINKS = $(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib/$(MODULE))
+
+SOFT_PSR64_DIRS = $(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib/$(MACH64))
+SOFT_PSR64_LINKS = \
+ $(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib/$(MACH64)/$(MODULE))
+
+INS.slink6 = $(RM) -r $@; \
+ $(SYMLINK) ../../$(PLATFORM)/lib/$(MODULE) $@ $(CHOWNLINK) $(CHGRPLINK)
+INS.slink64 = $(RM) -r $@; \
+ $(SYMLINK) ../../../$(PLATFORM)/lib/$(MACH64)/$(MODULE) \
+ $@ $(CHOWNLINK) $(CHGRPLINK)
+
+$(SOFT_PSR_DIRS) \
+$(SOFT_PSR64_DIRS):
+ -$(INS.dir.root.bin)
+
+$(SOFT_PSR_LINKS): $(SOFT_PSR_DIRS)
+ -$(INS.slink6)
+
+$(SOFT_PSR64_LINKS): $(SOFT_PSR64_DIRS)
+ -$(INS.slink64)
+
+
+include $(SRC)/lib/Makefile.targ
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/amd64/Makefile b/usr/src/lib/pkcs11/libsoftcrypto/amd64/Makefile
new file mode 100644
index 0000000000..a35d87f670
--- /dev/null
+++ b/usr/src/lib/pkcs11/libsoftcrypto/amd64/Makefile
@@ -0,0 +1,77 @@
+#
+# 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 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# lib/pkcs11/libsoftcrypto/amd64/Makefile
+#
+
+LIBRARY= libsoftcrypto.a
+VERS= .1
+
+AES_PSM_OBJS= aes_amd64.o aeskey.o
+AES_PSM_SRC= $(AES_DIR)/$(MACH64)/aes_amd64.s $(AES_DIR)/$(MACH64)/aeskey.c
+
+ARCFOUR_PSM_OBJS= arcfour-x86_64.o
+ARCFOUR_PSM_SRC= arcfour-x86_64.s
+
+BIGNUM_PSM_OBJS= bignum_amd64.o bignum_amd64_asm.o
+BIGNUM_PSM_SRC= $(BIGNUM_DIR)/$(MACH64)/bignum_amd64.c \
+ $(BIGNUM_DIR)/$(MACH64)/bignum_amd64_asm.s
+
+
+include ../Makefile.com
+include $(SRC)/lib/Makefile.lib.64
+
+BIGNUM_FLAGS += -DPSR_MUL
+LINTFLAGS64 += $(BIGNUM_FLAGS) $(AES_FLAGS)
+
+CLEANFILES += arcfour-x86_64.s
+
+LDLIBS += -lc
+LIBS += $(LINTLIB)
+
+install: all $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTLINT64)
+
+arcfour-x86_64.s: $(ARCFOUR_DIR)/amd64/arcfour-x86_64.pl
+ $(PERL) $? $@
+
+pics/%.o: $(AES_DIR)/$(MACH64)/%.c
+ $(COMPILE.c) $(AES_FLAGS) -o $@ $<
+ $(POST_PROCESS_O)
+
+pics/%.o: $(AES_DIR)/$(MACH64)/%.s
+ $(COMPILE.s) $(AES_FLAGS) -o $@ $<
+ $(POST_PROCESS_O)
+
+pics/%.o: $(BIGNUM_DIR)/$(MACH64)/%.c
+ $(COMPILE.c) $(BIGNUM_FLAGS) -o $@ $<
+ $(POST_PROCESS_O)
+
+pics/%.o: $(BIGNUM_DIR)/$(MACH64)/%.s
+ $(COMPILE64.s) $(BIGNUM_FLAGS) -o $@ $<
+ $(POST_PROCESS_O)
+
+pics/%.o: arcfour-x86_64.s
+ $(COMPILE64.s) $(ARCFOUR_FLAGS) -o $@ $<
+ $(POST_PROCESS_O)
+
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/common/llib-lsoftcrypto b/usr/src/lib/pkcs11/libsoftcrypto/common/llib-lsoftcrypto
new file mode 100644
index 0000000000..e3d489b13c
--- /dev/null
+++ b/usr/src/lib/pkcs11/libsoftcrypto/common/llib-lsoftcrypto
@@ -0,0 +1,39 @@
+/*
+ * 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 2008 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+
+/* LINTLIBRARY */
+/* PROTOLIB1 */
+
+#include <bignum.h>
+#include <aes_cbc_crypt.h>
+#include <aes_impl.h>
+#include <arcfour.h>
+#include <blowfish_cbc_crypt.h>
+#include <blowfish_impl.h>
+#include <des_cbc_crypt.h>
+#include <des_impl.h>
+#include <modes.h>
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/common/mapfile-vers b/usr/src/lib/pkcs11/libsoftcrypto/common/mapfile-vers
new file mode 100644
index 0000000000..8cdead2073
--- /dev/null
+++ b/usr/src/lib/pkcs11/libsoftcrypto/common/mapfile-vers
@@ -0,0 +1,73 @@
+#
+# 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 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+
+
+SUNWprivate {
+ global:
+ aes_alloc_keysched;
+ aes_copy_block;
+ aes_decrypt_block;
+ aes_decrypt_contiguous_blocks;
+ aes_encrypt_block;
+ aes_encrypt_contiguous_blocks;
+ aes_init_keysched;
+ arcfour_crypt;
+ arcfour_key_init;
+ big_One;
+ big_Two;
+ big_add;
+ big_bitlength;
+ big_cmp_abs;
+ big_copy;
+ big_div_pos;
+ big_ext_gcd_pos;
+ big_extend;
+ big_finish;
+ big_init1;
+ big_init;
+ big_modexp;
+ big_modexp_crt;
+ big_mul;
+ big_nextprime_pos;
+ big_sub;
+ big_sub_pos;
+ bignum2bytestring;
+ blowfish_alloc_keysched;
+ blowfish_decrypt_contiguous_blocks;
+ blowfish_encrypt_contiguous_blocks;
+ blowfish_init_keysched;
+ bytestring2bignum;
+ ctr_mode_final;
+ ctr_init_ctx;
+ des3_crunch_block;
+ des_alloc_keysched;
+ des_crunch_block;
+ des_decrypt_contiguous_blocks;
+ des_encrypt_contiguous_blocks;
+ des_init_keysched;
+ des_keycheck;
+ local:
+ *;
+};
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/i386/Makefile b/usr/src/lib/pkcs11/libsoftcrypto/i386/Makefile
new file mode 100644
index 0000000000..a16c437698
--- /dev/null
+++ b/usr/src/lib/pkcs11/libsoftcrypto/i386/Makefile
@@ -0,0 +1,37 @@
+#
+# 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 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# lib/pkcs11/libsoftcrypto/i386/Makefile
+#
+
+LIBRARY= libsoftcrypto.a
+VERS= .1
+
+include ../Makefile.com
+
+LDLIBS += -lc
+LIBS += $(LINTLIB)
+DYNFLAGS += -Wl,-f/usr/lib/libsoftcrypto/\$$HWCAP
+
+install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/i386_hwcap1/Makefile b/usr/src/lib/pkcs11/libsoftcrypto/i386_hwcap1/Makefile
new file mode 100644
index 0000000000..0bbc993a63
--- /dev/null
+++ b/usr/src/lib/pkcs11/libsoftcrypto/i386_hwcap1/Makefile
@@ -0,0 +1,58 @@
+#
+# 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 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# lib/pkcs11/libsoftcrypto/i386_hwcap1/Makefile
+#
+LIBRARY= libsoftcrypto_hwcap1.a
+VERS= .1
+
+MODULE= libsoftcrypto_hwcap1.so.1
+
+BIGNUM_PSM_OBJS= bignum_i386.o bignum_i386_asm.o
+BIGNUM_PSM_SRC= $(BIGNUM_DIR)/i386/bignum_i386_asm.s \
+ $(BIGNUM_DIR)/i386/bignum_i386.c
+
+include ../Makefile.com
+
+BIGNUM_FLAGS += -DMMX_MANAGE -DHWCAP -DPSR_MUL
+LINTFLAGS += $(BIGNUM_FLAGS)
+LDLIBS += -lc
+
+$(ROOTHWCAPDIR)/% := FILEMODE= 755
+
+install: all $(ROOTHWCAPDIR)/$(MODULE)
+
+pics/bignum_i386.o: $(BIGNUM_DIR)/i386/bignum_i386.c
+ $(COMPILE.c) $(BIGNUM_FLAGS) -o $@ $(BIGNUM_DIR)/i386/bignum_i386.c
+ $(POST_PROCESS_O)
+
+pics/bignum_i386_asm.o: $(BIGNUM_DIR)/i386/bignum_i386_asm.s
+ $(COMPILE.s) -o $@ $(BIGNUM_DIR)/i386/bignum_i386_asm.s
+ $(POST_PROCESS_O)
+
+$(ROOTHWCAPDIR): $(ROOTLIBDIR)
+ $(INS.dir)
+
+$(ROOTHWCAPDIR)/%: $(ROOTHWCAPDIR) %
+ $(INS.file)
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/sparc/Makefile b/usr/src/lib/pkcs11/libsoftcrypto/sparc/Makefile
new file mode 100644
index 0000000000..8d57c71b5a
--- /dev/null
+++ b/usr/src/lib/pkcs11/libsoftcrypto/sparc/Makefile
@@ -0,0 +1,38 @@
+#
+# 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 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# lib/pkcs11/libsoftcrypto/sparc/Makefile
+#
+
+LIBRARY= libsoftcrypto.a
+VERS= .1
+
+include ../Makefile.com
+
+LDLIBS += -lc
+LIBS += $(LINTLIB)
+
+DYNFLAGS += -Wl,-f/usr/platform/\$$PLATFORM/lib/$(DYNLIBPSR)
+
+install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/sparcv9/Makefile b/usr/src/lib/pkcs11/libsoftcrypto/sparcv9/Makefile
new file mode 100644
index 0000000000..952e064d45
--- /dev/null
+++ b/usr/src/lib/pkcs11/libsoftcrypto/sparcv9/Makefile
@@ -0,0 +1,39 @@
+#
+# 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 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# lib/pkcs11/libsoftcrypto/sparcv9/Makefile
+#
+
+LIBRARY= libsoftcrypto.a
+VERS= .1
+
+include ../Makefile.com
+include $(SRC)/lib/Makefile.lib.64
+
+LDLIBS += -lc
+LIBS += $(LINTLIB)
+
+DYNFLAGS += -Wl,-f/usr/platform/\$$PLATFORM/lib/$(MACH64)/$(DYNLIBPSR)
+
+install: all $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTLINT64)
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/sun4u/Makefile b/usr/src/lib/pkcs11/libsoftcrypto/sun4u/Makefile
new file mode 100644
index 0000000000..3415b4dee3
--- /dev/null
+++ b/usr/src/lib/pkcs11/libsoftcrypto/sun4u/Makefile
@@ -0,0 +1,46 @@
+#
+# 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 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# lib/pkcs11/libsoftcrypto/sun4u/Makefile
+#
+
+include $(SRC)/lib/Makefile.lib
+
+SUBDIRS = sparc sparcv9
+
+all := TARGET= all
+check := TARGET= check
+clean := TARGET= clean
+clobber := TARGET= clobber
+install := TARGET= install
+lint := TARGET= lint
+
+.PARALLEL: $(SUBDIRS)
+
+all check clean clobber install lint: $(SUBDIRS)
+
+$(SUBDIRS): FRC
+ @cd $@; pwd; $(MAKE) $(TARGET)
+
+FRC:
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/sun4u/Makefile.com b/usr/src/lib/pkcs11/libsoftcrypto/sun4u/Makefile.com
new file mode 100644
index 0000000000..01157b58e1
--- /dev/null
+++ b/usr/src/lib/pkcs11/libsoftcrypto/sun4u/Makefile.com
@@ -0,0 +1,67 @@
+#
+# 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 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# lib/pkcs11/libsoftcrypto/sun4u/Makefile.com
+#
+
+LIBRARY = libsoftcrypto_psr.a
+VERS= .1
+PLATFORM = sun4u
+MODULE = libsoftcrypto_psr.so.1
+
+include $(SRC)/Makefile.psm
+include ../Makefile.links
+include ../../Makefile.com
+
+# Platform-specific settings
+AES_PSM_OBJS= aes_crypt_asm.o
+ARCFOUR_PSM_OBJS= arcfour_crypt_asm.o
+DES_PSM_OBJS= des_crypt_asm.o
+BIGNUM_PSM_OBJS= mont_mulf_asm.o
+BIGNUM_FLAGS += -DUSE_FLOATING_POINT
+
+MAPFILES = ../mapfile-vers
+OBJECTS = $(AES_OBJS) $(ARCFOUR_OBJS) $(DES_OBJS) $(BIGNUM_PSM_OBJS) \
+ $(MODES_OBJS)
+
+# Compiler settings
+LDLIBS += -lc
+CFLAGS += -D$(PLATFORM)
+CFLAGS64 += -D$(PLATFORM)
+ASFLAGS += -DPIC
+
+$(USR_PSM_LIB_DIR)/% := FILEMODE = 755
+
+pics/aes_crypt_asm.o: $(AES_DIR)/sun4u/aes_crypt_asm.s
+ $(COMPILE.s) $(AS_BIGPICFLAGS) -o $@ $(AES_DIR)/sun4u/aes_crypt_asm.s
+ $(POST_PROCESS_O)
+
+pics/arcfour_crypt_asm.o: $(ARCFOUR_DIR)/sun4u/arcfour_crypt_asm.s
+ $(COMPILE.s) $(AS_BIGPICFLAGS) -o $@ \
+ $(ARCFOUR_DIR)/sun4u/arcfour_crypt_asm.s
+ $(POST_PROCESS_O)
+
+pics/des_crypt_asm.o: $(DES_DIR)/sun4u/des_crypt_asm.s
+ $(COMPILE.s) $(AS_BIGPICFLAGS) -o $@ $(DES_DIR)/sun4u/des_crypt_asm.s
+ $(POST_PROCESS_O)
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/sun4u/Makefile.links b/usr/src/lib/pkcs11/libsoftcrypto/sun4u/Makefile.links
new file mode 100644
index 0000000000..db7f8878bf
--- /dev/null
+++ b/usr/src/lib/pkcs11/libsoftcrypto/sun4u/Makefile.links
@@ -0,0 +1,62 @@
+#
+# 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 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# lib/pkcs11/libsoftcrypto/sun4u/Makefile.links
+#
+# Used when building links in /usr/platform/sun4u/lib/ and
+# /usr/platform/sun4u/lib/sparcv9/
+#
+
+LINKED_PLATFORMS = \
+ SUNW,Ultra-2 \
+ SUNW,Ultra-4 \
+ SUNW,Ultra-250 \
+ SUNW,Ultra-Enterprise \
+ SUNW,Ultra-Enterprise-10000 \
+ SUNW,UltraSPARC-IIi-Netract \
+ SUNW,UltraSPARC-IIe-NetraCT-40 \
+ SUNW,UltraSPARC-IIe-NetraCT-60 \
+ SUNW,Sun-Blade-100 \
+ SUNW,Sun-Blade-1000 \
+ SUNW,Sun-Blade-1500 \
+ SUNW,Sun-Blade-2500 \
+ SUNW,A70 \
+ SUNW,Sun-Fire \
+ SUNW,Sun-Fire-V215 \
+ SUNW,Sun-Fire-V240 \
+ SUNW,Sun-Fire-V250 \
+ SUNW,Sun-Fire-V440 \
+ SUNW,Sun-Fire-V445 \
+ SUNW,Sun-Fire-280R \
+ SUNW,Sun-Fire-15000 \
+ SUNW,Sun-Fire-880 \
+ SUNW,Sun-Fire-480R \
+ SUNW,Sun-Fire-V890 \
+ SUNW,Sun-Fire-V490 \
+ SUNW,Serverblade1 \
+ SUNW,Netra-T12 \
+ SUNW,Netra-T4 \
+ SUNW,Netra-CP2300 \
+ SUNW,Netra-CP3010 \
+ TAD,SPARCLE
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/sun4u/mapfile-vers b/usr/src/lib/pkcs11/libsoftcrypto/sun4u/mapfile-vers
new file mode 100644
index 0000000000..4891b5458b
--- /dev/null
+++ b/usr/src/lib/pkcs11/libsoftcrypto/sun4u/mapfile-vers
@@ -0,0 +1,49 @@
+#
+# 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 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+
+SUNWprivate {
+ global:
+ aes_alloc_keysched;
+ aes_decrypt_contiguous_blocks;
+ aes_decrypt_block;
+ aes_encrypt_contiguous_blocks;
+ aes_encrypt_block;
+ aes_init_keysched;
+ arcfour_crypt;
+ arcfour_key_init;
+ conv_d16_to_i32;
+ conv_i32_to_d32;
+ conv_i32_to_d16;
+ conv_i32_to_d32_and_d16;
+ mont_mulf_noconv;
+ des3_crunch_block;
+ des_alloc_keysched;
+ des_crunch_block;
+ des_init_keysched;
+ des_keycheck;
+ local:
+ *;
+};
+
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/sun4u/sparc/Makefile b/usr/src/lib/pkcs11/libsoftcrypto/sun4u/sparc/Makefile
new file mode 100644
index 0000000000..9c83a288f3
--- /dev/null
+++ b/usr/src/lib/pkcs11/libsoftcrypto/sun4u/sparc/Makefile
@@ -0,0 +1,41 @@
+#
+# 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 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# lib/pkcs11/libsoftcrypto/sun4u/sparc/Makefile
+#
+
+CLASS = 32
+
+include ../Makefile.com
+
+ASFLAGS += -xarch=v8plus
+LINTFLAGS += -D$(PLATFORM)
+
+install: all $(SOFT_PSR_LINKS) $(USR_PSM_LIBS)
+
+include $(SRC)/Makefile.psm.targ
+
+pics/mont_mulf_asm.o: $(BIGNUM_DIR)/sun4u/mont_mulf_v8plus.s
+ $(COMPILE.s) -o $@ $(BIGNUM_DIR)/sun4u/mont_mulf_v8plus.s
+ $(POST_PROCESS_O)
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/sun4u/sparcv9/Makefile b/usr/src/lib/pkcs11/libsoftcrypto/sun4u/sparcv9/Makefile
new file mode 100644
index 0000000000..6cf0f4f3d5
--- /dev/null
+++ b/usr/src/lib/pkcs11/libsoftcrypto/sun4u/sparcv9/Makefile
@@ -0,0 +1,41 @@
+#
+# 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 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# lib/pkcs11/libsoftcrypto/sun4u/sparcv9/Makefile
+#
+
+CLASS = 64
+
+include ../Makefile.com
+include $(SRC)/lib/Makefile.lib.64
+
+LINTFLAGS64 += -D$(PLATFORM)
+
+install: all $(SOFT_PSR64_LINKS) $(USR_PSM_LIBS64)
+
+include $(SRC)/Makefile.psm.targ
+
+pics/mont_mulf_asm.o: $(BIGNUM_DIR)/sun4u/mont_mulf_v9.s
+ $(COMPILE.s) -o $@ $(BIGNUM_DIR)/sun4u/mont_mulf_v9.s
+ $(POST_PROCESS_O)
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/sun4v/Makefile b/usr/src/lib/pkcs11/libsoftcrypto/sun4v/Makefile
new file mode 100644
index 0000000000..4f0e552192
--- /dev/null
+++ b/usr/src/lib/pkcs11/libsoftcrypto/sun4v/Makefile
@@ -0,0 +1,47 @@
+#
+# 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 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# lib/pkcs11/libsoftcrypto/sun4v/Makefile
+#
+
+include $(SRC)/lib/Makefile.lib
+
+SUBDIRS = $(MACH) $(PLATFORMS)
+$(BUILD64)SUBDIRS += $(MACH64)
+
+all := TARGET= all
+check := TARGET= check
+clean := TARGET= clean
+clobber := TARGET= clobber
+install := TARGET= install
+lint := TARGET= lint
+
+.PARALLEL: $(SUBDIRS)
+
+all check clean clobber install lint: $(SUBDIRS)
+
+$(SUBDIRS): FRC
+ @cd $@; pwd; $(MAKE) $(TARGET)
+
+FRC:
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/sun4v/Makefile.com b/usr/src/lib/pkcs11/libsoftcrypto/sun4v/Makefile.com
new file mode 100644
index 0000000000..97e90d696c
--- /dev/null
+++ b/usr/src/lib/pkcs11/libsoftcrypto/sun4v/Makefile.com
@@ -0,0 +1,58 @@
+#
+# 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 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# lib/pkcs11/libsoftcrypto/sun4v/Makefile.com
+#
+
+LIBRARY = libsoftcrypto_psr.a
+VERS= .1
+PLATFORM = sun4v
+MODULE = libsoftcrypto_psr.so.1
+
+include $(SRC)/Makefile.psm
+include ../Makefile.links
+include ../../Makefile.com
+
+# Platform-specific settings
+ARCFOUR_PSM_OBJS= arcfour_crypt.o
+ARCFOUR_PSM_SRC= $(ARCFOUR_DIR)/sun4v/arcfour_crypt.c
+SRCS= $(ARCFOUR_PSM_SRC)
+
+MAPFILES= ../mapfile-vers
+OBJECTS= $(ARCFOUR_PSM_OBJS)
+
+# Compiler settings
+sparc_XARCH = -m32 -xarch=sparc
+sparcv9_XARCH = -m64 -xarch=sparcvis
+
+# Niagara perf options as per $SRC/uts/sun4v/arcfour
+CFLAGS += -xO5 -xbuiltin=%all -dalign -D$(PLATFORM)
+CFLAGS64 += -D$(PLATFORM)
+ASFLAGS += -DPIC
+
+$(USR_PSM_LIB_DIR)/% := FILEMODE = 755
+
+pics/arcfour_crypt.o: $(ARCFOUR_DIR)/sun4v/arcfour_crypt.c
+ $(COMPILE.c) -o $@ $(ARCFOUR_DIR)/sun4v/arcfour_crypt.c
+ $(POST_PROCESS_O)
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/sun4v/Makefile.links b/usr/src/lib/pkcs11/libsoftcrypto/sun4v/Makefile.links
new file mode 100644
index 0000000000..c450d67c2e
--- /dev/null
+++ b/usr/src/lib/pkcs11/libsoftcrypto/sun4v/Makefile.links
@@ -0,0 +1,41 @@
+#
+# 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 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# lib/libsoftcrypto/sun4v/Makefile.links
+#
+# Used when building links in /usr/platform/sun4v/lib and
+# /usr/platform/sun4v/lib/sparcv9/
+#
+
+LINKED_PLATFORMS = \
+ SUNW,Netra-CP3060 \
+ SUNW,Netra-CP3260 \
+ SUNW,Netra-T5220 \
+ SUNW,Netra-T5440 \
+ SUNW,SPARC-Enterprise-T5120 \
+ SUNW,Sun-Blade-T6300 \
+ SUNW,Sun-Blade-T6320 \
+ SUNW,Sun-Fire-T200 \
+ SUNW,T5140 \
+ SUNW,USBRDT-5240
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/sun4v/mapfile-vers b/usr/src/lib/pkcs11/libsoftcrypto/sun4v/mapfile-vers
new file mode 100644
index 0000000000..ba3947aa93
--- /dev/null
+++ b/usr/src/lib/pkcs11/libsoftcrypto/sun4v/mapfile-vers
@@ -0,0 +1,33 @@
+#
+# 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 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+
+
+SUNWprivate {
+ global:
+ arcfour_crypt;
+ arcfour_key_init;
+ local:
+ *;
+};
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/sun4v/sparc/Makefile b/usr/src/lib/pkcs11/libsoftcrypto/sun4v/sparc/Makefile
new file mode 100644
index 0000000000..d972c319b2
--- /dev/null
+++ b/usr/src/lib/pkcs11/libsoftcrypto/sun4v/sparc/Makefile
@@ -0,0 +1,37 @@
+#
+# 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 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# lib/pkcs11/libsoftcrypto/sun4v/sparc/Makefile
+#
+
+CLASS = 32
+
+include ../Makefile.com
+
+LINTFLAGS += -D$(PLATFORM)
+
+install: all $(SOFT_PSR_LINKS) $(USR_PSM_LIBS)
+
+include $(SRC)/Makefile.psm.targ
+
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/sun4v/sparcv9/Makefile b/usr/src/lib/pkcs11/libsoftcrypto/sun4v/sparcv9/Makefile
new file mode 100644
index 0000000000..4c82742a86
--- /dev/null
+++ b/usr/src/lib/pkcs11/libsoftcrypto/sun4v/sparcv9/Makefile
@@ -0,0 +1,37 @@
+#
+# 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 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# lib/pkcs11/libsoftcrypto/sun4v/sparcv9/Makefile
+#
+
+CLASS = 64
+
+include ../Makefile.com
+include $(SRC)/lib/Makefile.lib.64
+
+LINTFLAGS64 += -D$(PLATFORM)
+
+install: all $(SOFT_PSR64_LINKS) $(USR_PSM_LIBS64)
+
+include $(SRC)/Makefile.psm.targ
diff --git a/usr/src/lib/pkcs11/pkcs11_softtoken/Makefile.com b/usr/src/lib/pkcs11/pkcs11_softtoken/Makefile.com
index 52d5f7f4db..c3797e5cab 100644
--- a/usr/src/lib/pkcs11/pkcs11_softtoken/Makefile.com
+++ b/usr/src/lib/pkcs11/pkcs11_softtoken/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
# lib/pkcs11/pkcs11_softtoken/Makefile.com
#
@@ -70,11 +68,6 @@ LCL_OBJECTS = \
ASFLAGS = $(AS_PICFLAGS) -P -D__STDC__ -D_ASM $(CPPFLAGS)
-AES_COBJECTS = aes_impl.o
-ARCFOUR_COBJECTS = arcfour_crypt.o
-BLOWFISH_COBJECTS = blowfish_impl.o
-DES_COBJECTS = des_impl.o des_ks.o
-
ECC_COBJECTS = \
ec.o ec2_163.o ec2_mont.o ecdecode.o ecl_mult.o ecp_384.o \
ecp_jac.o ec2_193.o ecl.o ecp_192.o ecp_521.o \
@@ -82,66 +75,27 @@ ECC_COBJECTS = \
ec2_aff.o ec_naf.o ecl_gf.o ecp_256.o oid.o secitem.o \
ec2_test.o ecp_test.o
-MODES_COBJECTS = modes.o ecb.o cbc.o ctr.o
MPI_COBJECTS = mp_gf2m.o mpi.o mplogic.o mpmontg.o mpprime.o
-
RSA_COBJECTS = rsa_impl.o
-BIGNUM_COBJECTS = bignumimpl.o
-AES_OBJECTS = $(AES_COBJECTS) $(AES_PSR_OBJECTS)
-ARCFOUR_OBJECTS = $(ARCFOUR_COBJECTS) $(ARCFOUR_PSR_OBJECTS)
-BLOWFISH_OBJECTS = $(BLOWFISH_COBJECTS) $(BLOWFISH_PSR_OBJECTS)
-DES_OBJECTS = $(DES_COBJECTS) $(DES_PSR_OBJECTS)
ECC_OBJECTS = $(ECC_COBJECTS) $(ECC_PSR_OBJECTS)
-MODES_OBJECTS = $(MODES_COBJECTS) $(MODES_PSR_OBJECTS)
MPI_OBJECTS = $(MPI_COBJECTS) $(MPI_PSR_OBJECTS)
RSA_OBJECTS = $(RSA_COBJECTS) $(RSA_PSR_OBJECTS)
-BIGNUM_OBJECTS = $(BIGNUM_COBJECTS) $(BIGNUM_PSR_OBJECTS)
-
BER_OBJECTS = bprint.o decode.o encode.o io.o
-# Sparc userland uses a floating-point implementation of
-# Montgomery multiply. So, USE_FLOATING_POINT is defined here
-# for Sparc targets.
-#
-# x86 does not use floating-point for the kernel or userland.
-#
-# Sparc has only one integer implementation of big_mul_add_vec()
-# and friends, so these functions are called directly.
-# So, HWCAP (HardWare CAPabilities) is not defined for Sparc.
-#
-# x86 has multiple integer implementations to choose from.
-# Hardware features are tested at run time, just once,
-# on first use. So, big_mul_add_vec() and friends must be
-# called through a function pointer.
-#
-# AMD64 has a 64x64->128 bit multiply instruction, which makes
-# things even faster than i386 SSE2 instructions. Since there
-# is no run-time testing of features, as there is for SSE2,
-# there is no need to call big_mul_add_vec() and friends through
-# functions pointers, and so HWCAP is not defined.
-#
-# For now i386 and amd64 use the C code version of mont_mulf
-
OBJECTS = \
$(LCL_OBJECTS) \
- $(AES_OBJECTS) \
- $(BLOWFISH_OBJECTS) \
- $(ARCFOUR_OBJECTS) \
- $(DES_OBJECTS) \
- $(MODES_OBJECTS) \
$(MPI_OBJECTS) \
$(RSA_OBJECTS) \
- $(BIGNUM_OBJECTS) \
+ $(BIGNUM_OBJECTS) \
$(BER_OBJECTS) \
$(ECC_OBJECTS)
-AESDIR= $(SRC)/common/crypto/aes
-BLOWFISHDIR= $(SRC)/common/crypto/blowfish
-ARCFOURDIR= $(SRC)/common/crypto/arcfour
-DESDIR= $(SRC)/common/crypto/des
+AESDIR= $(SRC)/common/crypto/aes
+BLOWFISHDIR= $(SRC)/common/crypto/blowfish
+ARCFOURDIR= $(SRC)/common/crypto/arcfour
+DESDIR= $(SRC)/common/crypto/des
ECCDIR= $(SRC)/common/crypto/ecc
-MODESDIR= $(SRC)/common/crypto/modes
MPIDIR= $(SRC)/common/mpi
RSADIR= $(SRC)/common/crypto/rsa
BIGNUMDIR= $(SRC)/common/bignum
@@ -156,22 +110,16 @@ SRCDIR= ../common
SRCS = \
$(LCL_OBJECTS:%.o=$(SRCDIR)/%.c) \
- $(AES_COBJECTS:%.o=$(AESDIR)/%.c) \
- $(BLOWFISH_COBJECTS:%.o=$(BLOWFISHDIR)/%.c) \
- $(ARCFOUR_COBJECTS:%.o=$(ARCFOURDIR)/%.c) \
- $(DES_COBJECTS:%.o=$(DESDIR)/%.c) \
- $(MODES_COBJECTS:%.o=$(MODESDIR)/%.c) \
$(MPI_COBJECTS:%.o=$(MPIDIR)/%.c) \
$(RSA_COBJECTS:%.o=$(RSADIR)/%.c) \
- $(BIGNUM_COBJECTS:%.o=$(BIGNUMDIR)/%.c) \
- $(BIGNUM_PSR_SRCS) \
$(ECC_COBJECTS:%.o=$(ECCDIR)/%.c)
# libelfsign needs a static pkcs11_softtoken
LIBS = $(DYNLIB)
-LDLIBS += -lc -lmd -lcryptoutil
+LDLIBS += -lc -lmd -lcryptoutil -lsoftcrypto
CFLAGS += $(CCVERBOSE)
+
CPPFLAGS += -I$(AESDIR) -I$(BLOWFISHDIR) -I$(ARCFOURDIR) -I$(DESDIR) \
-I$(ECCDIR) -I$(SRC)/common/crypto -I$(MPIDIR) -I$(RSADIR) \
-I$(SRCDIR) -I$(BIGNUMDIR) -D_POSIX_PTHREAD_SEMANTICS \
@@ -183,16 +131,10 @@ ROOTLIBDIR= $(ROOT)/usr/lib/security
ROOTLIBDIR64= $(ROOT)/usr/lib/security/$(MACH64)
LINTSRC = \
- $(AES_COBJECTS:%.o=$(AESDIR)/%.c) \
- $(ARCFOUR_COBJECTS:%.o=$(ARCFOURDIR)/%.c) \
- $(BIGNUM_COBJECTS:%.o=$(BIGNUMDIR)/%.c) \
- $(BIGNUM_PSR_SRCS) \
- $(BLOWFISH_COBJECTS:%.o=$(BLOWFISHDIR)/%.c) \
- $(DES_COBJECTS:%.o=$(DESDIR)/%.c) \
$(LCL_OBJECTS:%.o=$(SRCDIR)/%.c) \
- $(MODES_COBJECTS:%.o=$(MODESDIR)/%.c) \
$(RSA_COBJECTS:%.o=$(RSADIR)/%.c)
+
.KEEP_STATE:
all: $(LIBS)
@@ -200,39 +142,15 @@ all: $(LIBS)
lint: $$(LINTSRC)
$(LINT.c) $(LINTCHECKFLAGS) $(LINTSRC) $(LDLIBS)
-pics/%.o: $(AESDIR)/%.c
- $(COMPILE.c) -o $@ $<
- $(POST_PROCESS_O)
-
-pics/%.o: $(ARCFOURDIR)/%.c
- $(COMPILE.c) -o $@ $<
- $(POST_PROCESS_O)
-
pics/%.o: $(BERDIR)/%.c
$(COMPILE.c) -o $@ $< -D_SOLARIS_SDK -I$(BERDIR) \
-I../../../libldap5/include/ldap
$(POST_PROCESS_O)
-pics/%.o: $(BIGNUMDIR)/%.c
- $(COMPILE.c) -o $@ $(BIGNUM_CFG) $<
- $(POST_PROCESS_O)
-
-pics/%.o: $(BLOWFISHDIR)/%.c
- $(COMPILE.c) -o $@ $<
- $(POST_PROCESS_O)
-
-pics/%.o: $(DESDIR)/%.c
- $(COMPILE.c) -o $@ $<
- $(POST_PROCESS_O)
-
pics/%.o: $(ECCDIR)/%.c
$(COMPILE.c) -o $@ $<
$(POST_PROCESS_O)
-pics/%.o: $(MODESDIR)/%.c
- $(COMPILE.c) -o $@ $<
- $(POST_PROCESS_O)
-
pics/%.o: $(MPIDIR)/%.c
$(COMPILE.c) -o $@ $<
$(POST_PROCESS_O)
diff --git a/usr/src/lib/pkcs11/pkcs11_softtoken/amd64/Makefile b/usr/src/lib/pkcs11/pkcs11_softtoken/amd64/Makefile
index 5ebb96dbeb..b528e2fea0 100644
--- a/usr/src/lib/pkcs11/pkcs11_softtoken/amd64/Makefile
+++ b/usr/src/lib/pkcs11/pkcs11_softtoken/amd64/Makefile
@@ -22,56 +22,9 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
# lib/pkcs11/pkcs11_softtoken/amd64/Makefile
-AES_PSR_OBJECTS = aes_amd64.o aeskey.o
-ARCFOUR_PSR_OBJECTS = arcfour-x86_64.o
-DES_PSR_OBJECTS =
-RSA_PSR_OBJECTS =
-BIGNUM_PSR_OBJECTS = bignum_amd64.o bignum_amd64_asm.o
-BIGNUM_PSR_PICS = $(BIGNUM_PSR_OBJECTS:%=pics/%)
-BIGNUM_CFG = -DPSR_MUL
-BIGNUM_PSR_SRCS = \
- $(BIGNUMDIR)/$(MACH64)/bignum_amd64.c \
- $(BIGNUMDIR)/$(MACH64)/bignum_amd64_asm.s
-
-pics/bignum_amd64.o := amd64_COPTFLAG = -xO3
-
include ../Makefile.com
include ../../../Makefile.lib.64
-#
-# Overrides
-#
-CLEANFILES += arcfour-x86_64.s
-
install: all $(ROOTLIBS64) $(ROOTLINKS64)
-
-$(BIGNUM_PSR_PICS) := CFLAGS += $(C_BIGPICFLAGS) $(BIGNUM_CFG)
-
-LINTFLAGS64 += $(BIGNUM_CFG)
-
-pics/%.o: %.s
- $(COMPILE.s) -o $@ $<
- $(POST_PROCESS_O)
-
-arcfour-x86_64.s: $(ARCFOURDIR)/$(MACH64)/arcfour-x86_64.pl
- $(PERL) $? $@
-
-pics/%.o: $(BIGNUMDIR)/$(MACH64)/%.c
- $(COMPILE.c) -o $@ $(C_BIGPICFLAGS) $(BIGNUM_CFG) $<
- $(POST_PROCESS_O)
-
-pics/%.o: $(BIGNUMDIR)/$(MACH64)/%.s
- $(COMPILE.s) -o $@ $(AS_BIGPICFLAGS) $(BIGNUM_CFG) $<
- $(POST_PROCESS_O)
-
-pics/%.o: $(AESDIR)/$(MACH64)/%.c
- $(COMPILE.c) -o $@ $(AESDIR)/$(MACH64)/${@F:.o=.c}
- $(POST_PROCESS_O)
-
-pics/%.o: $(AESDIR)/$(MACH64)/%.s
- $(COMPILE.s) -o $@ $<
- $(POST_PROCESS_O)
diff --git a/usr/src/lib/pkcs11/pkcs11_softtoken/i386/Makefile b/usr/src/lib/pkcs11/pkcs11_softtoken/i386/Makefile
index 2fc4d94a81..7772d9f77c 100644
--- a/usr/src/lib/pkcs11/pkcs11_softtoken/i386/Makefile
+++ b/usr/src/lib/pkcs11/pkcs11_softtoken/i386/Makefile
@@ -22,34 +22,10 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
# lib/pkcs11/pkcs11_softtoken/i386/Makefile
-AES_PSR_OBJECTS =
-ARCFOUR_PSR_OBJECTS =
-DES_PSR_OBJECTS =
-RSA_PSR_OBJECTS =
-BIGNUM_PSR_OBJECTS = bignum_i386.o bignum_i386_asm.o
-BIGNUM_CFG = -DPSR_MUL -DHWCAP
-BIGNUM_PSR_SRCS = \
- $(BIGNUMDIR)/i386/bignum_i386.c \
- $(BIGNUMDIR)/i386/bignum_i386_asm.s
-
include ../Makefile.com
CPPFLAGS += -DMP_USE_UINT_DIGIT
install: all $(ROOTLIBS) $(ROOTLINKS)
-
-DYNFLAGS += -M $(BIGNUMDIR)/i386/cap_mapfile
-
-pics/bignum_i386.o := COPTFLAG = -xO3
-
-pics/%.o: $(BIGNUMDIR)/$(MACH)/%.c
- $(COMPILE.c) -o $@ $(BIGNUM_CFG) $<
- $(POST_PROCESS_O)
-
-pics/%.o: $(BIGNUMDIR)/$(MACH)/%.s
- $(COMPILE.s) -o $@ $(BIGNUM_CFG) $<
- $(POST_PROCESS_O)
diff --git a/usr/src/lib/pkcs11/pkcs11_softtoken/sparc/Makefile b/usr/src/lib/pkcs11/pkcs11_softtoken/sparc/Makefile
index 0aacdc55aa..d786283918 100644
--- a/usr/src/lib/pkcs11/pkcs11_softtoken/sparc/Makefile
+++ b/usr/src/lib/pkcs11/pkcs11_softtoken/sparc/Makefile
@@ -22,40 +22,10 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
# lib/pkcs11/pkcs11_softtoken/sparc/Makefile
-AES_PSR_OBJECTS = aes_crypt_sparc.o
-ARCFOUR_PSR_OBJECTS = arcfour_crypt_sparc.o
-DES_PSR_OBJECTS = des_crypt_sparc.o
-RSA_PSR_OBJECTS =
-BIGNUM_PSR_OBJECTS = mont_mulf_sparc.o
-BIGNUM_CFG = -DUSE_FLOATING_POINT
-
include ../Makefile.com
CFLAGS += -Dsun4u
CPPFLAGS += -DMP_USE_UINT_DIGIT
install: all $(ROOTLIBS) $(ROOTLINKS)
-
-
-pics/aes_crypt_sparc.o: $(AESDIR)/sun4u/aes_crypt_asm.s
- $(COMPILE.s) $(AS_BIGPICFLAGS) -P -DPIC -xarch=v8plus -o $@ \
- $(AESDIR)/sun4u/aes_crypt_asm.s
- $(POST_PROCESS_O)
-
-pics/arcfour_crypt_sparc.o: $(ARCFOURDIR)/sun4u/arcfour_crypt_asm.s
- $(COMPILE.s) $(AS_BIGPICFLAGS) -P -DPIC -xarch=v8plus -o $@ \
- $(ARCFOURDIR)/sun4u/arcfour_crypt_asm.s
- $(POST_PROCESS_O)
-
-pics/des_crypt_sparc.o: $(DESDIR)/sun4u/des_crypt_asm.s
- $(COMPILE.s) $(AS_BIGPICFLAGS) -P -DPIC -xarch=v8plus -o $@ \
- $(DESDIR)/sun4u/des_crypt_asm.s
- $(POST_PROCESS_O)
-
-pics/mont_mulf_sparc.o: $(BIGNUMDIR)/sun4u/mont_mulf_v8plus.s
- $(COMPILE.s) $(AS_BIGPICFLAGS) -xarch=v8plus -o $@ \
- $(BIGNUMDIR)/sun4u/mont_mulf_v8plus.s
- $(POST_PROCESS_O)
diff --git a/usr/src/lib/pkcs11/pkcs11_softtoken/sparcv9/Makefile b/usr/src/lib/pkcs11/pkcs11_softtoken/sparcv9/Makefile
index 6aadb8a25e..53d05f502a 100644
--- a/usr/src/lib/pkcs11/pkcs11_softtoken/sparcv9/Makefile
+++ b/usr/src/lib/pkcs11/pkcs11_softtoken/sparcv9/Makefile
@@ -19,42 +19,13 @@
# CDDL HEADER END
#
#
-# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
# lib/pkcs11/pkcs11_softtoken/sparcv9/Makefile
-AES_PSR_OBJECTS = aes_crypt_sparcv9.o
-ARCFOUR_PSR_OBJECTS = arcfour_crypt_sparcv9.o
-DES_PSR_OBJECTS = des_crypt_sparcv9.o
-RSA_PSR_OBJECTS =
-BIGNUM_PSR_OBJECTS = mont_mulf_sparcv9.o
-BIGNUM_CFG = -DUSE_FLOATING_POINT
-
include ../Makefile.com
include ../../../Makefile.lib.64
CFLAGS64 += -Dsun4u
install: all $(ROOTLIBS64) $(ROOTLINKS64)
-
-
-pics/aes_crypt_sparcv9.o: $(AESDIR)/sun4u/aes_crypt_asm.s
- $(COMPILE.s) $(AS_BIGPICFLAGS) -P -DPIC -xarch=v9 -o $@ \
- $(AESDIR)/sun4u/aes_crypt_asm.s
- $(POST_PROCESS_O)
-
-pics/arcfour_crypt_sparcv9.o: $(ARCFOURDIR)/sun4u/arcfour_crypt_asm.s
- $(COMPILE.s) $(AS_BIGPICFLAGS) -P -DPIC -xarch=v9 -o $@ \
- $(ARCFOURDIR)/sun4u/arcfour_crypt_asm.s
- $(POST_PROCESS_O)
-
-pics/des_crypt_sparcv9.o: $(DESDIR)/sun4u/des_crypt_asm.s
- $(COMPILE.s) $(AS_BIGPICFLAGS) -P -DPIC -xarch=v9 -o $@ \
- $(DESDIR)/sun4u/des_crypt_asm.s
- $(POST_PROCESS_O)
-
-pics/mont_mulf_sparcv9.o: $(BIGNUMDIR)/sun4u/mont_mulf_v9.s
- $(COMPILE.s) $(AS_BIGPICFLAGS) -xarch=v9 -o $@ $(BIGNUMDIR)/sun4u/mont_mulf_v9.s
- $(POST_PROCESS_O)
diff --git a/usr/src/pkgdefs/SUNWcsl/prototype_com b/usr/src/pkgdefs/SUNWcsl/prototype_com
index cde1a248cf..c5a851188d 100644
--- a/usr/src/pkgdefs/SUNWcsl/prototype_com
+++ b/usr/src/pkgdefs/SUNWcsl/prototype_com
@@ -256,6 +256,8 @@ s none usr/lib/libsmbios.so=libsmbios.so.1
f none usr/lib/libsmbios.so.1 755 root bin
s none usr/lib/libsocket.so=../../lib/libsocket.so.1
s none usr/lib/libsocket.so.1=../../lib/libsocket.so.1
+f none usr/lib/libsoftcrypto.so.1 755 root bin
+s none usr/lib/libsoftcrypto.so=./libsoftcrypto.so.1
s none usr/lib/libsys.so=./libsys.so.1
f none usr/lib/libsys.so.1 755 root bin
s none usr/lib/libsysevent.so=../../lib/libsysevent.so.1
diff --git a/usr/src/pkgdefs/SUNWcsl/prototype_i386 b/usr/src/pkgdefs/SUNWcsl/prototype_i386
index 542bea8cdf..2dbc0b7a55 100644
--- a/usr/src/pkgdefs/SUNWcsl/prototype_i386
+++ b/usr/src/pkgdefs/SUNWcsl/prototype_i386
@@ -49,6 +49,8 @@ d none usr/lib/libc 755 root bin
f none usr/lib/libc/libc_hwcap1.so.1 755 root bin
f none usr/lib/libc/libc_hwcap2.so.1 755 root bin
f none usr/lib/libc/libc_hwcap3.so.1 755 root bin
+d none usr/lib/libsoftcrypto 755 root bin
+f none usr/lib/libsoftcrypto/libsoftcrypto_hwcap1.so.1 755 root bin
d none usr/ccs/lib/amd64 755 root bin
s none usr/ccs/lib/amd64/libcurses.so=../../../../lib/amd64/libcurses.so.1
s none usr/ccs/lib/amd64/libform.so=../../../lib/amd64/libform.so.1
@@ -339,6 +341,8 @@ s none usr/lib/amd64/libsmbios.so=libsmbios.so.1
f none usr/lib/amd64/libsmbios.so.1 755 root bin
s none usr/lib/amd64/libsocket.so.1=../../../lib/amd64/libsocket.so.1
s none usr/lib/amd64/libsocket.so=../../../lib/amd64/libsocket.so.1
+f none usr/lib/amd64/libsoftcrypto.so.1 755 root bin
+s none usr/lib/amd64/libsoftcrypto.so=./libsoftcrypto.so.1
s none usr/lib/amd64/libsysevent.so=../../../lib/amd64/libsysevent.so.1
s none usr/lib/amd64/libsysevent.so.1=../../../lib/amd64/libsysevent.so.1
s none usr/lib/amd64/libtermcap.so=../../../lib/amd64/libcurses.so.1
diff --git a/usr/src/pkgdefs/SUNWcsl/prototype_sparc b/usr/src/pkgdefs/SUNWcsl/prototype_sparc
index 407cbed963..34c13f8146 100644
--- a/usr/src/pkgdefs/SUNWcsl/prototype_sparc
+++ b/usr/src/pkgdefs/SUNWcsl/prototype_sparc
@@ -327,6 +327,8 @@ f none usr/lib/sparcv9/libsmbios.so.1 755 root bin
s none usr/lib/sparcv9/libsmbios.so=libsmbios.so.1
s none usr/lib/sparcv9/libsocket.so.1=../../../lib/sparcv9/libsocket.so.1
s none usr/lib/sparcv9/libsocket.so=../../../lib/sparcv9/libsocket.so.1
+f none usr/lib/sparcv9/libsoftcrypto.so.1 755 root bin
+s none usr/lib/sparcv9/libsoftcrypto.so=./libsoftcrypto.so.1
s none usr/lib/sparcv9/libsysevent.so.1=../../../lib/sparcv9/libsysevent.so.1
s none usr/lib/sparcv9/libsysevent.so=../../../lib/sparcv9/libsysevent.so.1
s none usr/lib/sparcv9/libtermcap.so=../../../lib/sparcv9/libcurses.so.1
diff --git a/usr/src/pkgdefs/SUNWkvm.u/prototype_com b/usr/src/pkgdefs/SUNWkvm.u/prototype_com
index ba60752e93..b369687c3f 100644
--- a/usr/src/pkgdefs/SUNWkvm.u/prototype_com
+++ b/usr/src/pkgdefs/SUNWkvm.u/prototype_com
@@ -22,8 +22,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
# This required package information file contains a list of package contents.
# The 'pkgmk' command uses this file to identify the contents of a package
# and their location on the development machine when building the package.
@@ -164,40 +162,73 @@ s none usr/platform/SUNW,UltraSPARC-IIe-NetraCT-40/lib/libprtdiag_psr.so.1=../..
# create lib directory for sun4u and for all other sun4u platforms
#
d none usr/platform/sun4u/lib 755 root bin
+d none usr/platform/sun4u/lib/sparcv9 755 root bin
d none usr/platform/sun4u-us3/lib 755 root bin
d none usr/platform/sun4u-opl/lib 755 root bin
d none usr/platform/SUNW,SPARC-Enterprise/lib 755 root bin
+d none usr/platform/SUNW,SPARC-Enterprise/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Ultra-2/lib 755 root bin
+d none usr/platform/SUNW,Ultra-2/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Ultra-250/lib 755 root bin
+d none usr/platform/SUNW,Ultra-250/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Ultra-4/lib 755 root bin
+d none usr/platform/SUNW,Ultra-4/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Ultra-Enterprise/lib 755 root bin
+d none usr/platform/SUNW,Ultra-Enterprise/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Ultra-Enterprise-10000/lib 755 root bin
+d none usr/platform/SUNW,Ultra-Enterprise-10000/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Sun-Blade-100/lib 755 root bin
+d none usr/platform/SUNW,Sun-Blade-100/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Sun-Blade-1000/lib 755 root bin
+d none usr/platform/SUNW,Sun-Blade-1000/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Sun-Blade-1500/lib 755 root bin
+d none usr/platform/SUNW,Sun-Blade-1500/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Sun-Blade-2500/lib 755 root bin
+d none usr/platform/SUNW,Sun-Blade-2500/lib/sparcv9 755 root bin
d none usr/platform/SUNW,A70/lib 755 root bin
+d none usr/platform/SUNW,A70/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Sun-Fire-V445/lib 755 root bin
+d none usr/platform/SUNW,Sun-Fire-V445/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Sun-Fire-V215/lib 755 root bin
+d none usr/platform/SUNW,Sun-Fire-V215/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Sun-Fire/lib 755 root bin
+d none usr/platform/SUNW,Sun-Fire/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Sun-Fire-V240/lib 755 root bin
+d none usr/platform/SUNW,Sun-Fire-V240/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Sun-Fire-V250/lib 755 root bin
+d none usr/platform/SUNW,Sun-Fire-V250/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Sun-Fire-V440/lib 755 root bin
+d none usr/platform/SUNW,Sun-Fire-V440/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Sun-Fire-280R/lib 755 root bin
+d none usr/platform/SUNW,Sun-Fire-280R/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Sun-Fire-15000/lib 755 root bin
+d none usr/platform/SUNW,Sun-Fire-15000/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Sun-Fire-880/lib 755 root bin
+d none usr/platform/SUNW,Sun-Fire-880/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Sun-Fire-480R/lib 755 root bin
+d none usr/platform/SUNW,Sun-Fire-480R/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Sun-Fire-V890/lib 755 root bin
+d none usr/platform/SUNW,Sun-Fire-V890/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Sun-Fire-V490/lib 755 root bin
+d none usr/platform/SUNW,Sun-Fire-V490/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Serverblade1/lib 755 root bin
+d none usr/platform/SUNW,Serverblade1/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Netra-T4/lib 755 root bin
+d none usr/platform/SUNW,Netra-T4/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Netra-T12/lib 755 root bin
+d none usr/platform/SUNW,Netra-T12/lib/sparcv9 755 root bin
d none usr/platform/SUNW,UltraSPARC-IIi-Netract/lib 755 root bin
+d none usr/platform/SUNW,UltraSPARC-IIi-Netract/lib/sparcv9 755 root bin
d none usr/platform/SUNW,UltraSPARC-IIe-NetraCT-40/lib 755 root bin
+d none usr/platform/SUNW,UltraSPARC-IIe-NetraCT-40/lib/sparcv9 755 root bin
d none usr/platform/SUNW,UltraSPARC-IIe-NetraCT-60/lib 755 root bin
+d none usr/platform/SUNW,UltraSPARC-IIe-NetraCT-60/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Netra-CP2300/lib 755 root bin
+d none usr/platform/SUNW,Netra-CP2300/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Netra-CP3010/lib 755 root bin
+d none usr/platform/SUNW,Netra-CP3010/lib/sparcv9 755 root bin
d none usr/platform/TAD,SPARCLE/lib 755 root bin
+d none usr/platform/TAD,SPARCLE/lib/sparcv9 755 root bin
#
# create sun4u/lib/cfgadm and links to it for each sun4u platform
#
@@ -340,3 +371,74 @@ s none usr/platform/SUNW,Sun-Fire-V215/lib/librsc.so=../../SUNW,Sun-Fire-V240/li
# make link for Netra-440 from Sun-Fire-V440, basically the same hardware in
# a different case
s none usr/platform/SUNW,Netra-440=SUNW,Sun-Fire-V440
+
+#
+# add libsoftcrypto library
+#
+f none usr/platform/sun4u/lib/libsoftcrypto_psr.so.1 755 root bin
+f none usr/platform/sun4u/lib/sparcv9/libsoftcrypto_psr.so.1 755 root bin
+
+s none usr/platform/SUNW,Ultra-2/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Ultra-2/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Ultra-4/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Ultra-4/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Ultra-250/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Ultra-250/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Ultra-Enterprise/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Ultra-Enterprise/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Ultra-Enterprise-10000/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Ultra-Enterprise-10000/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,UltraSPARC-IIi-Netract/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,UltraSPARC-IIi-Netract/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,UltraSPARC-IIe-NetraCT-40/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,UltraSPARC-IIe-NetraCT-40/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,UltraSPARC-IIe-NetraCT-60/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,UltraSPARC-IIe-NetraCT-60/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Blade-100/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Blade-100/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Blade-1000/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Blade-1000/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Blade-1500/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Blade-1500/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Blade-2500/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Blade-2500/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,A70/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,A70/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Fire/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Fire/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Fire-V215/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Fire-V215/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Fire-V240/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Fire-V240/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Fire-V250/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Fire-V250/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Fire-V440/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Fire-V440/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Fire-V445/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Fire-V445/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Fire-280R/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Fire-280R/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Fire-15000/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Fire-15000/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Fire-880/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Fire-880/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Fire-480R/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Fire-480R/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Fire-V890/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Fire-V890/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Fire-V490/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Fire-V490/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Serverblade1/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Serverblade1/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Netra-T12/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Netra-T12/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Netra-T4/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Netra-T4/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Netra-CP2300/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Netra-CP2300/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Netra-CP3010/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Netra-CP3010/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/TAD,SPARCLE/lib/libsoftcrypto_psr.so.1=../../sun4u/lib/libsoftcrypto_psr.so.1
+s none usr/platform/TAD,SPARCLE/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4u/lib/sparcv9/libsoftcrypto_psr.so.1
+
+
diff --git a/usr/src/pkgdefs/SUNWkvmt200.v/prototype_com b/usr/src/pkgdefs/SUNWkvmt200.v/prototype_com
index 414dac87a6..260f090340 100644
--- a/usr/src/pkgdefs/SUNWkvmt200.v/prototype_com
+++ b/usr/src/pkgdefs/SUNWkvmt200.v/prototype_com
@@ -69,15 +69,26 @@ s none usr/platform/SUNW,Netra-T5440/sbin=../sun4v/sbin
# create lib directory
#
d none usr/platform/SUNW,Sun-Fire-T200/lib 755 root bin
+d none usr/platform/SUNW,Sun-Fire-T200/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Netra-CP3060/lib 755 root bin
+d none usr/platform/SUNW,Netra-CP3060/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Netra-CP3260/lib 755 root bin
+d none usr/platform/SUNW,Netra-CP3260/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Sun-Blade-T6300/lib 755 root bin
+d none usr/platform/SUNW,Sun-Blade-T6300/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Sun-Blade-T6320/lib 755 root bin
+d none usr/platform/SUNW,Sun-Blade-T6320/lib/sparcv9 755 root bin
d none usr/platform/SUNW,SPARC-Enterprise-T5120/lib 755 root bin
+d none usr/platform/SUNW,SPARC-Enterprise-T5120/lib/sparcv9 755 root bin
d none usr/platform/SUNW,T5140/lib 755 root bin
+d none usr/platform/SUNW,T5140/lib/sparcv9 755 root bin
d none usr/platform/SUNW,USBRDT-5240/lib 755 root bin
+d none usr/platform/SUNW,USBRDT-5240/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Netra-T5220/lib 755 root bin
+d none usr/platform/SUNW,Netra-T5220/lib/sparcv9 755 root bin
d none usr/platform/SUNW,Netra-T5440/lib 755 root bin
+d none usr/platform/SUNW,Netra-T5440/lib/sparcv9 755 root bin
+
#
# add binary and libraries for prtdiag
#
@@ -111,6 +122,35 @@ s none usr/platform/SUNW,Netra-T5220/lib/libpcp.so.1=../../sun4v/lib/libpcp.so.1
s none usr/platform/SUNW,Netra-T5440/lib/libpcp.so.1=../../sun4v/lib/libpcp.so.1
#
+# adding libsoftcrypto links
+#
+d none usr/platform/sun4v 755 root sys
+d none usr/platform/sun4v/lib 755 root bin
+d none usr/platform/sun4v/lib/sparcv9 755 root bin
+f none usr/platform/sun4v/lib/libsoftcrypto_psr.so.1 755 root bin
+f none usr/platform/sun4v/lib/sparcv9/libsoftcrypto_psr.so.1 755 root bin
+s none usr/platform/SUNW,Sun-Fire-T200/lib/libsoftcrypto_psr.so.1=../../sun4v/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Fire-T200/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4v/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Netra-CP3060/lib/libsoftcrypto_psr.so.1=../../sun4v/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Netra-CP3060/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4v/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Netra-CP3260/lib/libsoftcrypto_psr.so.1=../../sun4v/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Netra-CP3260/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4v/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Netra-T5220/lib/libsoftcrypto_psr.so.1=../../sun4v/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Netra-T5220/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4v/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Netra-T5440/lib/libsoftcrypto_psr.so.1=../../sun4v/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Netra-T5440/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4v/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Blade-T6300/lib/libsoftcrypto_psr.so.1=../../sun4v/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Blade-T6300/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4v/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Blade-T6320/lib/libsoftcrypto_psr.so.1=../../sun4v/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,Sun-Blade-T6320/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4v/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,SPARC-Enterprise-T5120/lib/libsoftcrypto_psr.so.1=../../sun4v/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,SPARC-Enterprise-T5120/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4v/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,T5140/lib/libsoftcrypto_psr.so.1=../../sun4v/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,T5140/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4v/lib/sparcv9/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,USBRDT-5240/lib/libsoftcrypto_psr.so.1=../../sun4v/lib/libsoftcrypto_psr.so.1
+s none usr/platform/SUNW,USBRDT-5240/lib/sparcv9/libsoftcrypto_psr.so.1=../../../sun4v/lib/sparcv9/libsoftcrypto_psr.so.1
+
+#
# platform-dependent boot object
#
s none usr/platform/SUNW,Sun-Fire-T200/lib/fs=../../sun4v/lib/fs
@@ -164,8 +204,6 @@ s none usr/platform/SUNW,Netra-CP3060/sbin/trapstat=../../sun4v/sbin/trapstat
#
# add library for tsalarm
#
-d none usr/platform/sun4v 755 root sys
-d none usr/platform/sun4v/lib 755 root bin
f none usr/platform/sun4v/lib/libtsalarm.so.1 644 root bin
s none usr/platform/sun4v/lib/libtsalarm.so=./libtsalarm.so.1
d none usr/platform/sun4v/include 755 root bin
diff --git a/usr/src/pkgdefs/etc/exception_list_i386 b/usr/src/pkgdefs/etc/exception_list_i386
index a4320e8aac..b1e9fcaac3 100644
--- a/usr/src/pkgdefs/etc/exception_list_i386
+++ b/usr/src/pkgdefs/etc/exception_list_i386
@@ -64,6 +64,9 @@ usr/lib/llib-lcryptoutil i386
usr/lib/amd64/llib-lcryptoutil.ln i386
usr/include/cryptoutil.h i386
usr/include/libelfsign.h i386
+usr/lib/llib-lsoftcrypto i386
+usr/lib/llib-lsoftcrypto.ln i386
+usr/lib/amd64/llib-lsoftcrypto.ln i386
#
# The following files are used by the DHCP service, the
# standalone's DHCP implementation, and the kernel (nfs_dlboot).
diff --git a/usr/src/pkgdefs/etc/exception_list_sparc b/usr/src/pkgdefs/etc/exception_list_sparc
index 1144b94dcd..9aa99581e5 100644
--- a/usr/src/pkgdefs/etc/exception_list_sparc
+++ b/usr/src/pkgdefs/etc/exception_list_sparc
@@ -53,6 +53,9 @@ usr/lib/llib-lcryptoutil sparc
usr/lib/sparcv9/llib-lcryptoutil.ln sparc
usr/include/cryptoutil.h sparc
usr/include/libelfsign.h sparc
+usr/lib/llib-lsoftcrypto sparc
+usr/lib/llib-lsoftcrypto.ln sparc
+usr/lib/sparcv9/llib-lsoftcrypto.ln sparc
#
# The following files are used by libdhcpsvc, the
# standalone's DHCP implementation, and the kernel (nfs_dlboot).