Closed kurbhatt closed 3 years ago
Hi
FileSystemKeyStoreKeyingDataProvider
/ KeyStoreKeyingDataProvider
classes.
KeyingDataProvider
, which takes the stream and loads the keystore. Should be simple enough.StreamResult
has a constructor that takes an OutputStream
. You can pass whatever you want there, namely a ByteArrayOutputStream
if you want the bytes.Let me know if this helps.
Hello. Thanks for the quick guidance. Created Custom KeyingDataProvider implementation that takes KeyStore(passed InputStream and password in .load() method)as a parameter(prepared it before provider call) and ByteArrayOutputStream as a StreamResult constructor parameter and it's working as expected.
Your suggestion works very well. There is one caveat, this I have done first through file read. Now I have a String variable(fetched from database) that will have PKCS12 certificate string but while converting that String to InputStream(using ByteArrayInputStream) it's not working(in .load() method). Any suggestion on this?
I don't know what the encoding of that string is. Is it base64? Did you decode that?
Anyway, that doesn't seem related to xades4j at all. You seem to be on the right track with the other issues. I'm closing this now.
@luisgoncalves What is the reason for adding an invalid label?
Nothing in the ticket highlighted an issue in xades4j. This way it's easier to lookup such issues.
Hello, I have a working code for XAdES for signing XML. There're mainly 2 questions I have:
Following is the code:
If there's any possibility to handle the above-mentioned cases, please guide me for that.