From 1b5203d24e97acb194d5c3456d81f04bb8d0206b Mon Sep 17 00:00:00 2001 From: Jay Kline Date: Fri, 30 Nov 2007 20:02:01 +0000 Subject: [PATCH] Fix some ordering. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@9539 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smack/XMPPConnection.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/org/jivesoftware/smack/XMPPConnection.java b/source/org/jivesoftware/smack/XMPPConnection.java index 33b132630..449ea268d 100644 --- a/source/org/jivesoftware/smack/XMPPConnection.java +++ b/source/org/jivesoftware/smack/XMPPConnection.java @@ -1305,11 +1305,11 @@ public class XMPPConnection { SSLContext context = SSLContext.getInstance("TLS"); KeyStore ks; KeyManager[] kms = null; + PasswordCallback pcb = null; if(callbackHandler == null) { ks = null; } else { - PasswordCallback pcb; System.out.println("Keystore type: "+configuration.getKeystoreType()); if(configuration.getKeystoreType().equals("PKCS11")) { Provider p = new sun.security.pkcs11.SunPKCS11(configuration.getPKCSConfig()); @@ -1337,12 +1337,12 @@ public class XMPPConnection { kmf.init(ks,null); } else { kmf.init(ks,pcb.getPassword()); + pcb.clearPassword(); } kms = kmf.getKeyManagers(); } catch (NullPointerException npe) { kms = null; } - pcb.clearPassword(); } // Verify certificate presented by the server