Skip to content

Dynamic loading truststore certificates #130

Answered by phax
TMain-Tomi asked this question in Q&A
Discussion options

You must be logged in to vote

HI @TMain-Tomi , sorry for the delayed response - I am currently on vacation.

I created some stub code for you in https://github.com/phax/phase4/blob/master/phase4-spring-boot-demo/src/main/java/com/helger/phase4/springboot/servlet/ServletConfig.java#L67-L92 where you can see how that might work. You create your own Servlet class (MyAS4Servlet) and customize the handler there.

Inside the static method of the outer class, you can add you code as above:

Path publicCertPath = new File("D:\phase4-as4\src\main\resources\test.jks").toPath()
        String partnerPwd = 'test'
        // Add all certificates to trust store
        KeyStore trustKeyStore = AS4KeystoreUtils.load(publicCertPath, par…

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@TMain-Tomi
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by TMain-Tomi
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants