mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Add support for spring.rabbitmq.ssl.algorithm
Rabbit client 3.6.* uses TLSv1.1 as the default algorithm which many brokers are deisabling these days. Spring AMQP supports changing the algorithm by name, so this is just a pass thru for that.
This commit is contained in:
parent
71fddc51df
commit
9c0679b1f4
@ -119,6 +119,9 @@ public class RabbitAutoConfiguration {
|
|||||||
RabbitProperties.Ssl ssl = config.getSsl();
|
RabbitProperties.Ssl ssl = config.getSsl();
|
||||||
if (ssl.isEnabled()) {
|
if (ssl.isEnabled()) {
|
||||||
factory.setUseSSL(true);
|
factory.setUseSSL(true);
|
||||||
|
if (ssl.getAlgorithm() != null) {
|
||||||
|
factory.setSslAlgorithm(ssl.getAlgorithm());
|
||||||
|
}
|
||||||
factory.setKeyStore(ssl.getKeyStore());
|
factory.setKeyStore(ssl.getKeyStore());
|
||||||
factory.setKeyStorePassphrase(ssl.getKeyStorePassword());
|
factory.setKeyStorePassphrase(ssl.getKeyStorePassword());
|
||||||
factory.setTrustStore(ssl.getTrustStore());
|
factory.setTrustStore(ssl.getTrustStore());
|
||||||
|
@ -217,6 +217,12 @@ public class RabbitProperties {
|
|||||||
*/
|
*/
|
||||||
private String trustStorePassword;
|
private String trustStorePassword;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The SSL algorithm to use (e.g. TLSv1.1). Default is set automatically by the
|
||||||
|
* rabbit client library.
|
||||||
|
*/
|
||||||
|
private String algorithm;
|
||||||
|
|
||||||
public boolean isEnabled() {
|
public boolean isEnabled() {
|
||||||
return this.enabled;
|
return this.enabled;
|
||||||
}
|
}
|
||||||
@ -257,6 +263,14 @@ public class RabbitProperties {
|
|||||||
this.trustStorePassword = trustStorePassword;
|
this.trustStorePassword = trustStorePassword;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getAlgorithm() {
|
||||||
|
return this.algorithm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAlgorithm(String sslAlgorithm) {
|
||||||
|
this.algorithm = sslAlgorithm;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Listener {
|
public static class Listener {
|
||||||
|
Loading…
Reference in New Issue
Block a user