… | |
… | |
75 | } |
75 | } |
76 | |
76 | |
77 | sub find_profile($;%) { |
77 | sub find_profile($;%) { |
78 | my ($name, %kv) = @_; |
78 | my ($name, %kv) = @_; |
79 | |
79 | |
80 | +{ |
80 | my $norc = delete $kv{norc}; |
|
|
81 | my $force = delete $kv{force}; |
|
|
82 | |
|
|
83 | %kv = ( |
81 | monitor_timeout => 30, |
84 | monitor_timeout => 30, |
82 | connect_interval => 2, |
85 | connect_interval => 2, |
83 | framing_format => [qw(json storable)], # framing types we offer and accept, in order of preference |
86 | framing_format => [qw(json storable)], # framing types we offer and accept, in order of preference |
84 | auth_offer => [qw(tls_md6_64_256 hmac_md6_64_256)], # what we will send |
87 | auth_offer => [qw(tls_md6_64_256 hmac_md6_64_256)], # what we will send |
85 | auth_accept => [qw(tls_md6_64_256 hmac_md6_64_256 tls_anon cleartext)], # what we accept |
88 | auth_accept => [qw(tls_md6_64_256 hmac_md6_64_256 tls_anon cleartext)], # what we accept |
86 | %kv, |
89 | %kv, |
|
|
90 | ); |
|
|
91 | |
|
|
92 | unless ($norc) { |
|
|
93 | if ($force) { |
87 | _find_profile $name, |
94 | %kv = (_find_profile $name, %kv); |
|
|
95 | } else { |
|
|
96 | %kv = (%kv, _find_profile $name); |
|
|
97 | } |
88 | } |
98 | } |
|
|
99 | |
|
|
100 | \%kv |
89 | } |
101 | } |
90 | |
102 | |
91 | load; |
103 | load; |
92 | END { save } |
104 | END { save } |
93 | |
105 | |