mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
RUBY-14125: fixed NPE in jsch.
See jsch-ruby-14125.pch for changes
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,40 @@
|
||||
--- src/main/java/com/jcraft/jsch/Session.java 2013-05-08 01:10:10.000000000 +0400
|
||||
+++ src/main/java/com/jcraft/jsch/Session.java 2013-10-04 16:45:08.489140895 +0400
|
||||
@@ -798,21 +798,23 @@
|
||||
HostKey[] keys =
|
||||
hkr.getHostKey(chost,
|
||||
(key_type.equals("DSA") ? "ssh-dss" : "ssh-rsa"));
|
||||
- String _key= Util.byte2str(Util.toBase64(K_S, 0, K_S.length));
|
||||
- for(int j=0; j< keys.length; j++){
|
||||
- if(keys[i].getKey().equals(_key) &&
|
||||
- keys[j].getMarker().equals("@revoked")){
|
||||
- if(userinfo!=null){
|
||||
- userinfo.showMessage(
|
||||
-"The "+ key_type +" host key for "+ host +" is marked as revoked.\n"+
|
||||
-"This could mean that a stolen key is being used to "+
|
||||
-"impersonate this host.");
|
||||
+ if(keys != null){
|
||||
+ String _key= Util.byte2str(Util.toBase64(K_S, 0, K_S.length));
|
||||
+ for(int j=0; j< keys.length; j++){
|
||||
+ if(keys[i].getKey().equals(_key) &&
|
||||
+ keys[j].getMarker().equals("@revoked")){
|
||||
+ if(userinfo!=null){
|
||||
+ userinfo.showMessage(
|
||||
+ "The "+ key_type +" host key for "+ host +" is marked as revoked.\n"+
|
||||
+ "This could mean that a stolen key is being used to "+
|
||||
+ "impersonate this host.");
|
||||
+ }
|
||||
+ if(JSch.getLogger().isEnabled(Logger.INFO)){
|
||||
+ JSch.getLogger().log(Logger.INFO,
|
||||
+ "Host '"+host+"' has provided revoked key.");
|
||||
+ }
|
||||
+ throw new JSchException("revoked HostKey: "+host);
|
||||
}
|
||||
- if(JSch.getLogger().isEnabled(Logger.INFO)){
|
||||
- JSch.getLogger().log(Logger.INFO,
|
||||
- "Host '"+host+"' has provided revoked key.");
|
||||
- }
|
||||
- throw new JSchException("revoked HostKey: "+host);
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Reference in New Issue
Block a user