Tests: loading "engine:..." keys with certificate variable.
diff --git a/ssl_engine_keys.t b/ssl_engine_keys.t
index 9bc689f..7c21400 100644
--- a/ssl_engine_keys.t
+++ b/ssl_engine_keys.t
@@ -28,7 +28,7 @@
 	unless $ENV{TEST_NGINX_UNSAFE};
 
 my $t = Test::Nginx->new()->has(qw/http proxy http_ssl/)->has_daemon('openssl')
-	->has_daemon('softhsm')->has_daemon('pkcs11-tool')->plan(1);
+	->has_daemon('softhsm')->has_daemon('pkcs11-tool');
 
 $t->write_file_expand('nginx.conf', <<'EOF');
 
@@ -53,9 +53,28 @@
         location / {
             # index index.html by default
         }
+
         location /proxy {
             proxy_pass https://127.0.0.1:8081/;
         }
+
+        location /var {
+            proxy_pass https://127.0.0.1:8082/;
+            proxy_ssl_name localhost;
+            proxy_ssl_server_name on;
+        }
+    }
+
+    server {
+        listen       127.0.0.1:8082 ssl;
+        server_name  localhost;
+
+        ssl_certificate $ssl_server_name.crt;
+        ssl_certificate_key engine:pkcs11:slot_0-id_00;
+
+        location / {
+            # index index.html by default
+        }
     }
 }
 
@@ -118,12 +137,13 @@
 		or die "Can't create certificate for $name: $!\n";
 }
 
-$t->run();
+$t->try_run('no ssl_certificate variables')->plan(2);
 
 $t->write_file('index.html', '');
 
 ###############################################################################
 
 like(http_get('/proxy'), qr/200 OK/, 'ssl engine keys');
+like(http_get('/var'), qr/200 OK/, 'ssl_certificate with variable');
 
 ###############################################################################