77 |
|
bind, |
78 |
|
file, |
79 |
|
ciph, |
80 |
+ |
cert, |
81 |
|
rpass, |
82 |
|
spass, |
83 |
|
class; |
298 |
|
%token T_EXTERNAL |
299 |
|
%token T_FARCONNECT |
300 |
|
%token T_FILE |
301 |
+ |
%token T_FINGERPRINT |
302 |
|
%token T_FULL |
303 |
|
%token T_GLOBOPS |
304 |
|
%token T_INVISIBLE |
1042 |
|
nuh.hostsize = sizeof(block_state.host.buf); |
1043 |
|
split_nuh(&nuh); |
1044 |
|
|
1045 |
< |
conf = conf_make(CONF_OPER); |
1046 |
< |
conf->name = xstrdup(block_state.name.buf); |
1047 |
< |
conf->user = xstrdup(block_state.user.buf); |
1048 |
< |
conf->host = xstrdup(block_state.host.buf); |
1045 |
> |
conf = conf_make(CONF_OPER); |
1046 |
> |
conf->name = xstrdup(block_state.name.buf); |
1047 |
> |
conf->user = xstrdup(block_state.user.buf); |
1048 |
> |
conf->host = xstrdup(block_state.host.buf); |
1049 |
> |
|
1050 |
> |
if (block_state.cert.buf[0]) |
1051 |
> |
conf->certfp = xstrdup(block_state.cert.buf); |
1052 |
|
|
1053 |
|
if (block_state.rpass.buf[0]) |
1054 |
|
conf->passwd = xstrdup(block_state.rpass.buf); |
1086 |
|
oper_items: oper_items oper_item | oper_item; |
1087 |
|
oper_item: oper_name | oper_user | oper_password | |
1088 |
|
oper_umodes | oper_class | oper_encrypted | |
1089 |
< |
oper_rsa_public_key_file | oper_flags | error ';' ; |
1089 |
> |
oper_rsa_public_key_file | oper_fingerprint | |
1090 |
> |
oper_flags | error ';' ; |
1091 |
|
|
1092 |
|
oper_name: NAME '=' QSTRING ';' |
1093 |
|
{ |
1124 |
|
strlcpy(block_state.file.buf, yylval.string, sizeof(block_state.file.buf)); |
1125 |
|
}; |
1126 |
|
|
1127 |
+ |
oper_fingerprint: T_FINGERPRINT '=' QSTRING ';' |
1128 |
+ |
{ |
1129 |
+ |
if (conf_parser_ctx.pass == 2) |
1130 |
+ |
if (strlen(yylval.string) == SHA_DIGEST_LENGTH * 2) |
1131 |
+ |
strlcpy(block_state.cert.buf, yylval.string, sizeof(block_state.cert.buf)); |
1132 |
+ |
}; |
1133 |
+ |
|
1134 |
|
oper_class: CLASS '=' QSTRING ';' |
1135 |
|
{ |
1136 |
|
if (conf_parser_ctx.pass == 2) |
2057 |
|
conf->name = xstrdup(block_state.name.buf); |
2058 |
|
conf->passwd = xstrdup(block_state.rpass.buf); |
2059 |
|
conf->spasswd = xstrdup(block_state.spass.buf); |
2060 |
+ |
|
2061 |
+ |
if (block_state.cert.buf[0]) |
2062 |
+ |
conf->certfp = xstrdup(block_state.cert.buf); |
2063 |
+ |
|
2064 |
|
conf->cipher_list = xstrdup(block_state.ciph.buf); |
2065 |
|
|
2066 |
|
dlinkMoveList(&block_state.leaf.list, &conf->leaf_list); |
2093 |
|
|
2094 |
|
connect_items: connect_items connect_item | connect_item; |
2095 |
|
connect_item: connect_name | connect_host | connect_vhost | |
2096 |
< |
connect_send_password | connect_accept_password | |
2096 |
> |
connect_send_password | connect_accept_password | connect_fingerprint | |
2097 |
|
connect_aftype | connect_port | connect_ssl_cipher_list | |
2098 |
|
connect_flags | connect_hub_mask | connect_leaf_mask | |
2099 |
|
connect_class | connect_encrypted | |
2143 |
|
strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf)); |
2144 |
|
}; |
2145 |
|
|
2146 |
+ |
connect_fingerprint: T_FINGERPRINT '=' QSTRING ';' |
2147 |
+ |
{ |
2148 |
+ |
if (conf_parser_ctx.pass == 2) |
2149 |
+ |
if (strlen(yylval.string) == SHA_DIGEST_LENGTH * 2) |
2150 |
+ |
strlcpy(block_state.cert.buf, yylval.string, sizeof(block_state.cert.buf)); |
2151 |
+ |
}; |
2152 |
+ |
|
2153 |
|
connect_port: PORT '=' NUMBER ';' |
2154 |
|
{ |
2155 |
|
if (conf_parser_ctx.pass == 2) |