mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 03:52:06 +01:00
Limit the scope of local variables in proceedTLSReceived()
This commit is contained in:
parent
32f681c6e5
commit
573358b459
1 changed files with 6 additions and 4 deletions
|
@ -684,10 +684,6 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
||||||
* @throws Exception if an exception occurs.
|
* @throws Exception if an exception occurs.
|
||||||
*/
|
*/
|
||||||
private void proceedTLSReceived() throws NoSuchAlgorithmException, CertificateException, IOException, KeyStoreException, NoSuchProviderException, UnrecoverableKeyException, KeyManagementException, SmackException {
|
private void proceedTLSReceived() throws NoSuchAlgorithmException, CertificateException, IOException, KeyStoreException, NoSuchProviderException, UnrecoverableKeyException, KeyManagementException, SmackException {
|
||||||
SSLContext context = this.config.getCustomSSLContext();
|
|
||||||
KeyStore ks = null;
|
|
||||||
KeyManager[] kms = null;
|
|
||||||
PasswordCallback pcb = null;
|
|
||||||
SmackDaneVerifier daneVerifier = null;
|
SmackDaneVerifier daneVerifier = null;
|
||||||
|
|
||||||
if (config.getDnssecMode() == DnssecMode.needsDnssecAndDane) {
|
if (config.getDnssecMode() == DnssecMode.needsDnssecAndDane) {
|
||||||
|
@ -701,6 +697,10 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SSLContext context = this.config.getCustomSSLContext();
|
||||||
|
KeyStore ks = null;
|
||||||
|
PasswordCallback pcb = null;
|
||||||
|
|
||||||
if (context == null) {
|
if (context == null) {
|
||||||
final String keyStoreType = config.getKeystoreType();
|
final String keyStoreType = config.getKeystoreType();
|
||||||
final CallbackHandler callbackHandler = config.getCallbackHandler();
|
final CallbackHandler callbackHandler = config.getCallbackHandler();
|
||||||
|
@ -745,6 +745,8 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
KeyManager[] kms = null;
|
||||||
|
|
||||||
if (ks != null) {
|
if (ks != null) {
|
||||||
String keyManagerFactoryAlgorithm = KeyManagerFactory.getDefaultAlgorithm();
|
String keyManagerFactoryAlgorithm = KeyManagerFactory.getDefaultAlgorithm();
|
||||||
KeyManagerFactory kmf = KeyManagerFactory.getInstance(keyManagerFactoryAlgorithm);
|
KeyManagerFactory kmf = KeyManagerFactory.getInstance(keyManagerFactoryAlgorithm);
|
||||||
|
|
Loading…
Reference in a new issue