function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Swati TaunkSwati Taunk 

Verify signature using public key

Crypto class provides methods to Sign and Verify signature using certificate. 
- signWithCertificate(algorithmName, input, certDevName)
- verify(String algorithmName, Blob data, Blob signature, String certDevName)

Here the signWithCertificate method expects a privateKey. I have the Signing certificate uploaded in Certificate and Key Management page.

But verify method expects a public key. I have the public certificate provided by the 3rd party application but where can I upload this public certificate in salesforce so it can be used in the verify method? I am not able to upload on Certificate and Key Management page. It gives an error saying: Private Key is missing.