Issue 203: Update the truststore/keystore for stream-tests (#301)
* Update the stream-tests truststore/keystore to refer to pekko-remote The same truststore/keyspace as the one generate with the Makefile at remote/src/test/resources is used here" * Revert "Update the stream-tests truststore/keystore to refer to pekko-remote" This reverts commit 7bab689bb6257e80d2bd8cdff2b8a715bb08c619. * Issue 203: Update keystore/truststore for stream-tests: Note that no SAN extension file is used in this case. Therefore the verify hostname code looks at the CN= instead of the subjectAltName field. I've added a Makefile here to make it easier to regenerate this in future: just delete the trust/keystores and run 'make' * 203: Add comment explaining new Makefile
This commit is contained in:
parent
dcacb0ff03
commit
46b02c6640
5 changed files with 21 additions and 2 deletions
19
stream-tests/src/test/resources/Makefile
Normal file
19
stream-tests/src/test/resources/Makefile
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# Documents how truststore and keystore were created
|
||||
# A similar Makefile is found in remote/src/test/resources/, however here the cert is created without specifying a Subject Alternate Name
|
||||
all: truststore keystore
|
||||
|
||||
truststore: domain.crt
|
||||
keytool -importcert -file domain.crt -keystore truststore -deststorepass changeme
|
||||
|
||||
keystore: domain.crt domain.key
|
||||
openssl pkcs12 -export -inkey domain.key -passin pass:changeme -in domain.crt -out keystore -passout pass:changeme
|
||||
|
||||
domain.crt: domain.csr domain.key
|
||||
openssl x509 -req -in domain.csr -sha256 -out domain.crt -signkey domain.key
|
||||
|
||||
domain.csr:
|
||||
openssl req -new -newkey rsa:2048 -keyout domain.key -subj "/C=US/ST=Delaware/O=Apache/CN=pekko-remote" -out domain.csr -passout pass:changeme
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm domain.key domain.crt domain.csr keystore truststore
|
||||
Binary file not shown.
Binary file not shown.
|
|
@ -526,7 +526,7 @@ class DeprecatedTlsSpec extends StreamSpec(DeprecatedTlsSpec.configOverrides) wi
|
|||
|
||||
Source.single(SendBytes(ByteString.empty)).via(flow).runWith(Sink.ignore)
|
||||
}
|
||||
Await.result(run("akka-remote"), 3.seconds) // CN=akka-remote
|
||||
Await.result(run("pekko-remote"), 3.seconds) // CN=pekko-remote
|
||||
val cause = intercept[Exception] {
|
||||
Await.result(run("unknown.example.org"), 3.seconds)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -574,7 +574,7 @@ class TlsSpec extends StreamSpec(TlsSpec.configOverrides) with WithLogCapturing
|
|||
Source.single(SendBytes(ByteString.empty)).via(flow).runWith(Sink.ignore)
|
||||
}
|
||||
|
||||
Await.result(run("akka-remote"), 3.seconds) // CN=akka-remote
|
||||
Await.result(run("pekko-remote"), 3.seconds) // CN=pekko-remote
|
||||
val cause = intercept[Exception] {
|
||||
Await.result(run("unknown.example.org"), 3.seconds)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue