View | Details | Raw Unified | Return to bug 404714
Collapse All | Expand All

(-)a/PreferencePage.java.orig (-2 / +5 lines)
Lines 480-492 protected Control createContents(Composite parent){ Link Here
480
480
481
				try{
481
				try{
482
					int type=0;
482
					int type=0;
483
					final int keySize;
483
					if(e.widget==keyGenerateDSA){
484
					if(e.widget==keyGenerateDSA){
484
						type=KeyPair.DSA;
485
						type=KeyPair.DSA;
485
						_type=IConstants.DSA;
486
						_type=IConstants.DSA;
487
						keySize = 1024;
486
					}
488
					}
487
					else if(e.widget==keyGenerateRSA){
489
					else if(e.widget==keyGenerateRSA){
488
						type=KeyPair.RSA;
490
						type=KeyPair.RSA;
489
						_type=IConstants.RSA;
491
						_type=IConstants.RSA;
492
						keySize = 2048;
490
					}
493
					}
491
					else{
494
					else{
492
						return;
495
						return;
Lines 497-503 protected Control createContents(Composite parent){ Link Here
497
					final JSchException[] _e=new JSchException[1];
500
					final JSchException[] _e=new JSchException[1];
498
					BusyIndicator.showWhile(getShell().getDisplay(), () -> {
501
					BusyIndicator.showWhile(getShell().getDisplay(), () -> {
499
						try {
502
						try {
500
							_kpair[0] = KeyPair.genKeyPair(getJSch(), __type);
503
							_kpair[0] = KeyPair.genKeyPair(getJSch(), __type, keySize);
501
						} catch (JSchException e1) {
504
						} catch (JSchException e1) {
502
							_e[0] = e1;
505
							_e[0] = e1;
503
						}
506
						}
Lines 508-514 protected Control createContents(Composite parent){ Link Here
508
					kpair=_kpair[0];
511
					kpair=_kpair[0];
509
512
510
					ByteArrayOutputStream out=new ByteArrayOutputStream();
513
					ByteArrayOutputStream out=new ByteArrayOutputStream();
511
					kpairComment=_type+"-1024"; //$NON-NLS-1$
514
					kpairComment=_type+"-"+keySize; //$NON-NLS-1$
512
					kpair.writePublicKey(out, kpairComment);
515
					kpair.writePublicKey(out, kpairComment);
513
					out.close();
516
					out.close();
514
					publicKeyText.setText(out.toString());
517
					publicKeyText.setText(out.toString());

Return to bug 404714