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
a358f3f0
Commit
a358f3f0
authored
Apr 25, 2018
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.5.x' into 2.0.x
parents
11ad9bfe
c78bc058
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
UndertowServletWebServerFactoryTests.java
...bedded/undertow/UndertowServletWebServerFactoryTests.java
+12
-3
No files found.
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/undertow/UndertowServletWebServerFactoryTests.java
View file @
a358f3f0
...
...
@@ -18,6 +18,7 @@ package org.springframework.boot.web.embedded.undertow;
import
java.io.File
;
import
java.io.IOException
;
import
java.net.SocketException
;
import
java.net.URISyntaxException
;
import
java.nio.charset.Charset
;
import
java.util.Arrays
;
...
...
@@ -50,6 +51,8 @@ import org.springframework.http.HttpStatus;
import
org.springframework.test.util.ReflectionTestUtils
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
hamcrest
.
CoreMatchers
.
anyOf
;
import
static
org
.
hamcrest
.
CoreMatchers
.
instanceOf
;
import
static
org
.
mockito
.
ArgumentMatchers
.
any
;
import
static
org
.
mockito
.
Mockito
.
inOrder
;
import
static
org
.
mockito
.
Mockito
.
mock
;
...
...
@@ -208,14 +211,18 @@ public class UndertowServletWebServerFactoryTests
(
builder
)
->
builder
.
addHttpListener
(
port
,
"0.0.0.0"
));
}
@Test
(
expected
=
SSLHandshakeException
.
class
)
@Test
public
void
sslRestrictedProtocolsEmptyCipherFailure
()
throws
Exception
{
this
.
thrown
.
expect
(
anyOf
(
instanceOf
(
SSLHandshakeException
.
class
),
instanceOf
(
SocketException
.
class
)));
testRestrictedSSLProtocolsAndCipherSuites
(
new
String
[]
{
"TLSv1.2"
},
new
String
[]
{
"TLS_EMPTY_RENEGOTIATION_INFO_SCSV"
});
}
@Test
(
expected
=
SSLException
.
class
)
@Test
public
void
sslRestrictedProtocolsECDHETLS1Failure
()
throws
Exception
{
this
.
thrown
.
expect
(
anyOf
(
instanceOf
(
SSLException
.
class
),
instanceOf
(
SocketException
.
class
)));
testRestrictedSSLProtocolsAndCipherSuites
(
new
String
[]
{
"TLSv1"
},
new
String
[]
{
"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"
});
}
...
...
@@ -232,8 +239,10 @@ public class UndertowServletWebServerFactoryTests
new
String
[]
{
"TLS_RSA_WITH_AES_128_CBC_SHA256"
});
}
@Test
(
expected
=
SSLException
.
class
)
@Test
public
void
sslRestrictedProtocolsRSATLS11Failure
()
throws
Exception
{
this
.
thrown
.
expect
(
anyOf
(
instanceOf
(
SSLException
.
class
),
instanceOf
(
SocketException
.
class
)));
testRestrictedSSLProtocolsAndCipherSuites
(
new
String
[]
{
"TLSv1.1"
},
new
String
[]
{
"TLS_RSA_WITH_AES_128_CBC_SHA256"
});
}
...
...
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