xref: /illumos-gate/usr/src/cmd/smbsrv/test-crypt/README (revision 4f0ce1da2aeae875aeb13640b681d0ad37a3036b)
1*4f0ce1daSGordon Ross
2*4f0ce1daSGordon Ross#
3*4f0ce1daSGordon Ross# This file and its contents are supplied under the terms of the
4*4f0ce1daSGordon Ross# Common Development and Distribution License ("CDDL"), version 1.0.
5*4f0ce1daSGordon Ross# You may only use this file in accordance with the terms of version
6*4f0ce1daSGordon Ross# 1.0 of the CDDL.
7*4f0ce1daSGordon Ross#
8*4f0ce1daSGordon Ross# A full copy of the text of the CDDL should have accompanied this
9*4f0ce1daSGordon Ross# source.  A copy of the CDDL is also available via the Internet at
10*4f0ce1daSGordon Ross# http://www.illumos.org/license/CDDL.
11*4f0ce1daSGordon Ross#
12*4f0ce1daSGordon Ross
13*4f0ce1daSGordon Ross#
14*4f0ce1daSGordon Ross# Copyright 2021 Tintri by DDN, Inc. All rights reserved.
15*4f0ce1daSGordon Ross#
16*4f0ce1daSGordon Ross
17*4f0ce1daSGordon RossThis directory contains a simple test of the encrypt/decrypt interfaces
18*4f0ce1daSGordon Rossdescribed by smbsrv/smb_kcrypt.h
19*4f0ce1daSGordon Ross
20*4f0ce1daSGordon RossTo build the tests:
21*4f0ce1daSGordon Ross	make install
22*4f0ce1daSGordon Ross
23*4f0ce1daSGordon RossTo run the tests: (on the build system)
24*4f0ce1daSGordon Ross	./Run.sh
25*4f0ce1daSGordon Ross
26*4f0ce1daSGordon RossFor debugging, start by uncommenting the dtrace lines in the
27*4f0ce1daSGordon RossRun.sh script, and/or run with gdb (see .gdbrc)
28*4f0ce1daSGordon Ross
29*4f0ce1daSGordon RossIf you need to debug in the crypto provider libraries (or even just
30*4f0ce1daSGordon Rosslook with gdb) it's easiest to run with a customized pkcs11.conf
31*4f0ce1daSGordon RossSee how the Run.sh file sets the environment for that.
32*4f0ce1daSGordon RossYour custom pkcs11.conf file should look like this:
33*4f0ce1daSGordon Ross(Substitute your own WS root in there.)
34*4f0ce1daSGordon Ross
35*4f0ce1daSGordon Ross# Start SUNWcsr
36*4f0ce1daSGordon Rossmetaslot:metaslot_status=enabled;metaslot_auto_key_migrate=enabled;metaslot_token=Sun Software PKCS#11 softtoken;metaslot_slot=Sun Crypto Softtoken
37*4f0ce1daSGordon Ross/tank/ws2/il-fc-smb/proto/root_i386/usr/lib/security/$ISA/pkcs11_kernel.so
38*4f0ce1daSGordon Ross/tank/ws2/il-fc-smb/proto/root_i386/usr/lib/security/$ISA/pkcs11_softtoken.so
39*4f0ce1daSGordon Ross/tank/ws2/il-fc-smb/proto/root_i386/usr/lib/security/$ISA/pkcs11_tpm.so
40*4f0ce1daSGordon Ross# End SUNWcsr
41