find_package(Java)
-set(DEFAULT_JAVACFLAGS "-source 1.5 -target 1.5 -Xlint:all,-serial,-cast,-unchecked,-fallthrough,-dep-ann,-deprecation,-rawtypes")
+set(DEFAULT_JAVACFLAGS "-source 1.6 -target 1.6 -Xlint:all,-serial,-cast,-unchecked,-fallthrough,-dep-ann,-deprecation,-rawtypes")
set(JAVACFLAGS ${DEFAULT_JAVACFLAGS} CACHE STRING
"Java compiler flags (Default: ${DEFAULT_JAVACFLAGS})")
message(STATUS "Java compiler flags = ${JAVACFLAGS}")
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"));
return j;
}
- private Random genRandom(){
+ @SuppressWarnings({"static"}) private Random genRandom(){
if(random==null){
try{
Class c=Class.forName(jsch.getConfig("random"));
return random;
}
- private HASH genHash(){
+ @SuppressWarnings({"static"}) private HASH genHash(){
try{
Class c=Class.forName(jsch.getConfig("md5"));
hash=(HASH)(c.newInstance());
}
return hash;
}
- private Cipher genCipher(){
+ @SuppressWarnings({"static"}) private Cipher genCipher(){
try{
Class c;
c=Class.forName(jsch.getConfig("3des-cbc"));
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();
}
}
- 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;
"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;
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"));
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());
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());
(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"));
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());
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());
return kpair.forSSHAgent();
}
- public boolean decrypt(byte[] _passphrase){
+ @SuppressWarnings({"static"}) public boolean decrypt(byte[] _passphrase){
if(!isEncrypted()){
return true;
}
return false;
}
- Cipher getCipher(byte[] id){
+ @SuppressWarnings({"static"}) Cipher getCipher(byte[] id){
Cipher cipher=null;
String name = null;
try{
}
}
- 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"));
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());
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());
return hosts;
}
- private synchronized MAC getHMACSHA1(){
+ @SuppressWarnings({"static"}) private synchronized MAC getHMACSHA1(){
if(hmacsha1==null){
try{
Class c=Class.forName(jsch.getConfig("hmac-sha1"));
}
}
- public String getConfig(String key){
+ @SuppressWarnings({"static"}) public String getConfig(String key){
Object foo=null;
if(config!=null){
foo=config.get(key);
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;
}
}
-class TimedOut extends Exception {
- public TimedOut() {
- super("Timed out");
- }
-}
-
class FrameException extends Exception {
public FrameException() {
super("Frame Exception");
--- /dev/null
+/* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved.
+ * Copyright (C) 2012 Brian P. Hinz
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ */
+
+package com.tigervnc.rdr;
+
+class TimedOut extends Exception {
+ public TimedOut() {
+ super("Timed out");
+ }
+}