Closed yaskovdev closed 3 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Sorry for the delay, but I think here's a solution for you (should work with 4.6.3):
CertificateFactory
load (new ByteArrayInputStream (bytes), "password".toCharArray ())
See e.g. the demo class in the previouse commit - untested but should work
@phax, I have tried the approach you suggested, it works very well. Thank you for the great library.
Not sure what to do with the issue. It most likely can be just closed, cannot it?
Thanks for verifying it :) Happy messaging
I am using your library with Spring Boot application. Everything works fine, but there is a small issue with the
CertificateFactory
initialization. Current implementation ofCertificateFactory
can only be initialized using the filename of my keystore (via passing the filename as theATTR_FILENAME
value to theCertificateFactory#initDynamicComponent
method).This causes issues when the keystore file resides not in the filesystem of the OS where I run my AS2 server, but is located inside the Spring Boot JAR file. This is because Spring cannot resolve the proper filename for a file located inside the JAR, it will try to find the file in the filesystem and fail (details here).
Please add possibility to initialize
CertificateFactory
not with the filename of the keystore, but with theInputStream
(orbyte[]
) of the keystore. I can see thatAS2Client
already provides such possibility (seeAS2ClientSettings#setKeyStore(IKeyStoreType, byte[], String)
method). Unfortunately I was not able to find such possibility for AS2 server.Thank you.