| 1 |
# The various keystores/truststores here were created with the following commands. |
| 2 |
# You can source this file to run it as a sript to regenerate them. |
| 3 |
|
| 4 |
# NOTE: This module isnt a good example of how to generate keypairs and use keystores. This should be replaced, |
| 5 |
# but needs various module-wide changes to the tests and their client/brokers use of keys/certs/trust. |
| 6 |
|
| 7 |
# Clean up existing files: |
| 8 |
# ------------------------ |
| 9 |
rm -f keystore alternative.keystore |
| 10 |
|
| 11 |
# Create a key pair |
| 12 |
# ----------------- |
| 13 |
keytool -storetype jks -keystore keystore -storepass password -keypass password -alias activemq -genkey -keyalg "RSA" -keysize 2048 -dname "O=ActiveMQ,CN=localhost" -validity 9999 |
| 14 |
|
| 15 |
# Create an alternative keypair, to allow use in provoking 'failure to trust' it when matched against the above |
| 16 |
# ---------------------------------------------------------------------------------------------------------------------- |
| 17 |
keytool -storetype jks -keystore alternative.keystore -storepass password -keypass password -alias alternative -genkey -keyalg "RSA" -keysize 2048 -dname "O=Alternative,CN=localhost" -validity 9999 |