How to send a certificate, with specified Provider, and to receive it on another side?
-
07-06-2021 - |
Question
How to send a certificate, which was created from keystore, with specified Provider, and to receive it on another side? I send it like a string in encoded by Base64 format, and cannot to convert it to Certificate, can anyone show how to transmit certificates? I have a file .p12, in Liferay system I should process verification of signed file using certificate, which must be uploaded from my applet to the server, and check sign.
Solution
You will have to convert that certificate value into Base64
format and then into Hex
format then you will have to parse that data to other side. On the other side receive that data and then convert Hex
to Base64
then only you will have to prcess that value.
if you are not doing the same then you will have to face the problem of BadPaddingException
.
Hope this will help you.