Skip to content

Commit

Permalink
Add readme to test update server ssl options
Browse files Browse the repository at this point in the history
  • Loading branch information
pcHwang2 committed Nov 15, 2024
1 parent 6187942 commit b2d3cad
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 0 deletions.
17 changes: 17 additions & 0 deletions vertx-proton/src/test/resources/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,20 @@ keytool -storetype pkcs12 -keystore ca-pkcs12.keystore -storepass password -alia

keytool -storetype pkcs12 -keystore broker-wrong-host-pkcs12.keystore -storepass password -keypass password -importcert -alias ca -file ca.crt -noprompt
keytool -storetype pkcs12 -keystore broker-wrong-host-pkcs12.keystore -storepass password -keypass password -importcert -alias broker-wrong-host -file broker-wrong-host.crt

# Create updated key pair for the broker, and sign it with the CA:
# --------------------------------------------------------------------------------------
keytool -storetype pkcs12 -keystore ca-updated-pkcs12.keystore -storepass password -keypass password -alias ca-updated -genkey -keyalg "RSA" -keysize 2048 -dname "O=My Trusted Inc.,CN=my-vertx-ca.org" -validity 9999 -ext bc:c=ca:true
keytool -storetype pkcs12 -keystore ca-updated-pkcs12.keystore -storepass password -alias ca-updated -exportcert -rfc > ca-updated.crt

keytool -storetype pkcs12 -keystore broker-updated-pkcs12.keystore -storepass password -keypass password -alias broker-updated -genkey -keyalg "RSA" -keysize 2048 -dname "O=Server,CN=localhost" -validity 9999 -ext bc=ca:false -ext eku=sA

keytool -storetype pkcs12 -keystore broker-updated-pkcs12.keystore -storepass password -alias broker-updated -certreq -file broker-updated.csr
keytool -storetype pkcs12 -keystore ca-updated-pkcs12.keystore -storepass password -alias ca-updated -gencert -rfc -infile broker-updated.csr -outfile broker-updated.crt -validity 9999 -ext bc=ca:false -ext eku=sA

keytool -storetype pkcs12 -keystore broker-updated-pkcs12.keystore -storepass password -keypass password -importcert -alias ca-updated -file ca-updated.crt -noprompt
keytool -storetype pkcs12 -keystore broker-updated-pkcs12.keystore -storepass password -keypass password -importcert -alias broker-updated -file broker-updated.crt

# Create updated trust store for the client, import the CA cert:
# -------------------------------------------------------
keytool -storetype pkcs12 -keystore client-updated-pkcs12.truststore -storepass password -keypass password -importcert -alias ca-updated -file ca-updated.crt -noprompt
Binary file modified vertx-proton/src/test/resources/broker-updated-pkcs12.keystore
Binary file not shown.
20 changes: 20 additions & 0 deletions vertx-proton/src/test/resources/broker-updated.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-----BEGIN CERTIFICATE-----
MIIDOzCCAiOgAwIBAgIEBDbkcjANBgkqhkiG9w0BAQsFADA0MRgwFgYDVQQDEw9t
eS12ZXJ0eC1jYS5vcmcxGDAWBgNVBAoTD015IFRydXN0ZWQgSW5jLjAgFw0yNDEx
MTUxNjI0MjZaGA8yMDUyMDQwMTE2MjQyNlowJTESMBAGA1UEAxMJbG9jYWxob3N0
MQ8wDQYDVQQKEwZTZXJ2ZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
AQCq3lbL8oRXdirtReK/j48pXhj4nrTMCDncZfS21RymC6h6AHrWryMxJGdbef+J
l5TIz9+FQ5fHXMCrYAjBfAzXOOPNIdHULWFbtFYvMBYt465rce6a9Cx+oLMzXF/d
wEyp0UUw1qfohIHQXIkITdv1nel5esXO3FqnCLccm9SWE6ZlKYpIaeLUKNb8EcmH
rRbL/P8/8HjK0cnjFZkbnaVlM7lvX3XxthppObjeBfpJMhrERZXzc8Upf2BYHwfd
xWMie2UKl3ACTXwFsRnPa8x1YNp4/yuYXdGYUBCQ9HA/ezVsT89ZsSCg9/OOr/yC
EfxbAybk0bR+LWjra7pCjbwFAgMBAAGjYjBgMB8GA1UdIwQYMBaAFKkEm1HEvDRZ
lChy2F2OeUc2mLf/MAkGA1UdEwQCMAAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwHQYD
VR0OBBYEFNiRb8eYOuF0RYU94gphl4E/ugvIMA0GCSqGSIb3DQEBCwUAA4IBAQBU
+EGzgbO2CNmmukfxQBqUBnAPPyC2btTrVYdaRwnOhMNGcmPXK2Y1xjz42I/igFKY
o15yKaPIu3mvL4Fa2DoV7RH26PKXSyivXz6kkJI8PerOaDTMNk8uQ5zL1+ziuKYp
3jpM+kHsse5zrO15D9RpUA7ueTAXlvnorA1BTD2tOspFspZIHk4k5CLAd+CW6jzj
i7lOmz+KC7hokFae9f3Pn7vLB2PsbtbVdjARcFSorfWnMUXiFgCIoDMuRdVQ/qrq
CAuFbMXGW4jgIhysC42V8qPpi/7FnaUPvRuw4ITgNCt6HYn18kmubhxHKOsR9cDv
Rvfyb302QucnMtY0FTVS
-----END CERTIFICATE-----
16 changes: 16 additions & 0 deletions vertx-proton/src/test/resources/broker-updated.csr
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-----BEGIN NEW CERTIFICATE REQUEST-----
MIICmjCCAYICAQAwJTESMBAGA1UEAxMJbG9jYWxob3N0MQ8wDQYDVQQKEwZTZXJ2
ZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq3lbL8oRXdirtReK/
j48pXhj4nrTMCDncZfS21RymC6h6AHrWryMxJGdbef+Jl5TIz9+FQ5fHXMCrYAjB
fAzXOOPNIdHULWFbtFYvMBYt465rce6a9Cx+oLMzXF/dwEyp0UUw1qfohIHQXIkI
Tdv1nel5esXO3FqnCLccm9SWE6ZlKYpIaeLUKNb8EcmHrRbL/P8/8HjK0cnjFZkb
naVlM7lvX3XxthppObjeBfpJMhrERZXzc8Upf2BYHwfdxWMie2UKl3ACTXwFsRnP
a8x1YNp4/yuYXdGYUBCQ9HA/ezVsT89ZsSCg9/OOr/yCEfxbAybk0bR+LWjra7pC
jbwFAgMBAAGgMDAuBgkqhkiG9w0BCQ4xITAfMB0GA1UdDgQWBBTYkW/HmDrhdEWF
PeIKYZeBP7oLyDANBgkqhkiG9w0BAQsFAAOCAQEAVPEi+keitw80PwR16sr5EhGk
79OxNemiYaqmUIGBu3mdIDn1FGxoUCrSfwpOZ6f5Y8uF4Or8E8q+Gn6yY0LYOu7e
gYK2OFw1VODdN+07vjqZfdIsRLU1vyZoeIud70FR7Tn/1FatvpHP4/U2fM/NiiW/
tN+xPS3mShvlICPhSKFi7qelFlA2sxLO7RHJert8FXDSWzqIQi2fEeR1bVGcueR0
pzN8nxvr7VW9/4YT/A2qPNip+UAJ6SWTsTZunAokSGVqyg9GHyoPgW+8o5zy2OKW
bkgVQU7EtRzG620o7ojRKmIzW/jqPxKqtbH7VdUo5nAGzDO5Ay5EOqv/QKl5Rw==
-----END NEW CERTIFICATE REQUEST-----
Binary file not shown.
19 changes: 19 additions & 0 deletions vertx-proton/src/test/resources/ca-updated.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-----BEGIN CERTIFICATE-----
MIIDGjCCAgKgAwIBAgIEFgwG/zANBgkqhkiG9w0BAQsFADA0MRgwFgYDVQQDEw9t
eS12ZXJ0eC1jYS5vcmcxGDAWBgNVBAoTD015IFRydXN0ZWQgSW5jLjAgFw0yNDEx
MTUxNjI0MjBaGA8yMDUyMDQwMTE2MjQyMFowNDEYMBYGA1UEAxMPbXktdmVydHgt
Y2Eub3JnMRgwFgYDVQQKEw9NeSBUcnVzdGVkIEluYy4wggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQCW/eioYked6xetaXxv6I6RUqx+p3hTkGDUcAsdjbgZ
pfHlBsUdzvDXXBjzwBDSHTE34Qqmu/WI3TAZYswBzDTBOCETAYrqZw04NuLuT7Cj
ZyuECANPIGlWQBRvG2AEIEj1nVHk8KyE0qoUVEw/MOoFCdRa/LsbIaljrPG66s1s
zN+WjSh+489lGR7UadxghBInkyjBUkeQ2psDmbyr8VR32y3EJASbPVpwh8YDDTh5
HZS0JC0G78DtD0zL2xdHhyBoLy9zI13LPNyNDKYoHrRgfg4s+T8wAgNB01YHzZAm
JHoTArRe0816koYE1ND7JWBuvjvFnhdDIglNUblOFtxFAgMBAAGjMjAwMA8GA1Ud
EwEB/wQFMAMBAf8wHQYDVR0OBBYEFKkEm1HEvDRZlChy2F2OeUc2mLf/MA0GCSqG
SIb3DQEBCwUAA4IBAQBOgLOI7bYM5r5HAXwk6fWO+DJomhk2NeRwU9vCLa9s1ahV
rrIH0aZiQuCntPRWwZqTCtLR/nwZXCCwG+GR91sZnl6IfcJ0EzP6OSYTx1PQSNbW
Lc0jNmGWgKqpnhmzsF64ZKxETNTSD0mdXPS5LHWcGrvqoUAwn8tS5UTPZfUS32kj
FSU6R7INYMQ2gZshGfyWj46lLsDMiL+5WbSTrp0m86qBZ+PcMxZhXE3FCxYM8sWe
S/DdeILzaMLeVpJzseJWSL26pK7quoBCZhblP17CueTeoCatq/4J4tzoVSi0DudL
5BwpbW5xjHT+afySFRDxZsM6YpOpATNof1pjUSMH
-----END CERTIFICATE-----
Binary file modified vertx-proton/src/test/resources/client-updated-pkcs12.truststore
Binary file not shown.

0 comments on commit b2d3cad

Please sign in to comment.