155
157
if ( newProfileCreated && profileData->getAuthType() == VpnAccountData::cert )
161
163
void NewProfileWizard::reject()
163
165
finished = false;
167
169
void NewProfileWizard::setupPages()
170
172
// setup start page
171
page1 = new QHBox ( 0 );
173
startpage = new Q3HBox ( 0 );
172
174
// page1->setSpacing(8);
173
QLabel *setupPixmapContent1 = new QLabel ( page1 );
175
QLabel *setupPixmapContent1 = new QLabel ( startpage );
174
176
setupPixmapContent1->setPixmap ( *SetupPixmap );
175
177
setupPixmapContent1->resize ( setupPixmapContent1->sizeHint() );
176
newprofilewizardstartcontent = new NewProfileWizardStart ( page1 );
177
newprofilewizardstartcontent->resize ( newprofilewizardstartcontent->sizeHint() );
179
addPage ( page1, "<b>" + i18n ( "Welcome" ) + "</b>" );
178
newprofilewizardstartcontent = new NewProfileWizardStart (startpage);
179
// newprofilewizardstartcontent->resize ( newprofilewizardstartcontent->sizeHint() );
180
startpage->sizeHint();
181
addPage ( startpage, "<b>" + i18n ( "Welcome" ) + "</b>" );
181
183
// type selection
182
newprofilewizardtypeselectionpage = new QHBox ( 0 );
184
newprofilewizardtypeselectionpage = new Q3HBox ( 0 );
183
185
// newprofilewizardtypeselectionpage->setSpacing(8);
184
186
QLabel *setupPixmapContent2 = new QLabel ( newprofilewizardtypeselectionpage );
185
187
setupPixmapContent2->setPixmap ( *SetupPixmap );
186
188
setupPixmapContent2->resize ( setupPixmapContent2->sizeHint() );
187
newprofilewizardtypeselectionpagecontent = new NewProfileWizardTypeSelection ( newprofilewizardtypeselectionpage );
188
newprofilewizardtypeselectionpagecontent->FreeswanRadioButton->setText ( i18n ( "IPSec (%1)" ).arg ( "FreeS/WAN/Openswan/strongSwan" ) );
189
newprofilewizardtypeselectionpagecontent->L2tpFreeswanRadioButton->setText ( i18n ( "L2TP over IPSec (%1)" ).arg ( "FreeS/WAN/Openswan/strongSwan" ) );
190
newprofilewizardtypeselectionpage->sizeHint();
189
newprofilewizardtypeselectionpagecontent = new NewProfileWizardTypeSelection (newprofilewizardtypeselectionpage);
190
newprofilewizardtypeselectionpagecontent->FreeswanRadioButton->setText ( i18n ( "IPSec (%1)", QString("FreeS/WAN/Openswan/strongSwan" )) );
191
newprofilewizardtypeselectionpagecontent->L2tpFreeswanRadioButton->setText ( i18n ( "L2TP over IPSec (%1)" , QString("FreeS/WAN/Openswan/strongSwan" )) );
192
// newprofilewizardtypeselectionpage->sizeHint();
191
193
addPage ( newprofilewizardtypeselectionpage, "<b>" + i18n ( "Type selection" ) + "</b>" );
194
newprofilewizardciscoselectionpage = new QHBox ( 0 );
196
newprofilewizardciscoselectionpage = new Q3HBox ( 0 );
195
197
// newprofilewizardciscoselectionpage->setSpacing(8);
196
198
QLabel *setupPixmapContent3 = new QLabel ( newprofilewizardciscoselectionpage );
197
199
setupPixmapContent3->setPixmap ( *SetupPixmap );
198
200
setupPixmapContent3->resize ( setupPixmapContent3->sizeHint() );
199
newprofilewizardciscoselectionpagecontent = new NewProfileWizardCiscoSelection ( newprofilewizardciscoselectionpage );
200
newprofilewizardciscoselectionpage->sizeHint();
201
newprofilewizardciscoselectionpagecontent = new NewProfileWizardCiscoSelection ( newprofilewizardciscoselectionpage);
202
// newprofilewizardciscoselectionpage->sizeHint();
202
newprofilewizardciscomanuallypage = new QHBox ( 0 );
204
newprofilewizardciscomanuallypage = new Q3HBox ( 0 );
203
205
// newprofilewizardciscomanuallypage->setSpacing(8);
204
206
QLabel *setupPixmapContent4 = new QLabel ( newprofilewizardciscomanuallypage );
205
207
setupPixmapContent4->setPixmap ( *SetupPixmap );
206
208
setupPixmapContent4->resize ( setupPixmapContent4->sizeHint() );
207
newprofilewizardciscomanuallypagecontent = new NewProfileWizardCiscoManually ( newprofilewizardciscomanuallypage );
208
newprofilewizardciscomanuallypage->sizeHint();
209
newprofilewizardciscomanuallypagecontent = new NewProfileWizardCiscoManually (newprofilewizardciscomanuallypage );
210
// newprofilewizardciscomanuallypage->sizeHint();
211
connect ( newprofilewizardciscomanuallypagecontent->GroupPasswordLineEdit , SIGNAL ( textChanged ( const QString& ) ), this, SLOT ( pskToggled ( const QString& ) ) );
211
newprofilewizardracoonpage = new QHBox ( 0 );
214
newprofilewizardracoonpage = new Q3HBox ( 0 );
212
215
// newprofilewizardracoonpage->setSpacing(8);
213
216
QLabel *setupPixmapContent5 = new QLabel ( newprofilewizardracoonpage );
214
217
setupPixmapContent5->setPixmap ( *SetupPixmap );
215
218
setupPixmapContent5->resize ( setupPixmapContent5->sizeHint() );
216
newprofilewizardracoonpagecontent = new NewProfileWizardRacoon ( newprofilewizardracoonpage );
219
newprofilewizardracoonpagecontent = new NewProfileWizardRacoon ( newprofilewizardracoonpage);
217
220
newprofilewizardracoonpagecontent->ExchangeModeComboBox->insertItem ( "main", 0 );
218
221
newprofilewizardracoonpagecontent->ExchangeModeComboBox->insertItem ( "aggressive", 1 );
219
222
newprofilewizardracoonpagecontent->ExchangeModeComboBox->insertItem ( "base", 2 );
240
243
newprofilewizardracoonpagecontent->LocalIdTypeCombobox->insertItem ( "keyid" );
241
244
newprofilewizardracoonpagecontent->LocalIdTypeCombobox->insertItem ( "user_fqdn" );
246
newprofilewizardracoonpagecontent->RemoteIdTypeCombobox->insertItem ( "asn1dn" );
247
newprofilewizardracoonpagecontent->RemoteIdTypeCombobox->insertItem ( "address" );
248
newprofilewizardracoonpagecontent->RemoteIdTypeCombobox->insertItem ( "fqdn" );
249
newprofilewizardracoonpagecontent->RemoteIdTypeCombobox->insertItem ( "keyid" );
250
newprofilewizardracoonpagecontent->RemoteIdTypeCombobox->insertItem ( "user_fqdn" );
252
newprofilewizardracoonpagecontent->PerfectForwardSecurityCheckbox->setChecked(true);
253
newprofilewizardracoonpagecontent->PerfectForwardSecrecyCombobox->setCurrentText("modp2048");
243
257
connect ( newprofilewizardracoonpagecontent->LocalIdTypeCombobox, SIGNAL ( highlighted ( const QString& ) ), this, SLOT ( localIDTypeToggled ( const QString& ) ) );
245
QStringList KernelCrypto = Utils ( GlobalConfig ).getKernelCrypto();
247
//FIXME why this is not in kernel crypto list???
248
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem ( "3des" );
250
// newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("des" );
251
// newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("des_iv64" );
252
// newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("des_iv32" );
253
// newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("rc5" );
254
// newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("rc4" );
255
// newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("idea" );
256
// newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("3idea" );
257
// newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("cast128" );
258
// newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("blowfish" );
259
// newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("null_enc" );
260
// newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("twofish" );
261
// newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("rijndael" );
262
// newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("aes" );
264
for ( QStringList::Iterator it = KernelCrypto.begin(); it != KernelCrypto.end(); ++it )
266
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem ( *it );
270
newprofilewizardracoonpagecontent->AuthenticationAlgorithmComboBox->insertItem ( "des" );
271
newprofilewizardracoonpagecontent->AuthenticationAlgorithmComboBox->insertItem ( "3des" );
272
newprofilewizardracoonpagecontent->AuthenticationAlgorithmComboBox->insertItem ( "des_iv64" );
273
newprofilewizardracoonpagecontent->AuthenticationAlgorithmComboBox->insertItem ( "des_iv32" );
274
newprofilewizardracoonpagecontent->AuthenticationAlgorithmComboBox->insertItem ( "hmac_md5" );
275
newprofilewizardracoonpagecontent->AuthenticationAlgorithmComboBox->insertItem ( "hmac_sha1" );
276
newprofilewizardracoonpagecontent->AuthenticationAlgorithmComboBox->insertItem ( "hmac_sha256" );
277
newprofilewizardracoonpagecontent->AuthenticationAlgorithmComboBox->insertItem ( "hmac_sha384" );
278
newprofilewizardracoonpagecontent->AuthenticationAlgorithmComboBox->insertItem ( "hmac_sha512" );
279
newprofilewizardracoonpagecontent->AuthenticationAlgorithmComboBox->insertItem ( "non_auth" );
258
connect ( newprofilewizardracoonpagecontent->RemoteIdTypeCombobox, SIGNAL ( highlighted ( const QString& ) ), this, SLOT ( remoteIDTypeToggled ( const QString& ) ) );
259
connect ( newprofilewizardracoonpagecontent->IkeGroupCheckbox, SIGNAL ( toggled ( bool ) ), this, SLOT ( ikeGroupToggled ( bool ) ) );
260
connect ( newprofilewizardracoonpagecontent->UseXauthCheckBox, SIGNAL(toggled(bool)),this, SLOT(useXauthRacoonToggled(bool)));
262
Utils::IpsecAlgos KernelCrypto = Utils ( GlobalConfig ).getKernelCrypto();
265
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("des" );
266
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("3des" );
267
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("blowfish" );
268
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("cast128" );
269
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("aes" );
270
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("camellia" );
273
newprofilewizardracoonpagecontent->HashAlgoComboBox->insertItem( "md5" );
274
newprofilewizardracoonpagecontent->HashAlgoComboBox->insertItem( "sha1" );
275
newprofilewizardracoonpagecontent->HashAlgoComboBox->insertItem( "sha256" );
276
newprofilewizardracoonpagecontent->HashAlgoComboBox->insertItem( "sha384" );
277
newprofilewizardracoonpagecontent->HashAlgoComboBox->insertItem( "sha512" );
282
// // phase 2 encr algos from kernel
283
// for ( QStringList::Iterator it = KernelCrypto.IpsecEspEncryptionAlgorithms.begin(); it != KernelCrypto.IpsecEspEncryptionAlgorithms.end(); ++it )
285
// newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem ( *it );
288
// // phase 2 auth algos from kernel
289
// for ( QStringList::Iterator it = KernelCrypto.IpsecEspAuthenticationAlgorithms.begin(); it != KernelCrypto.IpsecEspAuthenticationAlgorithms.end(); ++it )
291
// newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem ( *it );
294
// vpn mit linux book
295
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("des" );
296
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("3des" );
297
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("des_iv64" );
298
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("des_iv32" );
299
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("rc5" );
300
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("rc4" );
301
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("idea" );
302
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("3idea" );
303
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("cast128" );
304
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("blowfish" );
305
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("null_enc" );
306
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("twofish" );
307
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("rijndael" );
308
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("aes" );
310
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "des" );
311
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "3des" );
312
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "des_iv64" );
313
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "des_iv32" );
314
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "hmac_md5" );
315
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "hmac_sha1" );
316
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "hmac_sha256" );
317
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "hmac_sha384" );
318
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "hmac_sha512" );
319
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "non_auth" );
282
322
// FIXME save not implemented yet
286
326
newprofilewizardracoonpage->sizeHint();
289
newprofilewizardfreeswanpage = new QHBox ( 0 );
329
newprofilewizardfreeswanselectionpage = new Q3HBox ( 0 );
330
// newprofilewizardfreeswanselectionpage->setSpacing(8);
331
QLabel *setupPixmapContent711 = new QLabel ( newprofilewizardfreeswanselectionpage );
332
setupPixmapContent711->setPixmap ( *SetupPixmap );
333
setupPixmapContent711->resize ( setupPixmapContent711->sizeHint() );
334
newprofilewizardfreeswanselectionpagecontent = new NewProfileWizardOpenvpnSelection ( newprofilewizardfreeswanselectionpage );
335
newprofilewizardfreeswanselectionpagecontent->OpenvpnImportRadioButton->setText(i18n("Import &Ipsec config file"));
336
newprofilewizardfreeswanselectionpage->sizeHint();
338
newprofilewizardfreeswanpage = new Q3HBox ( 0 );
290
339
// newprofilewizardfreeswanpage->setSpacing(8);
291
340
QLabel *setupPixmapContent6 = new QLabel ( newprofilewizardfreeswanpage );
292
341
setupPixmapContent6->setPixmap ( *SetupPixmap );
293
342
setupPixmapContent6->resize ( setupPixmapContent6->sizeHint() );
343
newprofilewizardfreeswanpagecontent = new NewProfileWizardFreeswan ( newprofilewizardfreeswanpage);
344
newprofilewizardfreeswanpage->sizeHint();
347
newprofilewizardfreeswanpage = new Q3HBox ( 0 );
348
// newprofilewizardfreeswanpage->setSpacing(8);
349
QLabel *setupPixmapContent66 = new QLabel ( newprofilewizardfreeswanpage );
350
setupPixmapContent66->setPixmap ( *SetupPixmap );
351
setupPixmapContent66->resize ( setupPixmapContent66->sizeHint() );
294
352
newprofilewizardfreeswanpagecontent = new NewProfileWizardFreeswan ( newprofilewizardfreeswanpage );
354
newprofilewizardfreeswanpagecontent->LocalIdTypeCombobox->insertItem ( "asn1dn" );
355
newprofilewizardfreeswanpagecontent->LocalIdTypeCombobox->insertItem ( "address" );
356
newprofilewizardfreeswanpagecontent->LocalIdTypeCombobox->insertItem ( "fqdn" );
357
newprofilewizardfreeswanpagecontent->LocalIdTypeCombobox->insertItem ( "keyid" );
358
newprofilewizardfreeswanpagecontent->LocalIdTypeCombobox->insertItem ( "user_fqdn" );
360
newprofilewizardfreeswanpagecontent->IpsecVpnModeCombobox->insertItem( "transport" );
361
newprofilewizardfreeswanpagecontent->IpsecVpnModeCombobox->insertItem( "tunnel" );
363
newprofilewizardfreeswanpagecontent->IpsecVpnModeCombobox->QComboBox::setCurrentItem(1);
364
newprofilewizardfreeswanpagecontent->DisableOpportunisticEncryptionCheckBox->setChecked(true);
365
newprofilewizardfreeswanpagecontent->UseModeConfigCheckBox->hide();
368
connect ( newprofilewizardfreeswanpagecontent->LocalIdTypeCombobox, SIGNAL ( highlighted ( const QString& ) ), this, SLOT ( localIDTypeIpsecToggled ( const QString& ) ) );
370
connect( newprofilewizardfreeswanpagecontent->UseCustomEspCheckBox, SIGNAL( toggled(bool) ), this, SLOT( useEspToogled(bool) ) );
371
connect( newprofilewizardfreeswanpagecontent->UseCustomIkeCheckBox, SIGNAL( toggled(bool) ), this, SLOT( useIkeToggled(bool) ) );
372
connect( newprofilewizardfreeswanpagecontent->UseLeftNextHopCheckBox, SIGNAL( toggled(bool) ), this, SLOT( useLeftNextHopToggled(bool) ) );
373
connect( newprofilewizardfreeswanpagecontent->UseRightNextHopCheckBox, SIGNAL( toggled(bool) ), this, SLOT( useRightNextHopToggled(bool) ) );
374
connect( newprofilewizardfreeswanpagecontent->LocalIdTypeCombobox, SIGNAL( activated(const QString&) ), this, SLOT( localIDTypeIpsecToggled(const QString&) ) );
375
connect (newprofilewizardfreeswanpagecontent->UseXauthCheckBox, SIGNAL(toggled(bool)),this, SLOT(useXauthFreeswanToggled(bool)));
295
377
newprofilewizardfreeswanpage->sizeHint();
298
newprofilewizardopenvpnselectionpage = new QHBox ( 0 );
380
newprofilewizardopenvpnselectionpage = new Q3HBox ( 0 );
299
381
// newprofilewizardopenvpnselectionpage->setSpacing(8);
300
382
QLabel *setupPixmapContent7 = new QLabel ( newprofilewizardopenvpnselectionpage );
301
383
setupPixmapContent7->setPixmap ( *SetupPixmap );
302
384
setupPixmapContent7->resize ( setupPixmapContent7->sizeHint() );
303
newprofilewizardopenvpnselectionpagecontent = new NewProfileWizardOpenvpnSelection ( newprofilewizardopenvpnselectionpage );
385
newprofilewizardopenvpnselectionpagecontent = new NewProfileWizardOpenvpnSelection (newprofilewizardopenvpnselectionpage );
304
386
newprofilewizardopenvpnselectionpage->sizeHint();
306
newprofilewizardopenvpnauthpage = new QHBox ( 0 );
388
newprofilewizardopenvpnauthpage = new Q3HBox ( 0 );
307
389
// newprofilewizardopenvpnauthpage->setSpacing(8);
308
390
QLabel *setupPixmapContent71 = new QLabel ( newprofilewizardopenvpnauthpage );
309
391
setupPixmapContent71->setPixmap ( *SetupPixmap );
359
newprofilewizardpptppage = new QHBox ( 0 );
441
newprofilewizardpptppage = new Q3HBox ( 0 );
360
442
// newprofilewizardpptppage->setSpacing(8);
361
443
QLabel *setupPixmapContent9 = new QLabel ( newprofilewizardpptppage );
362
444
setupPixmapContent9->setPixmap ( *SetupPixmap );
363
445
setupPixmapContent9->resize ( setupPixmapContent9->sizeHint() );
364
newprofilewizardpptppagecontent = new NewProfileWizardPptp ( newprofilewizardpptppage );
446
newprofilewizardpptppagecontent = new NewProfileWizardPptp(newprofilewizardpptppage);
365
447
newprofilewizardpptppage->sizeHint();
366
448
newprofilewizardpptppagecontent->DnsServerLineedit->setEnabled ( false );
367
newprofilewizardpptppagecontent->Refuse40BitEncryptionCheckbox->setChecked ( profileData->getRefuse40BitEncryption() );
368
newprofilewizardpptppagecontent->Refuse40BitEncryptionCheckbox->setChecked ( profileData->getRefuse128BitEncryption() );
369
newprofilewizardpptppagecontent->RequireMppeCheckbox->setChecked ( profileData->getRequireMppe() );
370
newprofilewizardpptppagecontent->AllowStatefulModeCheckbox->setChecked ( profileData->getAllowStatefulMode() );
371
newprofilewizardpptppagecontent->UseNoMPPECompressionCheckbox->setChecked ( profileData->getDisableMPPEComp() );
372
newprofilewizardpptppagecontent->UseNoDeflateCheckbox->setChecked ( profileData->getUseNoDeflate() );
449
newprofilewizardpptppagecontent->RequireMppeCheckbox->setChecked( profileData->getRequireMppe() );
450
newprofilewizardpptppagecontent->Refuse128BitEncryptionCheckbox->setChecked( profileData->getRefuse128BitEncryption() );
451
newprofilewizardpptppagecontent->Refuse40BitEncryptionCheckbox->setChecked( profileData->getRefuse40BitEncryption() );
452
newprofilewizardpptppagecontent->UseNoMPPECompressionCheckbox->setChecked( profileData->getDisableMPPEComp() );
453
newprofilewizardpptppagecontent->GetDnsFromPeerCheckbox->setChecked( profileData->getUseGetDnsFromPeer() );
454
newprofilewizardpptppagecontent->DnsServerCheckbox->setChecked( profileData->getUseDnsUpdate() );
455
newprofilewizardpptppagecontent->DnsServerCheckbox->setChecked( profileData->getUseDnsServer() );
456
newprofilewizardpptppagecontent->DnsServerLineedit->setText( profileData->getDnsServer() );
457
newprofilewizardpptppagecontent->UseNoBsdCompCheckbox->setChecked( profileData->getUseNoBsdComp() );
458
newprofilewizardpptppagecontent->UseNoDeflateCheckbox->setChecked( profileData->getUseNoDeflate() );
459
newprofilewizardpptppagecontent->AllowStatefulModeCheckbox->setChecked( profileData->getAllowStatefulMode() );
460
newprofilewizardpptppagecontent->UseNoIpDefaultCheckbox->setChecked( profileData->getUseNoIpDefault() );
461
newprofilewizardpptppagecontent->DisableCcpCheckbox->setChecked( profileData->getDisableCcp() );
462
newprofilewizardpptppagecontent->DisableHeaderCompressionCheckbox->setChecked(profileData->getDisableHeaderCompression());
463
newprofilewizardpptppagecontent->DisableMagicNumberNegotiationCheckbox->setChecked(profileData->getDisableMagicNumberNegotiation());
464
newprofilewizardpptppagecontent->DisableIpxCheckbox->setChecked(profileData->getDisableIpx());
465
newprofilewizardpptppagecontent->DisableAdressControlCompressionCheckbox->setChecked(profileData->getDisableAdressControlCompression());
466
newprofilewizardpptppagecontent->DisableProtocolFieldCompressionCheckbox->setChecked(profileData->getDisableProtocolFieldCompression());
374
469
newprofilewizardpptppagecontent->AuthMethodComboBox->insertItem ( "chap" );
375
470
newprofilewizardpptppagecontent->AuthMethodComboBox->insertItem ( "pap" );
471
newprofilewizardpptppagecontent->AuthMethodComboBox->insertItem ( "mschap" );
472
newprofilewizardpptppagecontent->AuthMethodComboBox->insertItem ( "mschap-v2" );
474
connect( newprofilewizardpptppagecontent->DnsServerCheckbox, SIGNAL( toggled(bool) ), this, SLOT( useDnsServerToggled(bool) ) );
475
connect( newprofilewizardpptppagecontent->UseSearchDomainInResolvConfCheckbox, SIGNAL( toggled(bool) ), this, SLOT( useSearchDomainInResolvConfToggled(bool) ) );
378
newprofilewizardvtunpage = new QHBox ( 0 );
478
newprofilewizardvtunpage = new Q3HBox ( 0 );
379
479
// newprofilewizardvtunpage->setSpacing(8);
380
480
QLabel *setupPixmapContent19 = new QLabel ( newprofilewizardvtunpage );
381
481
setupPixmapContent19->setPixmap ( *SetupPixmap );
384
484
newprofilewizardvtunpage->sizeHint();
385
485
connect ( newprofilewizardvtunpagecontent->PortCheckbox, SIGNAL ( toggled ( bool ) ), this, SLOT ( usePortToggled ( bool ) ) );
387
newprofilewizardauthselectionpage = new QHBox ( 0 );
488
newprofilewizardsshpage = new Q3HBox ( 0 );
489
// newprofilewizardsshpage->setSpacing(8);
490
QLabel *setupPixmapContent191 = new QLabel ( newprofilewizardsshpage );
491
setupPixmapContent191->setPixmap ( *SetupPixmap );
492
setupPixmapContent191->resize ( setupPixmapContent191->sizeHint() );
493
newprofilewizardsshpagecontent = new ProfileSshOptions ( newprofilewizardsshpage );
494
newprofilewizardsshpage->sizeHint();
496
QString Home= QString(getenv("HOME"));
499
QDir dir( Home+"/.ssh" );
500
QStringList KeyFiles = dir.entryList( "*" );
502
//if (GlobalConfig->KvpncDebugLevel > 2)
504
// GlobalConfig->appendLogEntry(i18n("SSH files: %1", QString(KeyFiles.join(","))),GlobalConfig->debug);
507
if (KeyFiles.size() > 1)
509
for ( QStringList::Iterator it = KeyFiles.begin(); it != KeyFiles.end(); ++it )
511
QString item = QString(*it);
512
if (GlobalConfig->KvpncDebugLevel > 2)
514
//GlobalConfig->appendLogEntry(i18n("processing entry: %1", QString(item),GlobalConfig->debug);
516
if (!item.contains (".pub", false) && !item.contains ("authorized_keys", false) && !item.contains ("known_hosts", false) && !item.contains (".", false) && !item.contains ("..", false) && !item.contains ("config", false) )
518
if (GlobalConfig->KvpncDebugLevel > 2)
520
GlobalConfig->appendLogEntry(i18n("SSH key found: %1", QString(*it)),GlobalConfig->debug);
522
newprofilewizardsshpagecontent->SshKeyComboBox->insertItem(*it);
529
newprofilewizardauthselectionpage = new Q3HBox ( 0 );
388
530
// newprofilewizardauthselectionpage->setSpacing(8);
389
531
QLabel *setupPixmapContent81 = new QLabel ( newprofilewizardauthselectionpage );
390
532
setupPixmapContent81->setPixmap ( *SetupPixmap );
482
624
newprofilewizardnetworkcontent->MruSpinbox->hide();
483
625
newprofilewizardnetworkcontent->MruCheckbox->hide();
485
connect ( newprofilewizardnetworkcontent->MtuCheckbox, SIGNAL ( toggled ( bool ) ), this, SLOT ( mtuToggled ( bool ) ) );
486
connect ( newprofilewizardnetworkcontent->MtuCheckbox, SIGNAL ( toggled ( bool ) ), this, SLOT ( mtuToggled ( bool ) ) );
627
newprofilewizardnetworkcontent->TunnelDeviceTypeLabel->hide();
628
newprofilewizardnetworkcontent->TunnelDeviceTypeComboBox->hide();
630
newprofilewizardnetworkcontent->TunnelDeviceTypeComboBox->insertItem("tun");
631
newprofilewizardnetworkcontent->TunnelDeviceTypeComboBox->insertItem("tap");
633
connect ( newprofilewizardnetworkcontent->MtuCheckbox, SIGNAL ( toggled ( bool ) ), this, SLOT ( mtuToggled ( bool ) ) );
634
connect ( newprofilewizardnetworkcontent->MtuCheckbox, SIGNAL ( toggled ( bool ) ), this, SLOT ( mtuToggled ( bool ) ) );
635
connect ( newprofilewizardnetworkcontent->UseRemoteNetworkCheckBox, SIGNAL ( toggled ( bool ) ) , this, SLOT( useRemoteNetworkToggled (bool )));
636
connect ( newprofilewizardnetworkcontent->TunnelDeviceTypeComboBox, SIGNAL(activated ( const QString & )),this, SLOT(tunnelDeviceTypeChanged(const QString& )));
639
newprofilewizardnetworkroutepage = new Q3HBox ( 0 );
640
// newprofilewizardnetworkroutepage->setSpacing(8);
641
QLabel *setupPixmapContent761 = new QLabel ( newprofilewizardnetworkroutepage );
642
setupPixmapContent761->setPixmap ( *SetupPixmap );
643
setupPixmapContent761->resize ( setupPixmapContent761->sizeHint() );
644
newprofilewizardnetworkroutecontent = new ProfileNetworkRouteOptions ( newprofilewizardnetworkroutepage );
645
newprofilewizardnetworkroutepage->sizeHint();
647
connect(newprofilewizardnetworkroutecontent->DefaultRouteComboBox, SIGNAL(activated(const QString&)), this, SLOT(defaultRouteToggled(const QString&)));
649
newprofilewizardnetworkroutecontent->DefaultRouteComboBox->QComboBox::setCurrentItem(1);
489
newprofilewizardnatpage = new QHBox ( 0 );
653
newprofilewizardnatpage = new Q3HBox ( 0 );
490
654
// newprofilewizardnatpage->setSpacing(8);
491
655
QLabel *setupPixmapContent77 = new QLabel ( newprofilewizardnatpage );
492
656
setupPixmapContent77->setPixmap ( *SetupPixmap );
709
876
removePage ( newprofilewizardpptppage );
710
877
removePage ( newprofilewizardvirtualipaddresspage );
712
insertPage ( newprofilewizardracoonpage, "<b>" + i18n ( "FreeSWAN/OpenSWAN settings" ) + "</b>", indexOf ( currentpage ) + 1 );
714
newprofilewizardracoonpagecontent->ExchangeModeComboBox->insertItem ( "main", 0 );
715
newprofilewizardracoonpagecontent->ExchangeModeComboBox->insertItem ( "aggressive", 1 );
716
newprofilewizardracoonpagecontent->ExchangeModeComboBox->setCurrentItem ( 0 ); // main
717
newprofilewizardracoonpagecontent->ExchangeModeComboBox->setEnabled ( true );
719
newprofilewizardracoonpagecontent->HashAlgoComboBox->hide();
720
newprofilewizardracoonpagecontent->HashAlgoTextLabel->hide();
721
newprofilewizardracoonpagecontent->UseModeConfigCheckBox->hide();
722
newprofilewizardracoonpagecontent->AuthenticationAlgorithmComboBox->hide();
723
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->hide();
724
newprofilewizardracoonpagecontent->DHGroupComboBox->hide();
726
newprofilewizardcertcontent->certpathURLRequester->setURL ( "/etc/ipsec.d/cacerts" );
879
insertPage ( newprofilewizardfreeswanpage, "<b>" + i18n ( "FreeSWAN/OpenSWAN settings" ) + "</b>", indexOf ( currentpage ) + 1 );
881
newprofilewizardfreeswanpagecontent->ExchangeModeComboBox->insertItem ( "main", 0 );
882
newprofilewizardfreeswanpagecontent->ExchangeModeComboBox->insertItem ( "aggressive", 1 );
883
newprofilewizardfreeswanpagecontent->ExchangeModeComboBox->setCurrentItem ( 0 ); // main
884
newprofilewizardfreeswanpagecontent->ExchangeModeComboBox->setEnabled ( true );
886
newprofilewizardfreeswanpagecontent->IpsecVpnModeCombobox->QComboBox::setCurrentItem(1); // tunnel
888
newprofilewizardcertcontent->certpathURLRequester->setUrl ( KUrl("/etc/ipsec.d/cacerts") );
727
889
newprofilewizardcertcontent->Pkcs11IdTypeComboBox->setEnabled ( false );
728
890
newprofilewizardcertcontent->Pkcs11IdTypeComboBox->setCurrentText ( i18n ( "ID" ) );
730
profileData->setIkeGroup ( "modp2048" ); // default for windows?!
731
profileData->setAuthenticationAlgorithm ( "hmac_md5" ); // default for windows?!
732
profileData->setHashAlgo ( "sha1" ); // default for windows?!
735
newprofilewizardracoonpagecontent->InfoLabel->setText ( i18n ( "Please enter %1 specific settings:" ).arg ( "FreeS/WAN/Openswan/strongSwan" ) );
737
insertPage ( newprofilewizardauthselectionpage, i18n ( "Authentication settings" ), indexOf ( currentpage ) + 1 );
738
insertPage ( newprofilewizardnetworkpage, "<b>" + i18n ( "Network settings" ) + "</b>", indexOf ( currentpage ) + 2 );
892
// profileData->setIkeGroup ( "modp2048" ); // default for windows?!
893
// profileData->setAuthenticationAlgorithm ( "hmac_md5" ); // default for windows?!
894
// profileData->setHashAlgo ( "sha1" ); // default for windows?!
897
// newprofilewizardfreeswanpagecontent->InfoLabel->setText ( i18n ( "Please enter %1 specific settings:", QString("FreeS/WAN/Openswan/strongSwan" )) );
898
insertPage ( newprofilewizardfreeswanselectionpage, "<b>" + i18n ( "IPSec selection" ) + "</b>", indexOf ( currentpage ) + 1 );
740
901
if ( GlobalConfig->KvpncDebugLevel > 0 )
741
GlobalConfig->appendLogEntry ( i18n ( "Selected type: %1" ).arg ( "FreeS/WAN/Openswan/strongSwan" ), KVpncConfig::debug );
902
GlobalConfig->appendLogEntry ( i18n ( "Selected type: %1" , QString( "FreeS/WAN/Openswan/strongSwan" ) ), KVpncConfig::debug );
743
904
else if ( newprofilewizardtypeselectionpagecontent->RacoonRadioButton->isChecked() )
745
906
profileData->setConnectionType ( VpnAccountData::racoon );
746
907
removePage ( newprofilewizardciscoselectionpage );
747
908
removePage ( newprofilewizardciscomanuallypage );
909
removePage ( newprofilewizardfreeswanpage );
910
removePage ( newprofilewizardfreeswanselectionpage );
748
911
removePage ( newprofilewizardopenvpnpage );
749
912
removePage ( newprofilewizardopenvpnselectionpage );
750
913
removePage ( newprofilewizardpptppage );
751
914
removePage ( newprofilewizardvirtualipaddresspage );
753
newprofilewizardracoonpagecontent->FreeswanGroupBox->hide();
755
profileData->setIkeGroup ( "modp2048" ); // default for windows?!
756
profileData->setHashAlgo ( "sha1" ); // default for windows?!
757
profileData->setAuthenticationAlgorithm ( "hmac_md5" );
917
// profileData->setIkeGroup ( "modp2048" ); // default for windows?!
918
// profileData->setHashAlgo ( "sha1" ); // default for windows?!
919
// profileData->setAuthenticationAlgorithm ( "hmac_md5" );
759
921
profileData->setUseMailAddressAsIdentifier ( false );
761
newprofilewizardracoonpagecontent->DHGroupComboBox->setCurrentText ( profileData->getIkeGroup() );
762
newprofilewizardracoonpagecontent->AuthenticationAlgorithmComboBox->setCurrentText ( profileData->getAuthenticationAlgorithm() );
763
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->setCurrentText ( profileData->getEncryptionAlgorithm() );
923
// newprofilewizardracoonpagecontent->DHGroupComboBox->setCurrentText ( profileData->getIkeGroup() );
924
// newprofilewizardracoonpagecontent->AuthenticationAlgorithmComboBox->setCurrentText ( profileData->getAuthenticationAlgorithm() );
925
// newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->setCurrentText ( profileData->getEncryptionAlgorithm() );
927
Utils::IpsecAlgos KernelCrypto = Utils ( GlobalConfig ).getKernelCrypto();
930
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("des" );
931
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("3des" );
932
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("blowfish" );
933
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("cast128" );
934
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("aes" );
935
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("camellia" );
937
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->setCurrentText("3des");
940
newprofilewizardracoonpagecontent->HashAlgoComboBox->insertItem( "md5" );
941
newprofilewizardracoonpagecontent->HashAlgoComboBox->insertItem( "sha1" );
942
newprofilewizardracoonpagecontent->HashAlgoComboBox->insertItem( "sha256" );
943
newprofilewizardracoonpagecontent->HashAlgoComboBox->insertItem( "sha384" );
944
newprofilewizardracoonpagecontent->HashAlgoComboBox->insertItem( "sha512" );
946
newprofilewizardracoonpagecontent->HashAlgoComboBox->setCurrentText("md5");
948
// vpn mit linux book
949
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("des" );
950
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("3des" );
951
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("des_iv64" );
952
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("des_iv32" );
953
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("rc5" );
954
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("rc4" );
955
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("idea" );
956
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("3idea" );
957
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("cast128" );
958
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("blowfish" );
959
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("null_enc" );
960
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("twofish" );
961
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("rijndael" );
962
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem("aes" );
964
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->setCurrentText("3des");
966
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "des" );
967
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "3des" );
968
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "des_iv64" );
969
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "des_iv32" );
970
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "hmac_md5" );
971
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "hmac_sha1" );
972
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "hmac_sha256" );
973
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "hmac_sha384" );
974
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "hmac_sha512" );
975
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "non_auth" );
977
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->setCurrentText( "hmac_md5" );
979
for ( QStringList::Iterator it = KernelCrypto.IpsecEspEncryptionAlgorithms.begin(); it != KernelCrypto.IpsecEspEncryptionAlgorithms.end(); ++it )
981
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem ( *it );
765
984
newprofilewizardcertcontent->UseSmartcardCheckBox->hide();
766
985
newprofilewizardcertcontent->SmartcardGroupBox->hide();
767
986
newprofilewizardp12certselectioncontent->UseSmartcardCheckBox->hide();
769
insertPage ( newprofilewizardracoonpage, "<b>" + i18n ( "Racoon settings" ) + "</b>", indexOf ( currentpage ) + 1 );
770
insertPage ( newprofilewizardauthselectionpage, i18n ( "Authentication settings" ), indexOf ( currentpage ) + 2 );
771
insertPage ( newprofilewizardnetworkpage, "<b>" + i18n ( "Network settings" ) + "</b>", indexOf ( currentpage ) + 3 );
989
insertPage ( newprofilewizardauthselectionpage, i18n ( "Authentication settings" ), indexOf ( currentpage ) + 1 );
990
insertPage ( newprofilewizardracoonpage, "<b>" + i18n ( "Racoon settings" ) + "</b>", indexOf ( currentpage ) + 2 );
992
newprofilewizardauthselectioncontent->HybridRadioButton->show();
773
995
if ( GlobalConfig->KvpncDebugLevel > 0 )
774
GlobalConfig->appendLogEntry ( i18n ( "Selected type: %1" ).arg ( "Racoon" ), KVpncConfig::debug );
996
GlobalConfig->appendLogEntry ( i18n ( "Selected type: %1" ,QString ( "Racoon" ) ), KVpncConfig::debug );
776
998
else if ( newprofilewizardtypeselectionpagecontent->L2tpRacoonRadioButton->isChecked() )
778
1000
profileData->setConnectionType ( VpnAccountData::l2tpd_racoon );
779
1001
removePage ( newprofilewizardciscoselectionpage );
780
1002
removePage ( newprofilewizardciscomanuallypage );
1003
removePage ( newprofilewizardfreeswanpage );
1004
removePage ( newprofilewizardfreeswanselectionpage );
781
1005
removePage ( newprofilewizardopenvpnpage );
782
1006
removePage ( newprofilewizardopenvpnselectionpage );
783
1007
removePage ( newprofilewizardpptppage );
787
1011
profileData->setUseMailAddressAsIdentifier ( false );
789
profileData->setIkeGroup ( "modp2048" ); // default for windows?!
790
profileData->setHashAlgo ( "sha1" ); // default for windows?!
791
profileData->setAuthenticationAlgorithm ( "hmac_md5" ); // default for windows?!
793
newprofilewizardracoonpagecontent->DHGroupComboBox->setCurrentText ( profileData->getIkeGroup() );
794
newprofilewizardracoonpagecontent->AuthenticationAlgorithmComboBox->setCurrentText ( profileData->getAuthenticationAlgorithm() );
795
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->setCurrentText ( profileData->getEncryptionAlgorithm() );
1013
// profileData->setIkeGroup ( "modp2048" ); // default for windows?!
1014
// profileData->setHashAlgo ( "sha1" ); // default for windows?!
1015
// profileData->setAuthenticationAlgorithm ( "hmac_md5" ); // default for windows?
1017
Utils::IpsecAlgos KernelCrypto = Utils ( GlobalConfig ).getKernelCrypto();
1019
//FIXME why this is not in kernel crypto list???
1020
// newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem ( "3des" );
1022
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("des" );
1023
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("des_iv64" );
1024
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("des_iv32" );
1025
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("rc5" );
1026
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("rc4" );
1027
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("idea" );
1028
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("3idea" );
1029
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("cast128" );
1030
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("blowfish" );
1031
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("null_enc" );
1032
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("twofish" );
1033
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("rijndael" );
1034
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem("aes" );
1036
newprofilewizardracoonpagecontent->HashAlgoComboBox->insertItem( "md5" );
1037
newprofilewizardracoonpagecontent->HashAlgoComboBox->insertItem( "sha1" );
1038
newprofilewizardracoonpagecontent->HashAlgoComboBox->insertItem( "sha256" );
1039
newprofilewizardracoonpagecontent->HashAlgoComboBox->insertItem( "sha384" );
1040
newprofilewizardracoonpagecontent->HashAlgoComboBox->insertItem( "sha512" );
1042
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "des" );
1043
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "3des" );
1044
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "des_iv64" );
1045
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "des_iv32" );
1046
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "hmac_md5" );
1047
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "hmac_sha1" );
1048
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "hmac_sha256" );
1049
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "hmac_sha384" );
1050
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "hmac_sha512" );
1051
newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem( "non_auth" );
1053
// for ( QStringList::Iterator it = KernelCrypto.IpsecIkeEncryptionAlgorithms.begin(); it != KernelCrypto.IpsecIkeEncryptionAlgorithms.end(); ++it )
1055
// newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->insertItem ( *it );
1058
// for ( QStringList::Iterator it = KernelCrypto.IpsecIkeHashAlgorithms.begin(); it != KernelCrypto.IpsecIkeHashAlgorithms.end(); ++it )
1060
// newprofilewizardracoonpagecontent->HashAlgoComboBox->insertItem ( *it );
1063
for ( QStringList::Iterator it = KernelCrypto.IpsecEspEncryptionAlgorithms.begin(); it != KernelCrypto.IpsecEspEncryptionAlgorithms.end(); ++it )
1065
newprofilewizardracoonpagecontent->EncryptionAlgorithm2ComboBox->insertItem ( *it );
1068
// for ( QStringList::Iterator it = KernelCrypto.IpsecEspAuthenticationAlgorithms.begin(); it != KernelCrypto.IpsecEspAuthenticationAlgorithms.end(); ++it )
1070
// newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->insertItem ( *it );
797
1072
insertPage ( newprofilewizardracoonpage, "<b>" + i18n ( "Racoon settings" ) + "</b>", indexOf ( currentpage ) + 1 );
798
1073
insertPage ( newprofilewizardauthselectionpage, i18n ( "Authentication settings" ), indexOf ( currentpage ) + 2 );
799
1074
insertPage ( newprofilewizarduserpage, "<b>" + i18n ( "User settings" ) + "</b>", indexOf ( currentpage ) + 3 );
826
1101
profileData->setUseMailAddressAsIdentifier ( false );
828
profileData->setIkeGroup ( "modp2048" ); // default for windows?!
829
profileData->setHashAlgo ( "sha1" ); // default for windows?!
830
profileData->setAuthenticationAlgorithm ( "hmac_md5" ); // default for windows?!
831
profileData->setPkcs11IdType ( "id" ); // Why it must be id???
833
insertPage ( newprofilewizardracoonpage, "<b>" + i18n ( "%1 settings" ).arg ( "FreeSWAN/Openswan/strongSwan" ) + "</b>", indexOf ( currentpage ) + 1 );
834
insertPage ( newprofilewizarduserpage, "<b>" + i18n ( "User settings" ) + "</b>", indexOf ( currentpage ) + 1 );
836
newprofilewizardracoonpagecontent->ExchangeModeComboBox->insertItem ( "main", 0 );
837
newprofilewizardracoonpagecontent->ExchangeModeComboBox->insertItem ( "aggressive", 1 );
838
newprofilewizardracoonpagecontent->ExchangeModeComboBox->setCurrentItem ( 0 ); // main
839
newprofilewizardracoonpagecontent->ExchangeModeComboBox->setEnabled ( true );
841
newprofilewizardracoonpagecontent->HashAlgoComboBox->hide();
842
newprofilewizardracoonpagecontent->HashAlgoTextLabel->hide();
843
newprofilewizardracoonpagecontent->UseModeConfigCheckBox->hide();
844
newprofilewizardracoonpagecontent->AuthenticationAlgorithmComboBox->hide();
845
newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->hide();
846
newprofilewizardracoonpagecontent->DHGroupComboBox->hide();
1103
newprofilewizardfreeswanpagecontent->ExchangeModeComboBox->insertItem ( "main", 0 );
1104
newprofilewizardfreeswanpagecontent->ExchangeModeComboBox->insertItem ( "aggressive", 1 );
1105
newprofilewizardfreeswanpagecontent->ExchangeModeComboBox->setCurrentItem ( 0 ); // main
1106
newprofilewizardfreeswanpagecontent->ExchangeModeComboBox->setEnabled ( true );
1107
newprofilewizardfreeswanpagecontent->IpsecVpnModeCombobox->QComboBox::setCurrentItem(1); // transport
1108
newprofilewizardfreeswanpagecontent->IpsecVpnModeCombobox->setEnabled(false);
847
1111
newprofilewizarduserpagecontent ->NtDomainNameCheckbox->show();
848
1112
newprofilewizarduserpagecontent ->NtDomainNameLineedit->show();
849
1113
newprofilewizardcertcontent->Pkcs11IdTypeComboBox->setEnabled ( false );
850
1114
newprofilewizardcertcontent->Pkcs11IdTypeComboBox->setCurrentText ( i18n ( "ID" ) );
851
1115
newprofilewizardauthselectioncontent->CertificateRadioButton->setText ( i18n ( "&Certificate/Smartcard" ) );
852
newprofilewizardcertcontent->certpathURLRequester->setURL ( "/etc/ipsec.d/cacerts" );
854
profileData->setIkeGroup ( "modp2048" ); // default for windows?!
855
profileData->setAuthenticationAlgorithm ( "hmac_md5" ); // default for windows?!
856
profileData->setHashAlgo ( "sha1" ); // default for windows?!
859
newprofilewizardracoonpagecontent->InfoLabel->setText ( i18n ( "Please enter %1 specific settings:" ).arg ( "FreeS/WAN/Openswan/strongSwan" ) );
861
insertPage ( newprofilewizardauthselectionpage, i18n ( "Authentication settings" ), indexOf ( currentpage ) + 1 );
1116
newprofilewizardcertcontent->certpathURLRequester->setUrl ( KUrl("/etc/ipsec.d/cacerts") );
1118
// newprofilewizardfreeswanpagecontent->InfoLabel->setText ( i18n ( "Please enter %1 specific settings:", QString( "FreeS/WAN/Openswan/strongSwan" ) ));
1120
insertPage ( newprofilewizardfreeswanselectionpage, "<b>" + i18n ( "IPSec selection" ) + "</b>", indexOf ( currentpage ) + 1 );
863
1122
if ( GlobalConfig->KvpncDebugLevel > 0 )
864
GlobalConfig->appendLogEntry ( i18n ( "Selected type: %1" ).arg ( "L2TP (OpenS/WAN)" ), KVpncConfig::debug );
1123
GlobalConfig->appendLogEntry ( i18n ( "Selected type: %1" , QString( "L2TP (OpenS/WAN)" ) ), KVpncConfig::debug );
866
1125
else if ( newprofilewizardtypeselectionpagecontent->OpenvpnRadioButton->isChecked() )
948
1214
removePage ( newprofilewizardciscomanuallypage );
949
1215
removePage ( newprofilewizardracoonpage );
950
1216
removePage ( newprofilewizardpptppage );
1217
removePage ( newprofilewizardfreeswanpage );
1218
removePage ( newprofilewizardfreeswanselectionpage );
951
1219
removePage ( newprofilewizardopenvpnpage );
952
1220
newprofilewizardnetworkcontent->LabelRemoteNetwork->hide();
953
1221
newprofilewizardnetworkcontent->RemoteNetMaskComboBox->hide();
954
1222
newprofilewizardnetworkcontent->RemoteNetAddrLineEdit->hide();
955
1223
newprofilewizardnetworkcontent->RemoteNetDividetextLabel->hide();
957
1226
insertPage ( newprofilewizardvtunpage, "<b>" + i18n ( "Vtun options" ) + "</b>",2 );
960
if ( GlobalConfig->KvpncDebugLevel > 0 )
961
GlobalConfig->appendLogEntry ( i18n ( "Selected type: %1" ).arg ( "Vtun" ), KVpncConfig::debug );
1227
insertPage ( newprofilewizardnetworkpage, "<b>" + i18n ( "Network settings" ) + "</b>", indexOf ( currentpage ) + 3 );
1228
insertPage ( newprofilewizardnetworkroutepage, "<b>" + i18n ( "Network routes" ) + "</b>", indexOf ( currentpage ) + 4 );
1231
if ( GlobalConfig->KvpncDebugLevel > 0 )
1232
GlobalConfig->appendLogEntry ( i18n ( "Selected type: %1" , QString( "Vtun" )), KVpncConfig::debug );
1234
else if ( newprofilewizardtypeselectionpagecontent->SshRadioButton->isChecked() )
1236
profileData->setConnectionType ( VpnAccountData::ssh );
1237
profileData->setRemotePort ( 22 );
1238
profileData->setUseSmartcard ( false );
1239
profileData->setTunnelDeviceType("tun");
1240
removePage ( newprofilewizardvtunpage);
1241
removePage ( newprofilewizardciscoselectionpage );
1242
removePage ( newprofilewizardciscomanuallypage );
1243
removePage ( newprofilewizardracoonpage );
1244
removePage ( newprofilewizardpptppage );
1245
removePage ( newprofilewizardfreeswanpage );
1246
removePage ( newprofilewizardfreeswanselectionpage );
1247
removePage ( newprofilewizardopenvpnpage );
1248
newprofilewizardnetworkcontent->LabelRemoteNetwork->hide();
1249
newprofilewizardnetworkcontent->RemoteNetMaskComboBox->hide();
1250
newprofilewizardnetworkcontent->RemoteNetAddrLineEdit->hide();
1251
newprofilewizardnetworkcontent->RemoteNetDividetextLabel->hide();
1253
profilenetworkvirtualipoptionscontent->SourceIpgroupBox->hide();
1255
newprofilewizardnetworkcontent->LabelRemoteNetwork->hide();
1256
newprofilewizardnetworkcontent->RemoteNetMaskComboBox->hide();
1257
newprofilewizardnetworkcontent->RemoteNetAddrLineEdit->hide();
1258
newprofilewizardnetworkcontent->RemoteNetDividetextLabel->hide();
1259
newprofilewizardnetworkcontent->UseRemoteNetworkCheckBox->hide();
1260
newprofilewizardnetworkcontent->RemoteNetworkGroupBox->hide();
1262
newprofilewizardnetworkcontent->TunnelDeviceTypeLabel->show();
1263
newprofilewizardnetworkcontent->TunnelDeviceTypeComboBox->show();
1264
newprofilewizardnetworkcontent->TunnelDeviceTypeLabel->setEnabled(true);
1265
newprofilewizardnetworkcontent->TunnelDeviceTypeComboBox->setEnabled(true);
1268
profilenetworkvirtualipoptionscontent->UseVirtualIPCheckBox->setChecked(true);
1269
newprofilewizarduserpagecontent->UsernameLineEdit->setText("root");
1271
insertPage ( newprofilewizarduserpage, "<b>" + i18n ( "User settings" ) + "</b>", indexOf ( currentpage ) + 1 );
1272
insertPage ( newprofilewizardsshpage, "<b>" + i18n ( "SSH options" ) + "</b>",2 );
1273
insertPage ( newprofilewizardnetworkpage, "<b>" + i18n ( "Network settings" ) + "</b>", indexOf ( currentpage ) + 3 );
1274
insertPage ( newprofilewizardnetworkroutepage, "<b>" + i18n ( "Network routes" ) + "</b>", indexOf ( currentpage ) + 4 );
1276
if ( GlobalConfig->KvpncDebugLevel > 0 )
1277
GlobalConfig->appendLogEntry ( i18n ( "Selected type: %1" , QString( "SSH" )), KVpncConfig::debug );
963
1281
QString type = ""; // visible name
964
1282
QString bin = ""; // executable name
965
1283
if ( profileData->getConnectionType() == VpnAccountData::cisco )
1159
1487
profileData->setPreSharedKey ( newprofilewizardciscomanuallypagecontent->GroupPasswordLineEdit->text() );
1489
profileData->setSavePsk ( newprofilewizardciscomanuallypagecontent->CheckSavePsk->isChecked() );
1161
1491
profileData->setID ( newprofilewizardciscomanuallypagecontent->IDLineEdit->text() );
1162
1492
profileData->setAllowEmptyGroupPassword ( newprofilewizardciscomanuallypagecontent->AllowEmptyGroupPasswordCheckBox->isChecked() );
1494
profileData->setUseDpdIdleTimeout(true);
1495
if (profileData->getConnectionType() == VpnAccountData::cisco )
1496
profileData->setDpdIdleTimeout(300);
1497
if (profileData->getConnectionType() == VpnAccountData::ciscoorig )
1498
profileData->setDpdIdleTimeout(90);
1164
1500
insertPage ( newprofilewizarduserpage, "<b>" + i18n ( "User settings" ) + "</b>", indexOf ( currentpage ) + 1 );
1165
insertPage ( newprofilewizardnatpage, "<b>" + i18n ( "NAT settings" ) + "</b>", indexOf ( currentpage ) + 2 );
1501
insertPage ( newprofilewizardnetworkpage, "<b>" + i18n ( "Network settings" ) + "</b>", indexOf ( currentpage ) + 2 );
1502
insertPage ( newprofilewizardnatpage, "<b>" + i18n ( "NAT settings" ) + "</b>", indexOf ( currentpage ) + 3 );
1503
insertPage ( newprofilewizardnetworkroutepage, "<b>" + i18n ( "Network routes" ) + "</b>", indexOf ( currentpage ) + 4 );
1168
1506
else if ( currentpage == newprofilewizardfreeswanpage )
1508
msg = i18n ( "These fields must be filled in:\n" );
1509
profileData->setUseModeConfig ( newprofilewizardfreeswanpagecontent->UseModeConfigCheckBox->isChecked() );
1510
if ( GlobalConfig->KvpncDebugLevel > 0 )
1512
if ( newprofilewizardfreeswanpagecontent->UseModeConfigCheckBox->isChecked() )
1513
GlobalConfig->appendLogEntry ( i18n ( "Use Mode Config: %1" , i18n ( "yes" ) ), KVpncConfig::debug );
1515
GlobalConfig->appendLogEntry ( i18n ( "Use Mode Config: %1" , i18n ( "no" ) ), KVpncConfig::debug );
1518
profileData->setExchangeMode ( newprofilewizardfreeswanpagecontent->ExchangeModeComboBox->currentText() );
1519
if ( GlobalConfig->KvpncDebugLevel > 0 )
1520
GlobalConfig->appendLogEntry ( i18n ( "Exchange mode (%1): %2" ,QString( "ipsec" ), newprofilewizardfreeswanpagecontent->ExchangeModeComboBox->currentText() ), KVpncConfig::debug );
1522
profileData->setLeftNextHop ( newprofilewizardfreeswanpagecontent->LeftNextHopLineEdit->text() ); //TODO check valid IP
1523
profileData->setRightNextHop ( newprofilewizardfreeswanpagecontent->RightNextHopLineEdit->text( ) ); //TODO check valid IP
1524
profileData->setDisableOpportunisticEncryption ( newprofilewizardfreeswanpagecontent->DisableOpportunisticEncryptionCheckBox->isChecked( ) );
1527
if (newprofilewizardfreeswanpagecontent->UseXauthCheckBox->isChecked())
1529
profileData->setAuthWithUsernameAndPassword(true);
1533
profileData->setAuthWithUsernameAndPassword(false);
1536
if ( GlobalConfig->KvpncDebugLevel > 0 )
1538
if ( newprofilewizardfreeswanpagecontent->DisableOpportunisticEncryptionCheckBox->isChecked() )
1539
GlobalConfig->appendLogEntry ( i18n ( "Disable opportunistic encryption: %1" , i18n ( "yes" ) ), KVpncConfig::debug );
1541
GlobalConfig->appendLogEntry ( i18n ( "Disable opportunistic encryption: %1" , i18n ( "no" ) ), KVpncConfig::debug );
1542
GlobalConfig->appendLogEntry ( i18n ( "Right next hop: %1" , newprofilewizardfreeswanpagecontent->RightNextHopLineEdit->text() ), KVpncConfig::debug );
1543
GlobalConfig->appendLogEntry ( i18n ( "Left next hop: %1" , newprofilewizardfreeswanpagecontent->LeftNextHopLineEdit->text() ), KVpncConfig::debug );
1544
GlobalConfig->appendLogEntry ( i18n ( "Use PFS: %1" , profileData->getPerfectForwardSecrety() ), KVpncConfig::debug );
1548
profileData->setExchangeMode ( newprofilewizardfreeswanpagecontent->ExchangeModeComboBox->currentText() );
1550
if (newprofilewizardfreeswanpagecontent->UseXauthCheckBox->isChecked())
1552
if ( newprofilewizardfreeswanpagecontent->LocalIDLineEdit->text().isEmpty() )
1555
msg += "- " + i18n ( "Local ID (Group ID)" ) + "\n";
1556
GlobalConfig->appendLogEntry ( i18n ( "Local ID (Group ID) is empty!" ), GlobalConfig->error );
1558
profileData->setUseSpecialLocalID(true);
1561
profileData->setLocalIDType ( newprofilewizardfreeswanpagecontent->LocalIdTypeCombobox->currentText() );
1563
if ( GlobalConfig->KvpncDebugLevel > 0 )
1564
GlobalConfig->appendLogEntry ( i18n ( "Type of local ID: %1" , newprofilewizardfreeswanpagecontent->LocalIdTypeCombobox->currentText() ), KVpncConfig::debug );
1566
profileData->setSpecialLocalID ( newprofilewizardfreeswanpagecontent->LocalIDLineEdit->text() );
1567
if ( GlobalConfig->KvpncDebugLevel > 0 )
1568
GlobalConfig->appendLogEntry ( i18n ( "Local ID value: %1" , newprofilewizardfreeswanpagecontent->LocalIDLineEdit->text() ), KVpncConfig::debug );
1571
QStringList IkeList;
1572
QStringList EspList;
1574
if (newprofilewizardfreeswanpagecontent->IkeAes256Sha1CheckBox->isChecked())
1575
IkeList.append("aes256-sha1");
1576
if (newprofilewizardfreeswanpagecontent->IkeAes128Sha1CheckBox->isChecked())
1577
IkeList.append("aes128-sha1");
1578
if (newprofilewizardfreeswanpagecontent->IkeDesSha1Modp2048CheckBox->isChecked())
1579
IkeList.append("3des-sha1-modp2048");
1580
if (newprofilewizardfreeswanpagecontent->IkeDesMd5CheckBox->isChecked())
1581
IkeList.append("3des-md5");
1582
if (newprofilewizardfreeswanpagecontent->IkeDesSha1CheckBox->isChecked())
1583
IkeList.append("3des-sha1");
1585
if (!newprofilewizardfreeswanpagecontent->OtherIkeLineEdit->text().isEmpty())
1586
IkeList.append(newprofilewizardfreeswanpagecontent->OtherIkeLineEdit->text());
1588
if (newprofilewizardfreeswanpagecontent->Esp3desMd5CheckBox->isChecked())
1589
EspList.append("3des-md5");
1590
if (newprofilewizardfreeswanpagecontent->EspDesSha1CheckBox->isChecked())
1591
EspList.append("3des-sha1");
1592
if (newprofilewizardfreeswanpagecontent->EspAes128Sha1CheckBox->isChecked())
1593
EspList.append( "aes128-sha1");
1594
if (newprofilewizardfreeswanpagecontent->EspAes256Sha1CheckBox->isChecked())
1595
EspList.append( "aes256-sha1");
1597
if (!newprofilewizardfreeswanpagecontent->OtherEspLineEdit->text().isEmpty())
1598
EspList.append(newprofilewizardfreeswanpagecontent->OtherEspLineEdit->text());
1600
// for ( QStringList::Iterator ikeit = IkeList.begin(); ikeit != IkeList.end(); ++ikeit )
1601
// std::cout << "ike: " << *ikeit << ":" << std::endl;
1603
// for ( QStringList::Iterator espit = EspList.begin(); espit != EspList.end(); ++espit )
1604
// std::cout << "esp: " << *espit << ":" << std::endl;
1606
if(newprofilewizardfreeswanpagecontent->UseCustomEspCheckBox->isChecked() && !EspList.isEmpty())
1608
profileData->setUseCustomEsp(true);
1609
if ( GlobalConfig->KvpncDebugLevel > 0 )
1610
GlobalConfig->appendLogEntry ( i18n ( "Use custom %1: %2" , i18n("ESP") , i18n("yes")), KVpncConfig::debug );
1612
profileData->setIpsecEsp(EspList.join(","));
1614
if ( GlobalConfig->KvpncDebugLevel > 0 )
1615
GlobalConfig->appendLogEntry ( i18n ( "ESP settings: %1" , EspList.join(",") ), KVpncConfig::debug );
1618
else if(newprofilewizardfreeswanpagecontent->UseCustomEspCheckBox->isChecked() && EspList.isEmpty())
1621
msg += "- " + i18n ( "Use custom ESP checked but none selected!" ) + "\n";
1622
GlobalConfig->appendLogEntry ( i18n ( "Use custom ESP checked but none selected!" ), GlobalConfig->error );
1624
else if(!newprofilewizardfreeswanpagecontent->UseCustomEspCheckBox->isChecked())
1626
profileData->setUseCustomEsp(false);
1627
if ( GlobalConfig->KvpncDebugLevel > 0 )
1628
GlobalConfig->appendLogEntry ( i18n ( "Use custom %1: %2" , i18n("ESP") , i18n("no")), KVpncConfig::debug );
1631
if(newprofilewizardfreeswanpagecontent->UseCustomIkeCheckBox->isChecked() && !IkeList.isEmpty())
1633
profileData->setUseCustomIke(true);
1634
if ( GlobalConfig->KvpncDebugLevel > 0 )
1635
GlobalConfig->appendLogEntry ( i18n ( "Use custom %1: %2" , i18n("IKE") , i18n("yes")), KVpncConfig::debug );
1637
profileData->setIpsecIke(IkeList.join(","));
1639
if ( GlobalConfig->KvpncDebugLevel > 0 )
1640
GlobalConfig->appendLogEntry ( i18n ( "IKE settings: %1" , IkeList.join(",") ), KVpncConfig::debug );
1643
else if(newprofilewizardfreeswanpagecontent->UseCustomIkeCheckBox->isChecked() && IkeList.isEmpty())
1646
msg += "- " + i18n ( "Use custom IKE checked but none selected!" ) + "\n";
1647
GlobalConfig->appendLogEntry ( i18n ( "Use custom IKE checked but none selected!" ), GlobalConfig->error );
1649
else if (!newprofilewizardfreeswanpagecontent->UseCustomIkeCheckBox->isChecked())
1651
profileData->setUseCustomIke(false);
1652
if ( GlobalConfig->KvpncDebugLevel > 0 )
1653
GlobalConfig->appendLogEntry ( i18n ( "Use custom %1: %2" , QString( i18n("IKE") ),i18n("false")), KVpncConfig::debug );
1658
if (newprofilewizardfreeswanpagecontent->UseXauthCheckBox->isChecked())
1660
if (GlobalConfig->KvpncDebugLevel > 1)
1661
GlobalConfig->appendLogEntry ( i18n ( "Authenticate with username and password: %1" , QString( i18n ( "yes" ) )), KVpncConfig::debug );
1662
profileData->setAuthWithUsernameAndPassword(true);
1664
insertPage ( newprofilewizarduserpage, "<b>" + i18n ( "User settings" ) + "</b>", indexOf ( currentpage ) + 1 );
1665
insertPage ( newprofilewizardnetworkpage, "<b>" + i18n ( "Network settings" ) + "</b>", indexOf ( currentpage ) + 2 );
1666
insertPage ( newprofilewizardnatpage, "<b>" + i18n ( "NAT settings" ) + "</b>", indexOf ( currentpage ) + 3 );
1667
insertPage ( newprofilewizardnetworkroutepage, "<b>" + i18n ( "Network routes" ) + "</b>", indexOf ( currentpage ) + 4 );
1671
if (GlobalConfig->KvpncDebugLevel > 1)
1672
GlobalConfig->appendLogEntry ( i18n ( "Authenticate with username and password: %1" , QString( i18n ( "no" ) )), KVpncConfig::debug );
1674
insertPage ( newprofilewizardnetworkpage, "<b>" + i18n ( "Network settings" ) + "</b>", indexOf ( currentpage ) + 1 );
1675
insertPage ( newprofilewizardnatpage, "<b>" + i18n ( "NAT settings" ) + "</b>", indexOf ( currentpage ) + 2 );
1676
insertPage ( newprofilewizardnetworkroutepage, "<b>" + i18n ( "Network routes" ) + "</b>", indexOf ( currentpage ) + 3 );
1681
else if ( currentpage == newprofilewizardfreeswanselectionpage )
1683
if ( newprofilewizardfreeswanselectionpagecontent->OpenvpnImportRadioButton->isChecked() )
1685
enterdatamanually = false;
1686
removePage ( newprofilewizardfreeswanpage );
1687
if ( GlobalConfig->KvpncDebugLevel > 0 )
1688
GlobalConfig->appendLogEntry ( i18n ( "IPSec selection: import profile file" ), KVpncConfig::debug );
1690
// removePage ( newprofilewizardgeneralpage );
1691
// removePage ( newprofilewizardvirtualipaddresspage );
1693
if ( importProfile ( VpnAccountData::freeswan ) == true )
1695
newProfileCreated = true;
1696
newprofilewizardgeneralpagecontent->NameLineEdit->setText ( profileData->getName() );
1697
newprofilewizardgeneralpagecontent->gatewayLineEdit->setText ( profileData->getGateway() );
1698
newprofilewizardgeneralpagecontent->DescriptionLineEdit->setText ( profileData->getDescription() );
1703
newProfileCreated = false;
1709
enterdatamanually = true;
1710
insertPage ( newprofilewizardfreeswanpage, "<b>" + i18n ( "IPSec settings" ) + "</b>", indexOf ( currentpage ) + 1 );
1711
insertPage ( newprofilewizardauthselectionpage, i18n ( "Authentication settings" ), indexOf ( currentpage ) + 1 );
1712
if ( GlobalConfig->KvpncDebugLevel > 0 )
1713
GlobalConfig->appendLogEntry ( i18n ( "IPSec selection: enter data manually" ), KVpncConfig::debug );
1170
1717
else if ( currentpage == newprofilewizardracoonpage )
1172
1719
if ( newprofilewizardracoonpagecontent->HashAlgoComboBox->currentText() == "SHA1" )
1187
1734
if ( GlobalConfig->KvpncDebugLevel > 0 )
1189
1736
if ( newprofilewizardracoonpagecontent->UseModeConfigCheckBox->isChecked() )
1190
GlobalConfig->appendLogEntry ( i18n ( "Use Mode Config: %1" ).arg ( i18n ( "yes" ) ), KVpncConfig::debug );
1737
GlobalConfig->appendLogEntry ( i18n ( "Use Mode Config: %1", i18n ( "yes" ) ), KVpncConfig::debug );
1192
GlobalConfig->appendLogEntry ( i18n ( "Use Mode Config: %1" ).arg ( i18n ( "no" ) ), KVpncConfig::debug );
1739
GlobalConfig->appendLogEntry ( i18n ( "Use Mode Config: %1" , i18n ( "no" ) ), KVpncConfig::debug );
1196
1743
profileData->setExchangeMode ( newprofilewizardracoonpagecontent->ExchangeModeComboBox->currentText() );
1197
1744
if ( GlobalConfig->KvpncDebugLevel > 0 )
1198
GlobalConfig->appendLogEntry ( i18n ( "Exchange mode (%1): %2" ).arg ( "racoon" ).arg ( newprofilewizardracoonpagecontent->ExchangeModeComboBox->currentText() ), KVpncConfig::debug );
1745
GlobalConfig->appendLogEntry ( i18n ( "Exchange mode (%1): %2" , QString( "racoon" ), newprofilewizardracoonpagecontent->ExchangeModeComboBox->currentText() ), KVpncConfig::debug );
1200
1747
profileData->setIkeGroup ( newprofilewizardracoonpagecontent->DHGroupComboBox->currentText() );
1201
1748
if ( GlobalConfig->KvpncDebugLevel > 0 )
1202
GlobalConfig->appendLogEntry ( i18n ( "DH group (%1): %2" ).arg ( "racoon" ).arg ( newprofilewizardracoonpagecontent->DHGroupComboBox->currentText() ), KVpncConfig::debug );
1204
profileData->setExchangeMode ( newprofilewizardracoonpagecontent->AuthenticationAlgorithmComboBox->currentText() );
1205
if ( GlobalConfig->KvpncDebugLevel > 0 )
1206
GlobalConfig->appendLogEntry ( i18n ( "Authentication algorithm (%1): %2" ).arg ( "racoon" ).arg ( newprofilewizardracoonpagecontent->AuthenticationAlgorithmComboBox->currentText() ), KVpncConfig::debug );
1208
profileData->setExchangeMode ( newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->currentText() );
1209
if ( GlobalConfig->KvpncDebugLevel > 0 )
1210
GlobalConfig->appendLogEntry ( i18n ( "Encryption algorithm (%1): %2" ).arg ( "racoon" ).arg ( newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->currentText() ), KVpncConfig::debug );
1212
if ( newprofilewizardtypeselectionpagecontent->FreeswanRadioButton->isChecked() )
1214
profileData->setLeftNextHop ( newprofilewizardracoonpagecontent->LeftNextHopLineEdit->text() ); //TODO check valid IP
1215
profileData->setRightNextHop ( newprofilewizardracoonpagecontent->RightNextHopLineEdit->text( ) ); //TODO check valid IP
1216
profileData->setDisableOpportunisticEncryption ( newprofilewizardracoonpagecontent->DisableOpportunisticEncryptionCheckBox->isChecked( ) );
1218
if ( GlobalConfig->KvpncDebugLevel > 0 )
1220
if ( newprofilewizardracoonpagecontent->DisableOpportunisticEncryptionCheckBox->isChecked() )
1221
GlobalConfig->appendLogEntry ( i18n ( "Disable opportunistic encryption: %1" ).arg ( i18n ( "yes" ) ).arg ( newprofilewizardracoonpagecontent->HashAlgoComboBox->currentText() ), KVpncConfig::debug );
1223
GlobalConfig->appendLogEntry ( i18n ( "Disable opportunistic encryption: %1" ).arg ( i18n ( "no" ) ).arg ( newprofilewizardracoonpagecontent->HashAlgoComboBox->currentText() ), KVpncConfig::debug );
1224
GlobalConfig->appendLogEntry ( i18n ( "Right next hop: %1" ).arg ( newprofilewizardracoonpagecontent->RightNextHopLineEdit->text() ), KVpncConfig::debug );
1225
GlobalConfig->appendLogEntry ( i18n ( "Left next hop: %1" ).arg ( newprofilewizardracoonpagecontent->LeftNextHopLineEdit->text() ), KVpncConfig::debug );
1226
GlobalConfig->appendLogEntry ( i18n ( "Disable PFS: %1" ).arg ( profileData->getPerfectForwardSecrety() ), KVpncConfig::debug );
1230
profileData->setExchangeMode ( newprofilewizardracoonpagecontent->ExchangeModeComboBox->currentText() );
1232
if ( GlobalConfig->KvpncDebugLevel > 0 )
1233
GlobalConfig->appendLogEntry ( i18n ( "Exchange Mode: %1" ).arg ( newprofilewizardracoonpagecontent->ExchangeModeComboBox->currentText() ), KVpncConfig::debug );
1749
GlobalConfig->appendLogEntry ( i18n ( "DH group (%1): %2" , QString( "racoon" ), newprofilewizardracoonpagecontent->DHGroupComboBox->currentText() ), KVpncConfig::debug );
1751
profileData->setAuthenticationAlgorithm( newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->currentText() );
1752
if ( GlobalConfig->KvpncDebugLevel > 0 )
1753
GlobalConfig->appendLogEntry ( i18n ( "Authentication algorithm (%1) (phase 2): %2" , QString( "racoon" ), newprofilewizardracoonpagecontent->AuthenticationAlgorithm2ComboBox->currentText() ),KVpncConfig::debug );
1755
profileData->setIpsecIke(newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->currentText());
1756
profileData->setUseAuthenticationAlgorithm(true);
1757
if ( GlobalConfig->KvpncDebugLevel > 0 )
1758
GlobalConfig->appendLogEntry ( i18n ( "Encryption algorithm (%1) (phase 1): %2" , QString("racoon" ), newprofilewizardracoonpagecontent->EncryptionAlgorithmComboBox->currentText() ), KVpncConfig::debug );
1235
1760
profileData->setLocalIDType ( newprofilewizardracoonpagecontent->LocalIdTypeCombobox->currentText() );
1237
1762
if ( GlobalConfig->KvpncDebugLevel > 0 )
1238
GlobalConfig->appendLogEntry ( i18n ( "Type of local ID: %1" ).arg ( newprofilewizardracoonpagecontent->LocalIdTypeCombobox->currentText() ), KVpncConfig::debug );
1763
GlobalConfig->appendLogEntry ( i18n ( "Type of local ID: %1", QString(newprofilewizardracoonpagecontent->LocalIdTypeCombobox->currentText() )), KVpncConfig::debug );
1240
1765
profileData->setSpecialLocalID ( newprofilewizardracoonpagecontent->LocalIDLineEdit->text() );
1241
if ( GlobalConfig->KvpncDebugLevel > 0 )
1242
GlobalConfig->appendLogEntry ( i18n ( "Local ID value: %1" ).arg ( newprofilewizardracoonpagecontent->LocalIDLineEdit->text() ), KVpncConfig::debug );
1245
insertPage ( newprofilewizardnatpage, "<b>" + i18n ( "NAT settings" ) + "</b>", indexOf ( currentpage ) + 1 );
1766
if ( GlobalConfig->KvpncDebugLevel > 0 )
1767
GlobalConfig->appendLogEntry ( i18n ( "Local ID value: %1" , QString( newprofilewizardracoonpagecontent->LocalIDLineEdit->text() )), KVpncConfig::debug );
1769
if ( GlobalConfig->KvpncDebugLevel > 0 )
1770
GlobalConfig->appendLogEntry ( i18n ( "Type of remote ID: %1", QString(newprofilewizardracoonpagecontent->RemoteIdTypeCombobox->currentText() )), KVpncConfig::debug );
1772
profileData->setSpecialLocalID ( newprofilewizardracoonpagecontent->RemoteIDLineEdit->text() );
1773
if ( GlobalConfig->KvpncDebugLevel > 0 )
1774
GlobalConfig->appendLogEntry ( i18n ( "Remote ID value: %1" , QString(newprofilewizardracoonpagecontent->RemoteIDLineEdit->text() )), KVpncConfig::debug );
1777
if (newprofilewizardracoonpagecontent->UseXauthCheckBox->isChecked())
1779
profileData->setAuthWithUsernameAndPassword(true);
1780
if ( GlobalConfig->KvpncDebugLevel > 1 )
1781
GlobalConfig->appendLogEntry ( i18n ( "Authenticate with username and password: %1", QString( i18n ( "yes" ) )), KVpncConfig::debug );
1782
insertPage ( newprofilewizarduserpage, "<b>" + i18n ( "User settings" ) + "</b>", indexOf ( currentpage ) + 1 );
1783
insertPage ( newprofilewizardnetworkpage, "<b>" + i18n ( "Network settings" ) + "</b>", indexOf ( currentpage ) + 2 );
1784
insertPage ( newprofilewizardnatpage, "<b>" + i18n ( "NAT settings" ) + "</b>", indexOf ( currentpage ) + 3 );
1785
insertPage ( newprofilewizardnetworkroutepage, "<b>" + i18n ( "Network routes" ) + "</b>", indexOf ( currentpage ) +4 );
1790
if ( GlobalConfig->KvpncDebugLevel > 1 )
1791
GlobalConfig->appendLogEntry ( i18n ( "Authenticate with username and password: %1" , QString( i18n ( "no" ) )), KVpncConfig::debug );
1792
insertPage ( newprofilewizardnetworkpage, "<b>" + i18n ( "Network settings" ) + "</b>", indexOf ( currentpage ) + 1 );
1793
insertPage ( newprofilewizardnatpage, "<b>" + i18n ( "NAT settings" ) + "</b>", indexOf ( currentpage ) + 2 );
1794
insertPage ( newprofilewizardnetworkroutepage, "<b>" + i18n ( "Network routes" ) + "</b>", indexOf ( currentpage ) +3 );
1247
1797
else if ( currentpage == newprofilewizardopenvpnpage )
1249
1799
msg = i18n ( "These fields must be filled in:\n" );
1250
1800
profileData->setTunnelDeviceType ( newprofilewizardopenvpnpagecontent->TunnelDeviceTypeComboBox->currentText() );
1251
1801
if ( GlobalConfig->KvpncDebugLevel > 0 )
1252
GlobalConfig->appendLogEntry ( i18n ( "Tunnel device type (%1): %2" ).arg ( "OpenVPN" ).arg ( newprofilewizardopenvpnpagecontent->TunnelDeviceTypeComboBox->currentText() ), KVpncConfig::debug );
1802
GlobalConfig->appendLogEntry ( i18n ( "Tunnel device type (%1): %2", QString("OpenVPN" ), newprofilewizardopenvpnpagecontent->TunnelDeviceTypeComboBox->currentText() ), KVpncConfig::debug );
1254
1804
if ( newprofilewizardopenvpnpagecontent->NsCertTypeComboBox->currentText() == "client" )
1255
1805
profileData->setNsCertType ( "client" );
1445
2001
newprofilewizardcertcontent->x509certComboBox->show();
1446
2002
newprofilewizardcertcontent->x509certComboBox->sizeHint();
1447
2003
newprofilewizardcertcontent->x509certComboBox->setCurrentItem(0);
1451
2007
if ( GlobalConfig->KvpncDebugLevel > 0 )
1452
2008
GlobalConfig->appendLogEntry ( i18n ( "Auth selection: use certificate" ), KVpncConfig::debug );
2010
if ( newprofilewizardauthselectioncontent->HybridRadioButton->isChecked() )
2014
profileData->setAuthType ( VpnAccountData::hybrid );
2015
insertPage ( newprofilewizardcertpage, "<b>" + i18n ( "Certificate settings" ) + "</b>", indexOf ( currentpage ) + 1 );
2017
// racoon or freeswan
2018
if ( profileData->getConnectionType() == VpnAccountData::racoon || profileData->getConnectionType() == VpnAccountData::l2tpd_racoon )
2020
newprofilewizardpskcontent->PSKLineEdit->setEnabled ( true );
2021
newprofilewizardfreeswanpagecontent->UseXauthCheckBox->setEnabled ( true );
2022
newprofilewizardracoonpagecontent->UseXauthCheckBox->setEnabled ( true );
2024
newprofilewizardcertpage->setEnabled(true);
2025
newprofilewizardcertcontent->x509certComboBox->setEnabled(false);
2026
newprofilewizardcertcontent->x509certURLRequester->setEnabled(false);
2027
newprofilewizardcertcontent->CaCertpathURLRequester->setEnabled(true);
2028
newprofilewizardcertcontent->certpathURLRequester->setUrl(KUrl("/etc/racoon/certs"));
2029
newprofilewizardcertcontent->LabelCertificate->setEnabled(false);
2030
newprofilewizardcertcontent->LabelPrivateKeyPath->setEnabled(false);
2031
newprofilewizardcertcontent->LabelPrivateKeyPassword->setEnabled(false);
2032
newprofilewizardcertcontent->SpecialServerCertificateURLRequester->setEnabled(false);
2033
newprofilewizardcertcontent->PrivkeyPasswordEdit->setEnabled(false);
2034
newprofilewizardcertcontent->RemoteIDLineEdit->setEnabled(false);
2035
newprofilewizardcertcontent->UseSpecialRemoteIDcheckBox->setEnabled(false);
2036
newprofilewizardcertcontent->UseSpecialServerCertificateCheckBox->setEnabled(false);
2037
newprofilewizardcertcontent->privkeypathURLRequester->setEnabled(false);
2038
newprofilewizardpskcontent->setEnabled(false);
2042
else if ( profileData->getConnectionType() == VpnAccountData::ciscoorig )
2044
insertPage ( newprofilewizardciscomanuallypage, "<b>" + i18n ( "Cisco settings" ) + "</b>", indexOf ( currentpage ) + 1 );
2045
removePage( newprofilewizardpskpage);
2047
if ( GlobalConfig->KvpncDebugLevel > 0 )
2048
GlobalConfig->appendLogEntry ( i18n ( "Auth selection: use Hybrid" ), KVpncConfig::debug );
1455
2051
else if ( currentpage == newprofilewizardp12certselectionpage )
1588
2184
msg = i18n ( "These fields must be filled in:\n" );
1590
profileData->setRefuseEap ( newprofilewizardpptppagecontent->RefuseEapCheckbox->isChecked() );
1591
profileData->setRequireMppe ( newprofilewizardpptppagecontent->RequireMppeCheckbox->isChecked() );
1592
profileData->setRefuse128BitEncryption ( newprofilewizardpptppagecontent->Refuse128BitEncryptionCheckbox->isChecked() );
1593
profileData->setRefuse40BitEncryption ( newprofilewizardpptppagecontent->Refuse40BitEncryptionCheckbox->isChecked() );
1594
profileData->setDisableMPPEComp ( newprofilewizardpptppagecontent->UseNoMPPECompressionCheckbox->isChecked() );
1595
profileData->setUseGetDnsFromPeer ( newprofilewizardpptppagecontent->GetDnsFromPeerCheckbox->isChecked() );
1596
profileData->setUseDnsServer ( newprofilewizardpptppagecontent->DnsServerCheckbox->isChecked() );
1597
profileData->setDnsServer ( newprofilewizardpptppagecontent->DnsServerLineedit->text() );
1598
profileData->setUseNoBsdComp ( newprofilewizardpptppagecontent->UseNoBsdCompCheckbox->isChecked() );
1599
profileData->setUseNoDeflate ( newprofilewizardpptppagecontent->UseNoDeflateCheckbox->isChecked() );
1601
profileData->setAllowStatefulMode ( newprofilewizardpptppagecontent->AllowStatefulModeCheckbox->isChecked() );
1602
profileData->setUseNoIpDefault ( newprofilewizardpptppagecontent->UseNoIpDefaultCheckbox->isChecked() );
1603
profileData->setDisableMPPEComp ( newprofilewizardpptppagecontent->UseNoMPPECompressionCheckbox->isChecked() );
2185
profileData->setAllowStatefulMode( newprofilewizardpptppagecontent->AllowStatefulModeCheckbox->isChecked() );
2186
profileData->setUseNoIpDefault( newprofilewizardpptppagecontent->UseNoIpDefaultCheckbox->isChecked() );
2187
profileData->setDisableMPPEComp( newprofilewizardpptppagecontent->UseNoMPPECompressionCheckbox->isChecked() );
2188
profileData->setRequireMppe( newprofilewizardpptppagecontent->RequireMppeCheckbox->isChecked() );
2189
profileData->setRefuse128BitEncryption( newprofilewizardpptppagecontent->Refuse128BitEncryptionCheckbox->isChecked() );
2190
profileData->setRefuse40BitEncryption( newprofilewizardpptppagecontent->Refuse40BitEncryptionCheckbox->isChecked() );
2191
profileData->setDisableMPPEComp( newprofilewizardpptppagecontent->UseNoMPPECompressionCheckbox->isChecked() );
2192
profileData->setUseGetDnsFromPeer( newprofilewizardpptppagecontent->GetDnsFromPeerCheckbox->isChecked() );
2193
profileData->setUseNoBsdComp( newprofilewizardpptppagecontent->UseNoBsdCompCheckbox->isChecked() );
2194
profileData->setUseNoDeflate( newprofilewizardpptppagecontent->UseNoDeflateCheckbox->isChecked() );
2195
profileData->setDisableHeaderCompression(newprofilewizardpptppagecontent->DisableHeaderCompressionCheckbox->isChecked());
2196
profileData->setDisableMagicNumberNegotiation(newprofilewizardpptppagecontent->DisableMagicNumberNegotiationCheckbox->isChecked());
2197
profileData->setDisableIpx(newprofilewizardpptppagecontent->DisableIpxCheckbox->isChecked());
2198
profileData->setDisableAdressControlCompression(newprofilewizardpptppagecontent->DisableAdressControlCompressionCheckbox->isChecked());
2199
profileData->setDisableProtocolFieldCompression(newprofilewizardpptppagecontent->DisableProtocolFieldCompressionCheckbox->isChecked());
2200
profileData->setRequireEap(newprofilewizardpptppagecontent->RequireEapCheckbox->isChecked());
2202
if ( newprofilewizardpptppagecontent->DnsServerCheckbox->isChecked() )
2204
profileData->setUseDnsServer( true );
2205
profileData->setDnsServer( newprofilewizardpptppagecontent->DnsServerLineedit->text() );
2207
if ( GlobalConfig->KvpncDebugLevel > 0 )
2208
GlobalConfig->appendLogEntry ( i18n ( "Using custom DNS server: %1" , QString( profileData->getDnsServer())), KVpncConfig::debug );
2212
profileData->setUseDnsServer( false );
2215
if ( newprofilewizardpptppagecontent->UseSearchDomainInResolvConfCheckbox ->isChecked() )
2217
profileData->setUseSearchDomainInResolvConf(true);
2218
profileData->setSearchDomainInResolvConf(newprofilewizardpptppagecontent->SearchDomainInResolvConfLineedit->text());
2220
if ( GlobalConfig->KvpncDebugLevel > 0 )
2221
GlobalConfig->appendLogEntry ( i18n ( "Using custom DNS search domain: %1" , QString( profileData->getSearchDomainInResolvConf() )), KVpncConfig::debug );
2225
profileData->setUseSearchDomainInResolvConf(false);
1605
2228
if ( newprofilewizardpptppagecontent->AuthMethodComboBox->currentItem() == 0 )
1606
2229
profileData->setAuthMethod ( "chap" );
2230
if ( newprofilewizardpptppagecontent->AuthMethodComboBox->currentItem() == 1 )
1608
2231
profileData->setAuthMethod ( "pap" );
2232
if ( newprofilewizardpptppagecontent->AuthMethodComboBox->currentItem() == 2 )
2233
profileData->setAuthMethod ( "mschap" );
2234
if ( newprofilewizardpptppagecontent->AuthMethodComboBox->currentItem() == 3 )
2235
profileData->setAuthMethod ( "mschap-v2" );
2237
if ( GlobalConfig->KvpncDebugLevel > 0 )
2238
GlobalConfig->appendLogEntry ( i18n ( "Using auth method: %1" , QString( profileData->getAuthMethod()) ), KVpncConfig::debug );
1610
2240
newprofilewizardnetworkcontent->LabelRemoteNetwork->hide();
1611
2241
newprofilewizardnetworkcontent->RemoteNetMaskComboBox->hide();
1612
2242
newprofilewizardnetworkcontent->RemoteNetAddrLineEdit->hide();
1613
2243
newprofilewizardnetworkcontent->RemoteNetDividetextLabel->hide();
2244
newprofilewizardnetworkcontent->UseRemoteNetworkCheckBox->hide();
2245
newprofilewizardnetworkcontent->RemoteNetworkGroupBox->hide();
1615
2247
insertPage ( newprofilewizarduserpage, "<b>" + i18n ( "User settings" ) + "</b>", indexOf ( currentpage ) + 1 );
1638
2270
profileData->setVtunProfile ( newprofilewizardvtunpagecontent->VtunProfileLineEdit->text() );
2272
else if ( currentpage == newprofilewizardsshpage )
2274
msg = i18n ( "These fields must be filled in:\n" );
2275
profileData->setUseRemotePort( newprofilewizardsshpagecontent->UseUserdefinedRemotePortCheckBox->isChecked() );
2276
profileData->setRemotePort ( newprofilewizardsshpagecontent->UserdefinedRemotePortSpinBox->value() );
2278
if ( newprofilewizardsshpagecontent->UseUserdefinedRemotePortCheckBox->isChecked() )
2280
if ( GlobalConfig->KvpncDebugLevel > 0 )
2281
GlobalConfig->appendLogEntry ( i18n ( "SSH: use userdefined port: %1", QString( QString().setNum ( newprofilewizardsshpagecontent->UserdefinedRemotePortSpinBox->value() ) )), KVpncConfig::debug );
2284
// password or key auth
2285
if (newprofilewizardsshpagecontent->AuthPassRadioButton->isChecked())
2287
profileData->setAuthWithUsernameAndPassword(true);
2288
if ( GlobalConfig->KvpncDebugLevel > 0 )
2289
GlobalConfig->appendLogEntry ( i18n ( "SSH: use user password authentication" ) , KVpncConfig::debug );
2293
profileData->setAuthWithUsernameAndPassword(false);
2294
if ( GlobalConfig->KvpncDebugLevel > 0 )
2295
GlobalConfig->appendLogEntry ( i18n ( "SSH: use key authentication" ) , KVpncConfig::debug );
2298
profileData->setPreSharedKeyFile(newprofilewizardsshpagecontent->CostumkeyURLRequester->url().path());
2300
if (newprofilewizardsshpagecontent->CostumKeyRadioButton->isChecked())
2302
profileData->setPskIsInFile(newprofilewizardsshpagecontent->CostumKeyRadioButton->isChecked());
2303
profileData->setPreSharedKeyFile(newprofilewizardsshpagecontent->CostumkeyURLRequester->url().path());
2304
if ( GlobalConfig->KvpncDebugLevel > 0 )
2305
GlobalConfig->appendLogEntry ( i18n ( "SSH: use costum key: %1", QString(newprofilewizardsshpagecontent->CostumkeyURLRequester->url().path())) , KVpncConfig::debug );
2309
profileData->setPreSharedKey(newprofilewizardsshpagecontent->SshKeyComboBox->currentText());
2310
if ( GlobalConfig->KvpncDebugLevel > 0 )
2311
GlobalConfig->appendLogEntry ( i18n ( "SSH: use autotected key: %1" , QString(newprofilewizardsshpagecontent->SshKeyComboBox->currentText())) , KVpncConfig::debug );
2314
if (newprofilewizardsshpagecontent->UseSshConfigRemoteScriptCheckBox->isChecked() && !newprofilewizardsshpagecontent->SshConfigRemoteScriptLineEdit->text().isEmpty())
2316
profileData->setUseSshConfigRemoteScript(true);
2317
profileData->setSshConfigRemoteScript(newprofilewizardsshpagecontent->SshConfigRemoteScriptLineEdit->text());
2319
if ( GlobalConfig->KvpncDebugLevel > 0 )
2320
GlobalConfig->appendLogEntry ( i18n ( "SSH: use ssh config remote script: %1" , QString(newprofilewizardsshpagecontent->SshConfigRemoteScriptLineEdit->text())) , KVpncConfig::debug );
2324
profileData->setUseSshConfigRemoteScript(false);
2326
if (newprofilewizardsshpagecontent->UseSshConfigRemoteScriptCheckBox->isChecked() && newprofilewizardsshpagecontent->SshConfigRemoteScriptLineEdit->text().isEmpty())
2329
msg += "- " + i18n ( "Special server certificate" ) + "\n";
2330
GlobalConfig->appendLogEntry( i18n( "%1 cant be empty!" , QString("ssh config remote script")), GlobalConfig->error);
1640
2334
else if ( currentpage == newprofilewizardvirtualipaddresspage )
1642
2336
msg = i18n ( "These fields must be filled in:\n" );
1998
2717
if ( ( profileData->getConnectionType() == VpnAccountData::freeswan || profileData->getConnectionType() == VpnAccountData::racoon ||
1999
2718
profileData->getConnectionType() == VpnAccountData::l2tpd_freeswan || profileData->getConnectionType() == VpnAccountData::l2tpd_racoon ) )
2001
if ( !newprofilewizardnetworkcontent->RemoteNetAddrLineEdit->text().isEmpty() )
2720
if (newprofilewizardnetworkcontent->UseRemoteNetworkCheckBox->isChecked())
2003
if ( newprofilewizardnetworkcontent->RemoteNetAddrLineEdit->text().contains ( '.' ) != 3 )
2005
KMessageBox::error ( this, i18n ( "No IP address entered!" ), i18n ( "No IP Address" ) );
2011
QString addr = newprofilewizardnetworkcontent->RemoteNetAddrLineEdit->text();
2012
int part0 = addr.section ( '.', 0, 0 ).toInt();
2013
int part1 = addr.section ( '.', 1, 1 ).toInt();
2014
int part2 = addr.section ( '.', 2, 2 ).toInt();
2015
int part3 = addr.section ( '.', 3, 3 ).toInt();
2018
LogOutput->append ("part0: "+QString().setNum(part0));
2019
LogOutput->append ("part1: "+QString().setNum(part1));
2020
LogOutput->append ("part2: "+QString().setNum(part2));
2021
LogOutput->append ("part3: "+QString().setNum(part3));
2024
if ( ( part0 < 1 || part0 > 254 ) || ( part1 < 0 || part1 > 254 ) || ( part2 < 0 || part2 > 254 ) || ( part3 < 0 || part3 > 254 ) )
2722
if ( !newprofilewizardnetworkcontent->RemoteNetAddrLineEdit->text().isEmpty() )
2724
if ( newprofilewizardnetworkcontent->RemoteNetAddrLineEdit->text().contains ( '.' ) != 3 )
2026
KMessageBox::error ( this, i18n ( "Invalid values in IP address (remote net)!" ), i18n ( "Invalid Values in IP Address" ) );
2027
GlobalConfig->appendLogEntry ( i18n ( "Invalid values in IP address (remote net)!" ) , GlobalConfig->error );
2726
KMessageBox::error ( this, i18n ( "No IP address entered!" ), i18n ( "No IP Address" ) );
2028
2727
validAddr = false;
2032
if ( validAddr == true )
2034
profileData->setRemoteNetAddr ( addr );
2035
profileData->setRemoteNetMask ( newprofilewizardnetworkcontent->RemoteNetMaskComboBox->currentText() );
2732
QString addr = newprofilewizardnetworkcontent->RemoteNetAddrLineEdit->text();
2733
int part0 = addr.section ( '.', 0, 0 ).toInt();
2734
int part1 = addr.section ( '.', 1, 1 ).toInt();
2735
int part2 = addr.section ( '.', 2, 2 ).toInt();
2736
int part3 = addr.section ( '.', 3, 3 ).toInt();
2739
LogOutput->append ("part0: "+QString().setNum(part0));
2740
LogOutput->append ("part1: "+QString().setNum(part1));
2741
LogOutput->append ("part2: "+QString().setNum(part2));
2742
LogOutput->append ("part3: "+QString().setNum(part3));
2745
if ( ( part0 < 1 || part0 > 254 ) || ( part1 < 0 || part1 > 254 ) || ( part2 < 0 || part2 > 254 ) || ( part3 < 0 || part3 > 254 ) )
2747
KMessageBox::error ( this, i18n ( "Invalid values in IP address (remote net)!" ), i18n ( "Invalid Values in IP Address" ) );
2748
GlobalConfig->appendLogEntry ( i18n ( "Invalid values in IP address (remote net)!" ) , GlobalConfig->error );
2753
if ( validAddr == true )
2755
if ( GlobalConfig->KvpncDebugLevel > 0 )
2756
GlobalConfig->appendLogEntry ( i18n ( "Use remote network: %1/%2" , QString( addr ), QString(newprofilewizardnetworkcontent->RemoteNetMaskComboBox->currentText())), KVpncConfig::debug );
2757
profileData->setUseRemoteNetwork(true);
2758
profileData->setRemoteNetAddr ( addr );
2759
profileData->setRemoteNetMask ( newprofilewizardnetworkcontent->RemoteNetMaskComboBox->currentText() );
2045
msg += "- " + i18n ( "Remote network" ) + "\n";
2046
GlobalConfig->appendLogEntry ( i18n ( "Remote network is empty!" ), GlobalConfig->error );
2767
msg += "- " + i18n ( "Remote network" ) + "\n";
2768
GlobalConfig->appendLogEntry ( i18n ( "Remote network is empty!" ), GlobalConfig->error );
2049
2772
profileData->setNetworkDevice ( newprofilewizardnetworkcontent->NetworkDeviceComboBox->currentText() );
2552
3279
bool success = true;
2554
if ( ConnType == VpnAccountData::cisco )
3281
if ( ConnType == VpnAccountData::cisco || ConnType == VpnAccountData::ciscoorig )
2556
3283
ImportProfileDialog dlg ( GlobalConfig, this, i18n ( "Import Cisco PCF profile" ), "" );
3284
int ret = dlg.exec();
2558
3285
importOK = dlg.importOk;
2559
3286
if ( importOK )
2561
3288
profileData = dlg.acc;
2562
KMessageBox::information ( 0, i18n ( "Import of \"%1\" was successful." ).arg ( profileData->getName() ) );
2563
GlobalConfig->appendLogEntry ( i18n ( "Import of \"%1\" (%2) was successful." ).arg ( profileData->getName() ).arg ( "PCF" ), GlobalConfig->info );
3289
KMessageBox::information ( 0, i18n ( "Import of \"%1\" was successful." , profileData->getName() ) );
3290
GlobalConfig->appendLogEntry ( i18n ( "Import of \"%1\" (%2) was successful." , profileData->getName() , QString("PCF") ), GlobalConfig->info );
2567
KMessageBox::sorry ( 0, i18n ( "Import of \"%1\" has been failed." ).arg ( profileData->getName() ) );
2568
GlobalConfig->appendLogEntry ( i18n ( "Import of \"%1\" (%2) has been failed." ).arg ( profileData->getName() ).arg ( "PCF" ), GlobalConfig->error );
3294
KMessageBox::sorry ( 0, i18n ( "Import of \"%1\" has been failed." , profileData->getName() ) );
3295
GlobalConfig->appendLogEntry ( i18n ( "Import of \"%1\" (%2) has been failed." , profileData->getName() , QString( "PCF") ), GlobalConfig->error );
2569
3296
success = false;
2572
3299
if ( ConnType == VpnAccountData::openvpn )
2574
3301
ImportOpenvpnProfileDialog dlg ( GlobalConfig, this, i18n ( "Import OpenVPN profile" ), "" );
2576
importOK = dlg.importOk;
2579
profileData = dlg.acc;
2580
KMessageBox::information ( 0, i18n ( "Import of \"%1\" was successful." ).arg ( profileData->getName() ) );
2581
GlobalConfig->appendLogEntry ( i18n ( "Import of \"%1\" (%2) was successful." ).arg ( profileData->getName() ).arg ( "OpenVPN" ), GlobalConfig->info );
2585
KMessageBox::sorry ( 0, i18n ( "Import of \"%1\" has been failed." ).arg ( profileData->getName() ) );
2586
GlobalConfig->appendLogEntry ( i18n ( "Import of \"%1\" (%2) has been failed." ).arg ( profileData->getName() ).arg ( "OpenVPN" ), GlobalConfig->error );
3302
int ret = dlg.exec();
3303
importOK = dlg.importOk;
3306
profileData = dlg.acc;
3307
KMessageBox::information ( 0, i18n ( "Import of \"%1\" was successful." , profileData->getName() ) );
3308
GlobalConfig->appendLogEntry ( i18n ( "Import of \"%1\" (%2) was successful." , profileData->getName() , QString("OpenVPN") ), GlobalConfig->info );
3312
KMessageBox::sorry ( 0, i18n ( "Import of \"%1\" has been failed." , profileData->getName() ) );
3313
GlobalConfig->appendLogEntry ( i18n ( "Import of \"%1\" (%2) has been failed." , profileData->getName() , QString("OpenVPN") ), GlobalConfig->error );
3317
if ( ConnType == VpnAccountData::freeswan )
3319
ImportIpsecProfileDialog dlg ( GlobalConfig, this, i18n ( "Import IPSec profile" ), "" );
3320
dlg.setCaption(i18n("Import IPSec config"));
3321
int ret = dlg.exec();
3322
importOK = dlg.importOk;
3325
profileData = dlg.acc;
3326
KMessageBox::information ( 0, i18n ( "Import of \"%1\" was successful.", profileData->getName() ) );
3327
GlobalConfig->appendLogEntry ( i18n ( "Import of \"%1\" (%2) was successful." ,profileData->getName() , QString("IPSec") ), GlobalConfig->info );
3331
KMessageBox::sorry ( 0, i18n ( "Import of \"%1\" has been failed." ,profileData->getName() ) );
3332
GlobalConfig->appendLogEntry ( i18n ( "Import of \"%1\" (%2) has been failed." , profileData->getName() , QString("IPsec") ), GlobalConfig->error );
2590
3337
return success;
2603
3350
if ( profileData->getConnectionType() == VpnAccountData::freeswan ||
2604
3351
profileData->getConnectionType() == VpnAccountData::l2tpd_freeswan )
2606
dlg.main->ImporttypeComboBox->setCurrentItem ( ImportCertificateDialog::pkcs12_freeswan );
3353
dlg.ImporttypeComboBox->setCurrentItem (i18n("P12: freeswan") );
2607
3354
dlg.typeToggeled ( ImportCertificateDialog::pkcs12_freeswan );
2609
3356
else if ( profileData->getConnectionType() == VpnAccountData::racoon || profileData->getConnectionType() == VpnAccountData::l2tpd_racoon )
2611
dlg.main->ImporttypeComboBox->setCurrentItem ( ImportCertificateDialog::pkcs12_racoon );
2612
dlg.main->FreeswanGroupBox->setEnabled ( false );
3358
dlg.ImporttypeComboBox->setCurrentItem ( i18n("P12: racoon") );
3359
dlg.PrivateKeyPassGroupBox->setEnabled ( false );
2613
3360
dlg.typeToggeled ( ImportCertificateDialog::pkcs12_racoon );
2615
3362
else if ( profileData->getConnectionType() == VpnAccountData::openvpn )
2617
dlg.main->ImporttypeComboBox->setCurrentItem ( ImportCertificateDialog::pkcs12_openvpn );
3364
dlg.ImporttypeComboBox->setCurrentItem ( i18n("OpenVPN") );
2618
3365
dlg.typeToggeled ( ImportCertificateDialog::pkcs12_openvpn );
2619
dlg.main->RacoonCertificatePathUrlrequester->setEnabled ( true );
2620
dlg.main->RacoonCertificatePathUrlrequester->setURL ( profileData->getCertPath() );
2621
dlg.main->FreeswanGroupBox->setEnabled ( true );
2622
dlg.main->PrivateKeyPasswordEdit->setEnabled ( true );
2623
dlg.main->PrivateKeyAgainPasswordEdit->setEnabled ( true );
3366
dlg.RacoonCertificatePathUrlrequester->setEnabled ( true );
3367
dlg.RacoonCertificatePathUrlrequester->setUrl ( profileData->getCertPath() );
3368
dlg.PrivateKeyPassGroupBox->setEnabled ( true );
3369
dlg.PrivateKeyPasswordEdit->setEnabled ( true );
3370
dlg.PrivateKeyAgainPasswordEdit->setEnabled ( true );
2625
3372
else if ( profileData->getConnectionType() == VpnAccountData::ciscoorig )
2627
dlg.main->ImporttypeComboBox->setCurrentItem ( ImportCertificateDialog::cisco );
3374
dlg.ImporttypeComboBox->setCurrentItem ( i18n("Cisco (propritary)") );
2628
3375
dlg.typeToggeled ( ImportCertificateDialog::cisco);
2629
dlg.main->RacoonCertificatePathUrlrequester->setEnabled ( false );
2630
// dlg.main->RacoonCertificatePathUrlrequester->hide();
2631
dlg.main->FreeswanGroupBox->setEnabled ( true );
2632
dlg.main->PrivateKeyPasswordEdit->setEnabled ( true );
2633
dlg.main->PrivateKeyAgainPasswordEdit->setEnabled ( true );
3376
dlg.RacoonCertificatePathUrlrequester->setEnabled ( false );
3377
// dlg.RacoonCertificatePathUrlrequester->hide();
3378
dlg.PrivateKeyPassGroupBox->setEnabled ( true );
3379
dlg.PrivateKeyPasswordEdit->setEnabled ( true );
3380
dlg.PrivateKeyAgainPasswordEdit->setEnabled ( true );
3028
3797
newprofilewizardopenvpnauthpagecontent->UserdefiniedDigestComboBox->setEnabled ( false );
3800
void NewProfileWizard::useRemoteNetworkToggled(bool)
3802
if ( newprofilewizardnetworkcontent->UseRemoteNetworkCheckBox->isChecked() )
3803
newprofilewizardnetworkcontent->RemoteNetworkGroupBox ->setEnabled ( true );
3805
newprofilewizardnetworkcontent->RemoteNetworkGroupBox->setEnabled ( false );
3808
void NewProfileWizard::useIkeToggled(bool)
3810
if (newprofilewizardfreeswanpagecontent->UseCustomIkeCheckBox->isChecked())
3811
newprofilewizardfreeswanpagecontent->IkeGroupBox->setEnabled(true);
3813
newprofilewizardfreeswanpagecontent->IkeGroupBox->setEnabled(false);
3816
void NewProfileWizard::useEspToogled(bool)
3818
if (newprofilewizardfreeswanpagecontent->UseCustomEspCheckBox->isChecked())
3819
newprofilewizardfreeswanpagecontent->EspGroupBox->setEnabled(true);
3821
newprofilewizardfreeswanpagecontent->EspGroupBox->setEnabled(false);
3824
void NewProfileWizard::remoteIDTypeToggled(const QString& text)
3826
if (text == "asn1dn")
3828
newprofilewizardracoonpagecontent->RemoteIDLineEdit->setDisabled(true);
3829
newprofilewizardracoonpagecontent->RemoteIDLabel->setDisabled(true);
3833
newprofilewizardracoonpagecontent->RemoteIDLineEdit->setDisabled(false);
3834
newprofilewizardracoonpagecontent->RemoteIDLabel->setDisabled(false);
3838
void NewProfileWizard::defaultRouteToggled(const QString&)
3841
if (newprofilewizardnetworkroutecontent->DefaultRouteComboBox->currentText() == i18n("Keep default route") || newprofilewizardnetworkroutecontent->DefaultRouteComboBox->currentItem() == 0)
3843
KMessageBox::information(0,i18n("Additional network route is needed:\n\nYou have selected to keep the default route. You have to add additional network routes to your remote network. Otherwise you probably dont have access to it."),i18n("Route needed"));
3848
void NewProfileWizard::ikeGroupToggled(bool)
3850
if (newprofilewizardracoonpagecontent->IkeGroupCheckbox->isChecked())
3851
newprofilewizardracoonpagecontent->DHGroupComboBox->setEnabled(true);
3853
newprofilewizardracoonpagecontent->DHGroupComboBox->setEnabled(false);
3856
void NewProfileWizard::useXauthFreeswanToggled(bool)
3858
if (newprofilewizardfreeswanpagecontent->UseXauthCheckBox->isChecked())
3860
newprofilewizarduserpagecontent->setEnabled(true);
3861
newprofilewizardpskcontent->setEnabled(true);
3862
newprofilewizardfreeswanpagecontent->LocalIdTypeCombobox->setEnabled(false);
3863
newprofilewizardfreeswanpagecontent->LocalIDLineEdit->setEnabled(true);
3864
newprofilewizardfreeswanpagecontent->LocalIdTypeCombobox->setCurrentText("keyid");
3868
newprofilewizarduserpagecontent->setEnabled(false);
3869
newprofilewizardpskcontent->setEnabled(false);
3870
newprofilewizardfreeswanpagecontent->LocalIdTypeCombobox->setEnabled(true);
3871
newprofilewizardfreeswanpagecontent->LocalIDLineEdit->setEnabled(false);
3872
newprofilewizardfreeswanpagecontent->LocalIdTypeCombobox->setCurrentText("asn1dn");
3876
void NewProfileWizard::useXauthRacoonToggled(bool)
3878
if (newprofilewizardracoonpagecontent->UseXauthCheckBox->isChecked())
3880
newprofilewizarduserpagecontent->setEnabled(true);
3881
newprofilewizardpskcontent->setEnabled(true);
3882
newprofilewizardracoonpagecontent->LocalIdTypeCombobox->setEnabled(false);
3883
newprofilewizardracoonpagecontent->LocalIDLineEdit->setEnabled(true);
3884
newprofilewizardracoonpagecontent->LocalIdTypeCombobox->setCurrentText("keyid");
3888
newprofilewizarduserpagecontent->setEnabled(false);
3889
newprofilewizardpskcontent->setEnabled(false);
3890
newprofilewizardracoonpagecontent->LocalIdTypeCombobox->setEnabled(true);
3891
newprofilewizardracoonpagecontent->LocalIDLineEdit->setEnabled(false);
3892
newprofilewizardracoonpagecontent->LocalIdTypeCombobox->setCurrentText("asn1dn");
3896
void NewProfileWizard::tunnelDeviceTypeChanged(const QString & string )
3898
if ( profileData->getConnectionType() == VpnAccountData::openvpn || GlobalConfig->currentProfile->getConnectionType() == VpnAccountData::ssh)
3900
if (string.lower() == "tun")
3902
profilenetworkvirtualipoptionscontent->LabelRemoteVirtualIp->setText(i18n("Remote IP (virtual):"));
3904
if (string.lower() == "tap")
3906
profilenetworkvirtualipoptionscontent->LabelRemoteVirtualIp->setText(i18n("Netmask for local IP address:"));
3911
void NewProfileWizard::useDnsServerToggled(bool)
3913
if ( newprofilewizardpptppagecontent->DnsServerCheckbox->isChecked() )
3914
newprofilewizardpptppagecontent->DnsServerLineedit->setEnabled( true );
3916
newprofilewizardpptppagecontent->DnsServerLineedit->setEnabled( false );
3919
void NewProfileWizard::useSearchDomainInResolvConfToggled(bool)
3921
if ( newprofilewizardpptppagecontent->UseSearchDomainInResolvConfCheckbox ->isChecked() )
3922
newprofilewizardpptppagecontent->SearchDomainInResolvConfLineedit->setEnabled( true );
3924
newprofilewizardpptppagecontent->SearchDomainInResolvConfLineedit->setEnabled( false );