Hello,
I signed a jar file and a document (later on) with the same private
key.
Now I want to use the public key stored in a jar file to verify the
signed document. Is there a class available in the SDK to access the
private key from within the *.dsa file?
Or do I miss someting and this makes no sense?
Thanks,
Peter
Maarten Bodewes - 22 Mar 2008 16:20 GMT
> Hello,
>
[quoted text clipped - 4 lines]
> signed document. Is there a class available in the SDK to access the
> private key from within the *.dsa file?
When you save a key you can look at the format (key.getFormat() or
something). If it is PKCS8 you could recreated the key using the the
"PKCS8" parameter for KeyFactory. Unfortunately I don't have the code
for that right here.
Not a complete solution, but maybe this points you in the right direction...
Regards,
Maarten