File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
team/bundles/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -497,7 +497,11 @@ else if(e.widget==keyGenerateRSA){
497
497
final JSchException [] _e =new JSchException [1 ];
498
498
BusyIndicator .showWhile (getShell ().getDisplay (), () -> {
499
499
try {
500
- _kpair [0 ] = KeyPair .genKeyPair (getJSch (), __type );
500
+ if (__type == KeyPair .RSA ) {
501
+ _kpair [0 ] = KeyPair .genKeyPair (getJSch (), __type , 2048 );
502
+ } else {
503
+ _kpair [0 ] = KeyPair .genKeyPair (getJSch (), __type );
504
+ }
501
505
} catch (JSchException e1 ) {
502
506
_e [0 ] = e1 ;
503
507
}
@@ -508,7 +512,11 @@ else if(e.widget==keyGenerateRSA){
508
512
kpair =_kpair [0 ];
509
513
510
514
ByteArrayOutputStream out =new ByteArrayOutputStream ();
511
- kpairComment =_type +"-1024" ; //$NON-NLS-1$
515
+ if (__type == KeyPair .RSA ) {
516
+ kpairComment = _type + "-2048" ; //$NON-NLS-1$
517
+ } else {
518
+ kpairComment = _type + "-1024" ; //$NON-NLS-1$
519
+ }
512
520
kpair .writePublicKey (out , kpairComment );
513
521
out .close ();
514
522
publicKeyText .setText (out .toString ());
You can’t perform that action at this time.
0 commit comments