diff options
author | Omar Polo <op@omarpolo.com> | 2022-01-01 16:33:44 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2022-01-01 16:33:44 +0000 |
commit | d49093c105e7e9af2638bce945374ac0036b3498 (patch) | |
tree | 813102bedbdfb4ead9fe520c2dea30b966a02578 /parse.y | |
parent | da2185f37f70f8665c4d800f8f9bbf4027fd7b81 (diff) |
support optional client certificate for proxy rule
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -353,7 +353,21 @@ proxy_opts : /* empty */ | proxy_opts proxy_opt optnl ; -proxy_opt : RELAY_TO string { +proxy_opt : CERT string { + only_once(loc->proxy_cert, "proxy cert"); + ensure_absolute_path($2); + loc->proxy_cert = tls_load_file($2, &loc->proxy_cert_len, NULL); + if (loc->proxy_cert == NULL) + yyerror("can't load cert %s", $2); + } + | KEY string { + only_once(loc->proxy_key, "proxy key"); + ensure_absolute_path($2); + loc->proxy_key = tls_load_file($2, &loc->proxy_key_len, NULL); + if (loc->proxy_key == NULL) + yyerror("can't load key %s", $2); + } + | RELAY_TO string { char *at; const char *errstr; |