Skip to content

Commit 6c2084b

Browse files
committed
fixup! Tests: test for loading "store:..." keys.
Use ssl_password_file with pkcs11-module-cache-pins for provider test.
1 parent 719042d commit 6c2084b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ssl_provider_keys.t

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ http {
6161
ssl_certificate localhost.crt;
6262
ssl_certificate_key "store:pkcs11:token=NginxZero;object=nx_key_0";
6363
64+
ssl_password_file pin.txt;
65+
6466
location / {
6567
# index index.html by default
6668
}
@@ -83,6 +85,8 @@ http {
8385
ssl_certificate $ssl_server_name.crt;
8486
ssl_certificate_key "store:pkcs11:token=NginxZero;object=nx_key_0";
8587
88+
ssl_password_file pin.txt;
89+
8690
location / {
8791
# index index.html by default
8892
}
@@ -133,7 +137,7 @@ activate = 1
133137
134138
[pkcs11_sect]
135139
pkcs11-module-path = $libsofthsm2_path
136-
pkcs11-module-token-pin = file:$d/pin.txt
140+
pkcs11-module-cache-pins = cache
137141
# https://github.com/latchset/pkcs11-provider/commit/ab6370fd
138142
pkcs11-module-quirks = no-deinit no-operation-state
139143
activate = 1
@@ -173,7 +177,7 @@ foreach my $name ('localhost') {
173177

174178
system('openssl req -x509 -new '
175179
. "-subj /CN=$name/ -out $d/$name.crt -text "
176-
. "-key 'pkcs11:token=NginxZero;object=nx_key_0' "
180+
. "-key 'pkcs11:token=NginxZero;object=nx_key_0' -passin pass:1234"
177181
. ">>$d/openssl.out 2>&1") == 0
178182
or plan(skip_all => "missing pkcs11-provider");
179183
}

0 commit comments

Comments
 (0)