Polish "Added keystore type and truststore type to rabbit properties"
Closes gh-10251
This commit is contained in:
@@ -113,14 +113,10 @@ public class RabbitAutoConfiguration {
|
||||
if (ssl.getAlgorithm() != null) {
|
||||
factory.setSslAlgorithm(ssl.getAlgorithm());
|
||||
}
|
||||
if (ssl.getKeyStoreType() != null) {
|
||||
factory.setKeyStoreType(ssl.getKeyStoreType());
|
||||
}
|
||||
factory.setKeyStoreType(ssl.getKeyStoreType());
|
||||
factory.setKeyStore(ssl.getKeyStore());
|
||||
factory.setKeyStorePassphrase(ssl.getKeyStorePassword());
|
||||
if (ssl.getTrustStoreType() != null) {
|
||||
factory.setTrustStoreType(ssl.getTrustStoreType());
|
||||
}
|
||||
factory.setTrustStoreType(ssl.getTrustStoreType());
|
||||
factory.setTrustStore(ssl.getTrustStore());
|
||||
factory.setTrustStorePassphrase(ssl.getTrustStorePassword());
|
||||
}
|
||||
|
||||
@@ -315,9 +315,9 @@ public class RabbitProperties {
|
||||
private String keyStore;
|
||||
|
||||
/**
|
||||
* Set the key store type (jks, pkcs12, etc).
|
||||
* Key store type.
|
||||
*/
|
||||
private String keyStoreType;
|
||||
private String keyStoreType = "PKCS12";
|
||||
|
||||
/**
|
||||
* Password used to access the key store.
|
||||
@@ -330,9 +330,9 @@ public class RabbitProperties {
|
||||
private String trustStore;
|
||||
|
||||
/**
|
||||
* Set the trust store type (jks, pkcs12, etc).
|
||||
* Trust store type.
|
||||
*/
|
||||
private String trustStoreType;
|
||||
private String trustStoreType = "JKS";
|
||||
|
||||
/**
|
||||
* Password used to access the trust store.
|
||||
|
||||
@@ -542,7 +542,7 @@ public class RabbitAutoConfigurationTests {
|
||||
|
||||
@Test
|
||||
// Make sure that we at least attempt to load the store
|
||||
public void enableSslWithNonexistingKeystoreShouldFail() {
|
||||
public void enableSslWithNonExistingKeystoreShouldFail() {
|
||||
this.contextRunner
|
||||
.withUserConfiguration(TestConfiguration.class)
|
||||
.withPropertyValues("spring.rabbitmq.ssl.enabled:true",
|
||||
@@ -557,7 +557,7 @@ public class RabbitAutoConfigurationTests {
|
||||
|
||||
@Test
|
||||
// Make sure that we at least attempt to load the store
|
||||
public void enableSslWithNonexistingTruststoreShouldFail() {
|
||||
public void enableSslWithNonExistingTrustStoreShouldFail() {
|
||||
this.contextRunner
|
||||
.withUserConfiguration(TestConfiguration.class)
|
||||
.withPropertyValues(
|
||||
@@ -587,7 +587,7 @@ public class RabbitAutoConfigurationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void enableSslWithInvalidTruststoreTypeShouldFail() throws Exception {
|
||||
public void enableSslWithInvalidTrustStoreTypeShouldFail() throws Exception {
|
||||
this.contextRunner
|
||||
.withUserConfiguration(TestConfiguration.class)
|
||||
.withPropertyValues(
|
||||
|
||||
@@ -1051,11 +1051,11 @@ content into your application; rather pick only the properties that you need.
|
||||
spring.rabbitmq.requested-heartbeat= # Requested heartbeat timeout, in seconds; zero for none.
|
||||
spring.rabbitmq.ssl.enabled=false # Enable SSL support.
|
||||
spring.rabbitmq.ssl.key-store= # Path to the key store that holds the SSL certificate.
|
||||
spring.rabbitmq.ssl.key-store-type= # Type of key store (jks, pkcs12,..). Defaults to pkcs12 if not set
|
||||
spring.rabbitmq.ssl.key-store-password= # Password used to access the key store.
|
||||
spring.rabbitmq.ssl.key-store-type=PKCS12 # Key store type.
|
||||
spring.rabbitmq.ssl.trust-store= # Trust store that holds SSL certificates.
|
||||
spring.rabbitmq.ssl.trust-store-type= # Type of trust store (jks, pkcs12,..). Defaults to jks if not set
|
||||
spring.rabbitmq.ssl.trust-store-password= # Password used to access the trust store.
|
||||
spring.rabbitmq.ssl.trust-store-type=JKS # Trust store type.
|
||||
spring.rabbitmq.ssl.algorithm= # SSL algorithm to use. By default configure by the rabbit client library.
|
||||
spring.rabbitmq.template.mandatory=false # Enable mandatory messages.
|
||||
spring.rabbitmq.template.receive-timeout=0 # Timeout for `receive()` methods.
|
||||
|
||||
Reference in New Issue
Block a user