Created
May 9, 2019 11:59
-
-
Save coheigea/eb93405c71d6cf98f1e391b2b8f6a49d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KeyStore keyStore = ... | |
PrivateKey privateKey = (PrivateKey)keyStore.getKey("service", "security".toCharArray()); | |
PublicKey publicKey = keyStore.getCertificate("service").getPublicKey(); | |
TrustedRpkStore trustedRpkStore = id -> { | |
return true; | |
}; | |
context.getRegistry().bind("privateKey", privateKey); | |
context.getRegistry().bind("publicKey", publicKey); | |
context.getRegistry().bind("trustedRpkStore", trustedRpkStore); | |
fromF(getProtocol() + "://localhost:%d/TestResource?privateKey=#privateKey&publicKey=#publicKey", PORT5) | |
.transform(body().prepend("Hello ")); | |
from("direct:rpk") | |
.toF(getProtocol() + "://localhost:%d/TestResource?trustedRpkStore=#trustedRpkStore", PORT5) | |
.to("mock:result"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment