File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ plan(skip_all => 'may not work, leaves coredump')
28
28
unless $ENV {TEST_NGINX_UNSAFE };
29
29
30
30
my $t = Test::Nginx-> new()-> has(qw/ http proxy http_ssl/ )-> has_daemon(' openssl' )
31
- -> has_daemon(' softhsm2-util' )-> has_daemon( ' pkcs11-tool ' ) ;
31
+ -> has_daemon(' softhsm2-util' );
32
32
33
33
$t -> write_file_expand(' nginx.conf' , <<'EOF' );
34
34
@@ -151,9 +151,14 @@ foreach my $name ('localhost') {
151
151
. ' --pin 1234 --so-pin 1234 '
152
152
. " >>$d /openssl.out 2>&1" );
153
153
154
- system (" pkcs11-tool --module=$libsofthsm2_path "
155
- . ' -p 1234 -l -k -d 0 -a nx_key_0 --key-type rsa:2048 '
156
- . " >>$d /openssl.out 2>&1" );
154
+ system (" openssl genrsa -out $d /$name .key 2048 "
155
+ . " >>$d /openssl.out 2>&1" ) == 0
156
+ or die " Can't create private key: $! \n " ;
157
+
158
+ system (" softhsm2-util --import $d /$name .key --id 00 --label nx_key_0 "
159
+ . ' --token NginxZero --pin 1234 '
160
+ . " >>$d /openssl.out 2>&1" ) == 0
161
+ or die " Can't import private key: $! \n " ;
157
162
158
163
system (' openssl req -x509 -new '
159
164
. " -subj /CN=$name / -out $d /$name .crt -text "
You can’t perform that action at this time.
0 commit comments