Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
4c537559
Commit
4c537559
authored
Sep 18, 2017
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish "Added keystore type and truststore type to rabbit properties"
Closes gh-10251
parent
b70ac99b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
15 deletions
+11
-15
RabbitAutoConfiguration.java
...work/boot/autoconfigure/amqp/RabbitAutoConfiguration.java
+2
-6
RabbitProperties.java
...ngframework/boot/autoconfigure/amqp/RabbitProperties.java
+4
-4
RabbitAutoConfigurationTests.java
...boot/autoconfigure/amqp/RabbitAutoConfigurationTests.java
+3
-3
appendix-application-properties.adoc
...cs/src/main/asciidoc/appendix-application-properties.adoc
+2
-2
No files found.
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitAutoConfiguration.java
View file @
4c537559
...
@@ -113,14 +113,10 @@ public class RabbitAutoConfiguration {
...
@@ -113,14 +113,10 @@ public class RabbitAutoConfiguration {
if
(
ssl
.
getAlgorithm
()
!=
null
)
{
if
(
ssl
.
getAlgorithm
()
!=
null
)
{
factory
.
setSslAlgorithm
(
ssl
.
getAlgorithm
());
factory
.
setSslAlgorithm
(
ssl
.
getAlgorithm
());
}
}
if
(
ssl
.
getKeyStoreType
()
!=
null
)
{
factory
.
setKeyStoreType
(
ssl
.
getKeyStoreType
());
factory
.
setKeyStoreType
(
ssl
.
getKeyStoreType
());
}
factory
.
setKeyStore
(
ssl
.
getKeyStore
());
factory
.
setKeyStore
(
ssl
.
getKeyStore
());
factory
.
setKeyStorePassphrase
(
ssl
.
getKeyStorePassword
());
factory
.
setKeyStorePassphrase
(
ssl
.
getKeyStorePassword
());
if
(
ssl
.
getTrustStoreType
()
!=
null
)
{
factory
.
setTrustStoreType
(
ssl
.
getTrustStoreType
());
factory
.
setTrustStoreType
(
ssl
.
getTrustStoreType
());
}
factory
.
setTrustStore
(
ssl
.
getTrustStore
());
factory
.
setTrustStore
(
ssl
.
getTrustStore
());
factory
.
setTrustStorePassphrase
(
ssl
.
getTrustStorePassword
());
factory
.
setTrustStorePassphrase
(
ssl
.
getTrustStorePassword
());
}
}
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java
View file @
4c537559
...
@@ -315,9 +315,9 @@ public class RabbitProperties {
...
@@ -315,9 +315,9 @@ public class RabbitProperties {
private
String
keyStore
;
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.
* Password used to access the key store.
...
@@ -330,9 +330,9 @@ public class RabbitProperties {
...
@@ -330,9 +330,9 @@ public class RabbitProperties {
private
String
trustStore
;
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.
* Password used to access the trust store.
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/amqp/RabbitAutoConfigurationTests.java
View file @
4c537559
...
@@ -542,7 +542,7 @@ public class RabbitAutoConfigurationTests {
...
@@ -542,7 +542,7 @@ public class RabbitAutoConfigurationTests {
@Test
@Test
// Make sure that we at least attempt to load the store
// Make sure that we at least attempt to load the store
public
void
enableSslWithNon
e
xistingKeystoreShouldFail
()
{
public
void
enableSslWithNon
E
xistingKeystoreShouldFail
()
{
this
.
contextRunner
this
.
contextRunner
.
withUserConfiguration
(
TestConfiguration
.
class
)
.
withUserConfiguration
(
TestConfiguration
.
class
)
.
withPropertyValues
(
"spring.rabbitmq.ssl.enabled:true"
,
.
withPropertyValues
(
"spring.rabbitmq.ssl.enabled:true"
,
...
@@ -557,7 +557,7 @@ public class RabbitAutoConfigurationTests {
...
@@ -557,7 +557,7 @@ public class RabbitAutoConfigurationTests {
@Test
@Test
// Make sure that we at least attempt to load the store
// Make sure that we at least attempt to load the store
public
void
enableSslWithNon
existingTrusts
toreShouldFail
()
{
public
void
enableSslWithNon
ExistingTrustS
toreShouldFail
()
{
this
.
contextRunner
this
.
contextRunner
.
withUserConfiguration
(
TestConfiguration
.
class
)
.
withUserConfiguration
(
TestConfiguration
.
class
)
.
withPropertyValues
(
.
withPropertyValues
(
...
@@ -587,7 +587,7 @@ public class RabbitAutoConfigurationTests {
...
@@ -587,7 +587,7 @@ public class RabbitAutoConfigurationTests {
}
}
@Test
@Test
public
void
enableSslWithInvalidTrust
s
toreTypeShouldFail
()
throws
Exception
{
public
void
enableSslWithInvalidTrust
S
toreTypeShouldFail
()
throws
Exception
{
this
.
contextRunner
this
.
contextRunner
.
withUserConfiguration
(
TestConfiguration
.
class
)
.
withUserConfiguration
(
TestConfiguration
.
class
)
.
withPropertyValues
(
.
withPropertyValues
(
...
...
spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc
View file @
4c537559
...
@@ -1051,11 +1051,11 @@ content into your application; rather pick only the properties that you need.
...
@@ -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.requested-heartbeat= # Requested heartbeat timeout, in seconds; zero for none.
spring.rabbitmq.ssl.enabled=false # Enable SSL support.
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= # 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-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= # 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-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.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.mandatory=false # Enable mandatory messages.
spring.rabbitmq.template.receive-timeout=0 # Timeout for `receive()` methods.
spring.rabbitmq.template.receive-timeout=0 # Timeout for `receive()` methods.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment