diff options
author | Alexander Kurtakov | 2020-01-06 22:40:24 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2020-01-07 12:05:11 +0000 |
commit | f23518900fcad2bd1e8bd6c69ae87282a2c2b941 (patch) | |
tree | 748cb40d7935eaf87d5320c0ab14cddcaaf5f061 | |
parent | 4c7d63e115c486d331728fa0396ab2665e29d578 (diff) | |
download | rt.equinox.bundles-I20200110-0200.tar.gz rt.equinox.bundles-I20200110-0200.tar.xz rt.equinox.bundles-I20200110-0200.zip |
Use JRE Base64 decoder.Y20200108-0435S4_15_0_M1I20200110-0905I20200110-0200I20200109-2350I20200108-2240I20200108-0600I20200108-0025I20200107-1800
Requiring Apache Mina just for it makes no sense.
Change-Id: Ie3bcf4fb37ec1245ec902cf5906697a2013b4757
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r-- | bundles/org.eclipse.equinox.console.ssh/META-INF/MANIFEST.MF | 1 | ||||
-rw-r--r-- | bundles/org.eclipse.equinox.console.ssh/src/org/eclipse/equinox/console/internal/ssh/AuthorizedKeys.java | 14 |
2 files changed, 7 insertions, 8 deletions
diff --git a/bundles/org.eclipse.equinox.console.ssh/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.console.ssh/META-INF/MANIFEST.MF index 19b397d1d..e23ad447f 100644 --- a/bundles/org.eclipse.equinox.console.ssh/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.equinox.console.ssh/META-INF/MANIFEST.MF @@ -13,7 +13,6 @@ Import-Package: javax.security.auth;resolution:=optional, javax.security.auth.login;resolution:=optional, javax.security.auth.spi;resolution:=optional, org.apache.felix.service.command;status=provisional;version="0.8.0", - org.apache.mina.util;version="2.0.0";resolution:=optional, org.apache.sshd.common;version="2.0.0";resolution:=optional, org.apache.sshd.common.kex;version="2.0.0";resolution:=optional, org.apache.sshd.common.keyprovider;version="2.0.0";resolution:=optional, diff --git a/bundles/org.eclipse.equinox.console.ssh/src/org/eclipse/equinox/console/internal/ssh/AuthorizedKeys.java b/bundles/org.eclipse.equinox.console.ssh/src/org/eclipse/equinox/console/internal/ssh/AuthorizedKeys.java index 43a974109..c512b8192 100644 --- a/bundles/org.eclipse.equinox.console.ssh/src/org/eclipse/equinox/console/internal/ssh/AuthorizedKeys.java +++ b/bundles/org.eclipse.equinox.console.ssh/src/org/eclipse/equinox/console/internal/ssh/AuthorizedKeys.java @@ -26,18 +26,18 @@ import java.security.spec.DSAPublicKeySpec; import java.security.spec.InvalidKeySpecException; import java.security.spec.RSAPublicKeySpec; import java.util.ArrayList; +import java.util.Base64; import java.util.Collections; import java.util.List; import java.util.Scanner; -import org.apache.mina.util.Base64; /** * Reader for 'authorized_keys' file as typically found on Unix systems. */ public class AuthorizedKeys { - public static enum KeyType { + public enum KeyType { RSA, DSA } @@ -48,7 +48,7 @@ public class AuthorizedKeys { /** * Creates a new instance. - * + * * @param message * @param cause */ @@ -86,7 +86,7 @@ public class AuthorizedKeys { /** * Creates a new instance. - * + * * @throws FileNotFoundException */ public AuthorizedKeys(final String authorizedKeysFile) throws FileNotFoundException, IOException { @@ -122,7 +122,7 @@ public class AuthorizedKeys { /** * Returns the keys. - * + * * @return the keys */ public List<PublicKey> getKeys() { @@ -165,10 +165,10 @@ public class AuthorizedKeys { // key final int keyEndIdx = line.indexOf(' '); if (keyEndIdx != -1) { - key = Base64.decodeBase64(asBytes(line.substring(0, keyEndIdx))); + key = Base64.getDecoder().decode(asBytes(line.substring(0, keyEndIdx))); line = line.substring(keyEndIdx + 1); } else { - key = Base64.decodeBase64(asBytes(line)); + key = Base64.getDecoder().decode(asBytes(line)); } // wrap key into byte buffer |