Skip to content

Commit

Permalink
tests: t/163-ssl-two-verification.t:add CN verification log.
Browse files Browse the repository at this point in the history
Signed-off-by:  lijunlong <[email protected]>
  • Loading branch information
ZJfans authored Aug 23, 2023
1 parent ec976a6 commit d23c278
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion t/163-ssl-two-verification.t
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ my $openssl_version = eval { `$NginxBinary -V 2>&1` };
if ($openssl_version =~ m/built with OpenSSL (0\S*|1\.0\S*|1\.1\.0\S*)/) {
plan(skip_all => "too old OpenSSL, need 1.1.1, was $1");
} else {
plan tests => repeat_each() * (blocks() * 6);
plan tests => repeat_each() * (blocks() * 7);
}

$ENV{TEST_NGINX_HTML_DIR} ||= html_dir();
Expand Down Expand Up @@ -40,6 +40,9 @@ __DATA__
ssl_verify_client on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

log_by_lua_block {
ngx.log(ngx.INFO, "ssl_client_s_dn: ", ngx.var.ssl_client_s_dn)
}
return 'it works!\n';
}
--- stream_server_config
Expand Down Expand Up @@ -94,6 +97,7 @@ close: 1 nil

--- error_log
lua ssl server name: "test.com"
ssl_client_s_dn: [email protected],CN=test.com,OU=OpenResty,O=OpenResty,L=San Francisco,ST=California,C=US

--- no_error_log
[error]
Expand Down

0 comments on commit d23c278

Please sign in to comment.