summaryrefslogtreecommitdiffstats
path: root/java/com/jcraft/jsch
diff options
context:
space:
mode:
Diffstat (limited to 'java/com/jcraft/jsch')
-rw-r--r--java/com/jcraft/jsch/HostKey.java2
-rw-r--r--java/com/jcraft/jsch/KeyPair.java12
-rw-r--r--java/com/jcraft/jsch/KeyPairDSA.java6
-rw-r--r--java/com/jcraft/jsch/KeyPairECDSA.java6
-rw-r--r--java/com/jcraft/jsch/KeyPairPKCS8.java4
-rw-r--r--java/com/jcraft/jsch/KeyPairRSA.java6
-rw-r--r--java/com/jcraft/jsch/KnownHosts.java2
-rw-r--r--java/com/jcraft/jsch/Session.java4
8 files changed, 21 insertions, 21 deletions
diff --git a/java/com/jcraft/jsch/HostKey.java b/java/com/jcraft/jsch/HostKey.java
index 6269469a..bf7ab28c 100644
--- a/java/com/jcraft/jsch/HostKey.java
+++ b/java/com/jcraft/jsch/HostKey.java
@@ -103,7 +103,7 @@ public class HostKey{
public String getKey(){
return Util.byte2str(Util.toBase64(key, 0, key.length));
}
- public String getFingerPrint(JSch jsch){
+ @SuppressWarnings({"static"}) public String getFingerPrint(JSch jsch){
HASH hash=null;
try{
Class c=Class.forName(jsch.getConfig("md5"));
diff --git a/java/com/jcraft/jsch/KeyPair.java b/java/com/jcraft/jsch/KeyPair.java
index 7c31f15b..3eb3c2dc 100644
--- a/java/com/jcraft/jsch/KeyPair.java
+++ b/java/com/jcraft/jsch/KeyPair.java
@@ -383,7 +383,7 @@ public abstract class KeyPair{
return j;
}
- private Random genRandom(){
+ @SuppressWarnings({"static"}) private Random genRandom(){
if(random==null){
try{
Class c=Class.forName(jsch.getConfig("random"));
@@ -394,7 +394,7 @@ public abstract class KeyPair{
return random;
}
- private HASH genHash(){
+ @SuppressWarnings({"static"}) private HASH genHash(){
try{
Class c=Class.forName(jsch.getConfig("md5"));
hash=(HASH)(c.newInstance());
@@ -404,7 +404,7 @@ public abstract class KeyPair{
}
return hash;
}
- private Cipher genCipher(){
+ @SuppressWarnings({"static"}) private Cipher genCipher(){
try{
Class c;
c=Class.forName(jsch.getConfig("3des-cbc"));
@@ -421,7 +421,7 @@ public abstract class KeyPair{
h(n) <- hash(h(n-1), passphrase, iv);
key <- (h(0),...,h(n))[0,..,key.length];
*/
- synchronized byte[] genKey(byte[] passphrase, byte[] iv){
+ @SuppressWarnings({"static"}) synchronized byte[] genKey(byte[] passphrase, byte[] iv){
if(cipher==null) cipher=genCipher();
if(hash==null) hash=genHash();
@@ -565,7 +565,7 @@ public abstract class KeyPair{
}
}
- public static KeyPair load(JSch jsch, byte[] prvkey, byte[] pubkey) throws JSchException{
+ @SuppressWarnings({"static"}) public static KeyPair load(JSch jsch, byte[] prvkey, byte[] pubkey) throws JSchException{
byte[] iv=new byte[8]; // 8
boolean encrypted=true;
@@ -985,7 +985,7 @@ public abstract class KeyPair{
"Private-MAC: "
};
- static KeyPair loadPPK(JSch jsch, byte[] buf) throws JSchException {
+ @SuppressWarnings({"static"}) static KeyPair loadPPK(JSch jsch, byte[] buf) throws JSchException {
byte[] pubkey = null;
byte[] prvkey = null;
int lines = 0;
diff --git a/java/com/jcraft/jsch/KeyPairDSA.java b/java/com/jcraft/jsch/KeyPairDSA.java
index ca5b708c..15922269 100644
--- a/java/com/jcraft/jsch/KeyPairDSA.java
+++ b/java/com/jcraft/jsch/KeyPairDSA.java
@@ -59,7 +59,7 @@ public class KeyPairDSA extends KeyPair{
key_size = (new java.math.BigInteger(P_array)).bitLength();
}
- void generate(int key_size) throws JSchException{
+ @SuppressWarnings({"static"}) void generate(int key_size) throws JSchException{
this.key_size=key_size;
try{
Class c=Class.forName(jsch.getConfig("keypairgen.dsa"));
@@ -247,7 +247,7 @@ public class KeyPairDSA extends KeyPair{
return key_size;
}
- public byte[] getSignature(byte[] data){
+ @SuppressWarnings({"static"}) public byte[] getSignature(byte[] data){
try{
Class c=Class.forName((String)jsch.getConfig("signature.dss"));
SignatureDSA dsa=(SignatureDSA)(c.newInstance());
@@ -267,7 +267,7 @@ public class KeyPairDSA extends KeyPair{
return null;
}
- public Signature getVerifier(){
+ @SuppressWarnings({"static"}) public Signature getVerifier(){
try{
Class c=Class.forName((String)jsch.getConfig("signature.dss"));
SignatureDSA dsa=(SignatureDSA)(c.newInstance());
diff --git a/java/com/jcraft/jsch/KeyPairECDSA.java b/java/com/jcraft/jsch/KeyPairECDSA.java
index aa25a6eb..55a52ca4 100644
--- a/java/com/jcraft/jsch/KeyPairECDSA.java
+++ b/java/com/jcraft/jsch/KeyPairECDSA.java
@@ -71,7 +71,7 @@ public class KeyPairECDSA extends KeyPair{
(prv_array.length>=48 ? 384 : 256);
}
- void generate(int key_size) throws JSchException{
+ @SuppressWarnings({"static"}) void generate(int key_size) throws JSchException{
this.key_size=key_size;
try{
Class c=Class.forName(jsch.getConfig("keypairgen.ecdsa"));
@@ -282,7 +282,7 @@ public class KeyPairECDSA extends KeyPair{
return key_size;
}
- public byte[] getSignature(byte[] data){
+ @SuppressWarnings({"static"}) public byte[] getSignature(byte[] data){
try{
Class c=Class.forName((String)jsch.getConfig("signature.ecdsa"));
SignatureECDSA ecdsa=(SignatureECDSA)(c.newInstance());
@@ -303,7 +303,7 @@ public class KeyPairECDSA extends KeyPair{
return null;
}
- public Signature getVerifier(){
+ @SuppressWarnings({"static"}) public Signature getVerifier(){
try{
Class c=Class.forName((String)jsch.getConfig("signature.ecdsa"));
final SignatureECDSA ecdsa=(SignatureECDSA)(c.newInstance());
diff --git a/java/com/jcraft/jsch/KeyPairPKCS8.java b/java/com/jcraft/jsch/KeyPairPKCS8.java
index 47c2a933..0aafa717 100644
--- a/java/com/jcraft/jsch/KeyPairPKCS8.java
+++ b/java/com/jcraft/jsch/KeyPairPKCS8.java
@@ -218,7 +218,7 @@ public class KeyPairPKCS8 extends KeyPair {
return kpair.forSSHAgent();
}
- public boolean decrypt(byte[] _passphrase){
+ @SuppressWarnings({"static"}) public boolean decrypt(byte[] _passphrase){
if(!isEncrypted()){
return true;
}
@@ -330,7 +330,7 @@ or
return false;
}
- Cipher getCipher(byte[] id){
+ @SuppressWarnings({"static"}) Cipher getCipher(byte[] id){
Cipher cipher=null;
String name = null;
try{
diff --git a/java/com/jcraft/jsch/KeyPairRSA.java b/java/com/jcraft/jsch/KeyPairRSA.java
index 4221b75e..97b41203 100644
--- a/java/com/jcraft/jsch/KeyPairRSA.java
+++ b/java/com/jcraft/jsch/KeyPairRSA.java
@@ -61,7 +61,7 @@ public class KeyPairRSA extends KeyPair{
}
}
- void generate(int key_size) throws JSchException{
+ @SuppressWarnings({"static"}) void generate(int key_size) throws JSchException{
this.key_size=key_size;
try{
Class c=Class.forName(jsch.getConfig("keypairgen.rsa"));
@@ -316,7 +316,7 @@ public class KeyPairRSA extends KeyPair{
return key_size;
}
- public byte[] getSignature(byte[] data){
+ @SuppressWarnings({"static"}) public byte[] getSignature(byte[] data){
try{
Class c=Class.forName((String)jsch.getConfig("signature.rsa"));
SignatureRSA rsa=(SignatureRSA)(c.newInstance());
@@ -335,7 +335,7 @@ public class KeyPairRSA extends KeyPair{
return null;
}
- public Signature getVerifier(){
+ @SuppressWarnings({"static"}) public Signature getVerifier(){
try{
Class c=Class.forName((String)jsch.getConfig("signature.rsa"));
SignatureRSA rsa=(SignatureRSA)(c.newInstance());
diff --git a/java/com/jcraft/jsch/KnownHosts.java b/java/com/jcraft/jsch/KnownHosts.java
index b86fa25c..c4e06518 100644
--- a/java/com/jcraft/jsch/KnownHosts.java
+++ b/java/com/jcraft/jsch/KnownHosts.java
@@ -482,7 +482,7 @@ loop:
return hosts;
}
- private synchronized MAC getHMACSHA1(){
+ @SuppressWarnings({"static"}) private synchronized MAC getHMACSHA1(){
if(hmacsha1==null){
try{
Class c=Class.forName(jsch.getConfig("hmac-sha1"));
diff --git a/java/com/jcraft/jsch/Session.java b/java/com/jcraft/jsch/Session.java
index 39e9029a..4da30cb3 100644
--- a/java/com/jcraft/jsch/Session.java
+++ b/java/com/jcraft/jsch/Session.java
@@ -2308,7 +2308,7 @@ break;
}
}
- public String getConfig(String key){
+ @SuppressWarnings({"static"}) public String getConfig(String key){
Object foo=null;
if(config!=null){
foo=config.get(key);
@@ -2534,7 +2534,7 @@ break;
catch(Exception e){ return false; }
}
- private String[] checkSignatures(String sigs){
+ @SuppressWarnings({"static"}) private String[] checkSignatures(String sigs){
if(sigs==null || sigs.length()==0)
return null;