AMQP-783: Allow blank key/trust store passwords

JIRA: https://jira.spring.io/browse/AMQP-783

**Cherry-pick to 1.7.x**

# Conflicts:
#	spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/RabbitConnectionFactoryBean.java
This commit is contained in:
Zachary DeLuca
2017-11-15 12:29:13 -05:00
committed by Artem Bilan
parent c320c2463e
commit adf406c269

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -69,6 +69,7 @@ import com.rabbitmq.client.impl.nio.NioParams;
* @author Arnaud Cogoluègnes
* @author Hareendran
* @author Artem Bilan
* @author Zachary DeLuca
*
* @since 1.4
*/
@@ -636,11 +637,11 @@ public class RabbitConnectionFactoryBean extends AbstractFactoryBean<ConnectionF
String keyStoreType = getKeyStoreType();
String trustStoreType = getTrustStoreType();
char[] keyPassphrase = null;
if (StringUtils.hasText(keyStorePassword)) {
if (keyStorePassword != null) {
keyPassphrase = keyStorePassword.toCharArray();
}
char[] trustPassphrase = null;
if (StringUtils.hasText(trustStorePassword)) {
if (trustStorePassword != null) {
trustPassphrase = trustStorePassword.toCharArray();
}
KeyManager[] keyManagers = null;