aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/trilead/ssh2/crypto/PEMDecoder.java
diff options
context:
space:
mode:
authorKenny Root <kenny@the-b.org>2008-08-26 05:10:04 +0000
committerKenny Root <kenny@the-b.org>2008-08-26 05:10:04 +0000
commitc1e41c03ad352b00e88a926db600937f2ab06e50 (patch)
tree7397de044710bdab7947c0e02730dd48f2eb312a /src/com/trilead/ssh2/crypto/PEMDecoder.java
parenta92df389bc091f288116a292fd265e1986814865 (diff)
downloadconnectbot-c1e41c03ad352b00e88a926db600937f2ab06e50.tar.gz
connectbot-c1e41c03ad352b00e88a926db600937f2ab06e50.tar.bz2
connectbot-c1e41c03ad352b00e88a926db600937f2ab06e50.zip
Update Trilead SSH-2 for Java from build 211 to build 213
Diffstat (limited to 'src/com/trilead/ssh2/crypto/PEMDecoder.java')
-rw-r--r--src/com/trilead/ssh2/crypto/PEMDecoder.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/trilead/ssh2/crypto/PEMDecoder.java b/src/com/trilead/ssh2/crypto/PEMDecoder.java
index c6f1a4e..ac1b842 100644
--- a/src/com/trilead/ssh2/crypto/PEMDecoder.java
+++ b/src/com/trilead/ssh2/crypto/PEMDecoder.java
@@ -15,12 +15,11 @@ import com.trilead.ssh2.crypto.digest.MD5;
import com.trilead.ssh2.signature.DSAPrivateKey;
import com.trilead.ssh2.signature.RSAPrivateKey;
-
/**
* PEM Support.
*
* @author Christian Plattner, plattner@trilead.com
- * @version $Id: PEMDecoder.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $
+ * @version $Id: PEMDecoder.java,v 1.2 2008/04/01 12:38:09 cplattne Exp $
*/
public class PEMDecoder
{
@@ -82,7 +81,8 @@ public class PEMDecoder
while (true)
{
md5.update(password, 0, password.length);
- md5.update(salt, 0, 8); // ARGH we only use the first 8 bytes of the salt in this step.
+ md5.update(salt, 0, 8); // ARGH we only use the first 8 bytes of the
+ // salt in this step.
// This took me two hours until I got AES-xxx running.
int copy = (keyLen < tmp.length) ? keyLen : tmp.length;
@@ -317,7 +317,7 @@ public class PEMDecoder
if (password == null)
throw new IOException("PEM is encrypted, but no password was specified");
- decryptPEM(ps, password.getBytes());
+ decryptPEM(ps, password.getBytes("ISO-8859-1"));
}
if (ps.pemType == PEM_DSA_PRIVATE_KEY)