Home | History | Annotate | Download | only in vpn

Lines Matching defs:driver_

109         driver_(new OpenVPNDriver(&control_, &dispatcher_, &metrics_, &manager_,
112 &manager_, driver_)),
119 driver_->management_server_.reset(management_server_);
120 driver_->certificate_file_.reset(certificate_file_); // Passes ownership.
121 driver_->extra_certificates_file_.reset(
124 driver_->openvpn_config_directory_ =
131 driver_->default_service_callback_tag_ = 0;
132 driver_->pid_ = 0;
133 driver_->device_ = nullptr;
134 driver_->service_ = nullptr;
159 driver_->args()->SetString(arg, value);
163 driver_->args()->SetStrings(arg, value);
167 return driver_->args();
179 driver_->args()->RemoveString(arg);
188 return driver_->InitManagementChannelOptions(options, error);
192 return &driver_->sockets_;
196 driver_->device_ = device;
200 driver_->service_ = service;
204 return driver_->service_;
208 driver_->OnConnectionDisconnected();
212 driver_->OnConnectTimeout();
216 driver_->StartConnectTimeout(timeout_seconds);
220 return driver_->IsConnectTimeoutStarted();
264 OpenVPNDriver* driver_; // Owned by |service_|.
267 MockCertificateFile* certificate_file_; // Owned by |driver_|.
268 MockCertificateFile* extra_certificates_file_; // Owned by |driver_|.
271 // Owned by |driver_|.
337 EXPECT_EQ(OpenVPNDriver::kLSBReleaseFile, driver_->lsb_release_file_.value());
338 driver_->lsb_release_file_ = lsb_release_file_;
347 driver_->Connect(service_, &error);
349 EXPECT_EQ(kInterfaceName, driver_->tunnel_interface_);
350 EXPECT_TRUE(driver_->IsConnectTimeoutStarted());
358 driver_->Connect(service_, &error);
360 EXPECT_TRUE(driver_->tunnel_interface_.empty());
361 EXPECT_FALSE(driver_->IsConnectTimeoutStarted());
374 driver_->service_ = service_;
375 driver_->device_ = device_;
379 driver_->Notify("up", config);
380 EXPECT_FALSE(driver_->IsConnectTimeoutStarted());
384 driver_->ip_properties_.address = "1.2.3.4";
387 driver_->Notify("up", config);
392 driver_->service_ = service_;
393 driver_->device_ = device_;
414 driver_->InitPropertyStore(&store);
436 driver_->Notify("up", config);
491 driver_->device_ = device_;
494 driver_->Notify("fail", dict);
495 EXPECT_TRUE(driver_->IsConnectTimeoutStarted());
638 driver_->ParseIPConfiguration(config, &props);
643 driver_->ParseIPConfiguration(config, &props);
649 driver_->ParseIPConfiguration(config, &props);
670 driver_->ParseIPConfiguration(config, &props);
698 driver_->ParseIPConfiguration(config, &props_without_gateway);
705 driver_->ParseIPConfiguration(config, &props_with_override);
712 driver_->InitOptions(&options, &error);
728 driver_->rpc_task_.reset(new RPCTask(&control_, this));
729 driver_->tunnel_interface_ = kInterfaceName;
735 driver_->InitOptions(&options, &error);
743 EXPECT_EQ(kInterfaceName, driver_->tunnel_interface_);
744 ASSERT_FALSE(driver_->tls_auth_file_.empty());
745 ExpectInFlags(options, "tls-auth", driver_->tls_auth_file_.value());
747 EXPECT_TRUE(base::ReadFileToString(driver_->tls_auth_file_, &contents));
758 driver_->rpc_task_.reset(new RPCTask(&control_, this));
759 driver_->tunnel_interface_ = kInterfaceName;
765 driver_->InitOptions(&options, &error);
777 EXPECT_TRUE(driver_->InitCAOptions(&options, &error));
783 EXPECT_TRUE(driver_->InitCAOptions(&options, &error));
789 EXPECT_TRUE(driver_->InitCAOptions(&options, &error));
797 EXPECT_TRUE(driver_->InitCAOptions(&options, &error));
804 EXPECT_FALSE(driver_->InitCAOptions(&options, &error));
819 EXPECT_FALSE(driver_->InitCAOptions(&options, &error));
825 EXPECT_TRUE(driver_->InitCAOptions(&options, &error));
835 driver_->InitCertificateVerifyOptions(&options);
845 driver_->InitCertificateVerifyOptions(&options);
855 driver_->InitCertificateVerifyOptions(&options);
863 driver_->InitCertificateVerifyOptions(&options);
873 driver_->InitClientAuthOptions(&options);
881 driver_->InitClientAuthOptions(&options);
889 driver_->InitClientAuthOptions(&options);
896 driver_->InitClientAuthOptions(&options);
904 driver_->InitClientAuthOptions(&options);
914 driver_->InitClientAuthOptions(&options);
923 driver_->InitClientAuthOptions(&options);
933 driver_->InitClientAuthOptions(&options);
942 driver_->InitClientAuthOptions(&options);
953 EXPECT_TRUE(driver_->InitExtraCertOptions(&options, &error));
962 EXPECT_TRUE(driver_->InitExtraCertOptions(&options, &error));
977 EXPECT_FALSE(driver_->InitExtraCertOptions(&options, &error));
985 EXPECT_TRUE(driver_->InitExtraCertOptions(&options, &error));
993 driver_->InitPKCS11Options(&options);
998 driver_->InitPKCS11Options(&options);
1005 driver_->InitPKCS11Options(&options);
1046 driver_->InitLoggingOptions(&options);
1051 driver_->InitLoggingOptions(&options);
1056 driver_->InitLoggingOptions(&options);
1061 driver_->InitLoggingOptions(&options);
1071 driver_->AppendValueOption("OpenVPN.UnknownProperty", kOption, &options));
1075 EXPECT_FALSE(driver_->AppendValueOption(kProperty, kOption, &options));
1080 EXPECT_TRUE(driver_->AppendValueOption(kProperty, kOption, &options));
1081 EXPECT_TRUE(driver_->AppendValueOption(kProperty2, kOption2, &options));
1092 driver_->AppendDelimitedValueOption(
1098 driver_->AppendDelimitedValueOption(kProperty, kOption, ' ', &options));
1104 EXPECT_TRUE(driver_->AppendDelimitedValueOption(
1106 EXPECT_TRUE(driver_->AppendDelimitedValueOption(
1118 driver_->AppendFlag("OpenVPN.UnknownProperty", kOption, &options));
1123 EXPECT_TRUE(driver_->AppendFlag(kProperty, kOption, &options));
1124 EXPECT_TRUE(driver_->AppendFlag(kProperty2, kOption2, &options));
1131 driver_->tunnel_interface_ = kInterfaceName;
1132 EXPECT_FALSE(driver_->ClaimInterface(string(kInterfaceName) + "XXX",
1134 EXPECT_FALSE(driver_->device_);
1145 EXPECT_EQ(0, driver_->default_service_callback_tag_);
1148 EXPECT_TRUE(driver_->ClaimInterface(kInterfaceName, kInterfaceIndex));
1149 ASSERT_TRUE(driver_->device_);
1150 EXPECT_EQ(kInterfaceIndex, driver_->device_->interface_index());
1151 EXPECT_EQ(kServiceCallbackTag, driver_->default_service_callback_tag_);
1157 driver_->IdleService();
1164 driver_->FailService(Service::kFailureConnect, kErrorDetails);
1170 driver_->Cleanup(Service::kStateIdle,
1177 driver_->default_service_callback_tag_ = kServiceCallbackTag;
1178 driver_->pid_ = kPID;
1179 driver_->rpc_task_.reset(new RPCTask(&control_, this));
1180 driver_->tunnel_interface_ = kInterfaceName;
1181 driver_->device_ = device_;
1182 driver_->service_ = service_;
1183 driver_->ip_properties_.address = "1.2.3.4";
1189 driver_->tls_auth_file_ = tls_auth_file;
1201 driver_->Cleanup(
1203 EXPECT_EQ(0, driver_->default_service_callback_tag_);
1204 EXPECT_EQ(0, driver_->pid_);
1205 EXPECT_FALSE(driver_->rpc_task_.get());
1206 EXPECT_TRUE(driver_->tunnel_interface_.empty());
1207 EXPECT_FALSE(driver_->device_);
1208 EXPECT_FALSE(driver_->service_);
1211 EXPECT_TRUE(driver_->tls_auth_file_.empty());
1212 EXPECT_TRUE(driver_->ip_properties_.address.empty());
1213 EXPECT_FALSE(driver_->IsConnectTimeoutStarted());
1219 EXPECT_FALSE(driver_->SpawnOpenVPN());
1223 driver_->tunnel_interface_ = "tun0";
1224 driver_->rpc_task_.reset(new RPCTask(&control_, this));
1237 EXPECT_FALSE(driver_->SpawnOpenVPN());
1238 EXPECT_TRUE(driver_->SpawnOpenVPN());
1239 EXPECT_EQ(kPID, driver_->pid_);
1244 driver_->device_ = device_;
1245 driver_->pid_ = kPID;
1250 driver_->OnOpenVPNDied(2);
1251 EXPECT_EQ(0, driver_->pid_);
1255 driver_->device_ = device_;
1256 driver_->service_ = service_;
1261 driver_->Disconnect();
1262 EXPECT_FALSE(driver_->device_);
1263 EXPECT_FALSE(driver_->service_);
1303 driver_->OnReconnecting(OpenVPNDriver::kReconnectReasonUnknown);
1313 driver_->OnReconnecting(OpenVPNDriver::kReconnectReasonOffline);
1317 driver_->OnReconnecting(OpenVPNDriver::kReconnectReasonUnknown);
1321 driver_->OnReconnecting(OpenVPNDriver::kReconnectReasonTLSError);
1323 driver_->OnReconnecting(OpenVPNDriver::kReconnectReasonTLSError);
1330 driver_->InitPropertyStore(&store);
1340 driver_->InitPropertyStore(&store);
1366 ASSERT_EQ(expected, driver_->GetEnvironment());
1369 EXPECT_EQ(0, driver_->GetEnvironment().size());
1388 driver_->service_ = service_;
1392 driver_->OnDefaultServiceChanged(null_service);
1395 driver_->OnDefaultServiceChanged(service_);
1402 driver_->OnDefaultServiceChanged(mock_service);
1406 driver_->OnDefaultServiceChanged(mock_service);
1436 EXPECT_TRUE(driver_->WriteConfigFile(options, &config_file));