multiple client CAs
This commit is contained in:
@@ -78,7 +78,7 @@ class TlsSetupSpec extends Specification {
|
||||
certificate: "127.0.0.1.crt",
|
||||
key: "127.0.0.1.p8.key",
|
||||
clientRequire: true,
|
||||
clientCa: "ca.myhost.dev.crt"
|
||||
clientCAs: ["ca.myhost.dev.crt"]
|
||||
)
|
||||
when:
|
||||
def act = tlsSetup.setupServer("test", config, false)
|
||||
@@ -182,12 +182,12 @@ class TlsSetupSpec extends Specification {
|
||||
certificate: "127.0.0.1.crt",
|
||||
key: "127.0.0.1.p8.key",
|
||||
clientRequire: true,
|
||||
clientCa: "none.crt"
|
||||
clientCAs: ["none.crt"]
|
||||
)
|
||||
when:
|
||||
tlsSetup.setupServer("test", config, false)
|
||||
then:
|
||||
def t = thrown(IllegalArgumentException)
|
||||
def t = thrown(FileNotFoundException)
|
||||
}
|
||||
|
||||
def "Fail if client certificate is invalid"() {
|
||||
@@ -197,11 +197,11 @@ class TlsSetupSpec extends Specification {
|
||||
certificate: "127.0.0.1.crt",
|
||||
key: "127.0.0.1.p8.key",
|
||||
clientRequire: true,
|
||||
clientCa: "ca.myhost.dev.key"
|
||||
clientCAs: ["ca.myhost.dev.key"]
|
||||
)
|
||||
when:
|
||||
tlsSetup.setupServer("test", config, false)
|
||||
then:
|
||||
def t = thrown(IllegalArgumentException)
|
||||
def t = thrown(java.security.cert.CertificateParsingException)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,6 +72,6 @@ class AuthConfigReaderSpec extends Specification {
|
||||
act.key == "/etc/client1.myservice.com.key"
|
||||
act.clientRequire != null
|
||||
!act.clientRequire
|
||||
act.clientCa == "/etc/ca.myservice.com.crt"
|
||||
act.clientCAs == ["/etc/ca.myservice.com.crt"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ class MainConfigReaderSpec extends Specification {
|
||||
certificate == "/path/127.0.0.1.crt"
|
||||
key == "/path/127.0.0.1.p8.key"
|
||||
!clientRequire
|
||||
clientCa == "/path/ca.dshackle.test.crt"
|
||||
clientCAs == ["/path/ca.dshackle.test.crt"]
|
||||
}
|
||||
act.cache != null
|
||||
with(act.cache) {
|
||||
|
||||
Reference in New Issue
Block a user