Verify a signature with bouncy castle
问题 I inherited some code using the deprecated bouncycastle API. Before updating it to the new API I wanted to write a test to verify that I didn't change its behaviour. However, I cannot work out the correct way to verify this signature that is generated. The code to be changed is: public static byte[] createSignedData(byte[] content, X509Certificate cert, PrivateKey key) throws NoSuchAlgorithmException, NoSuchProviderException, CMSException, IOException { // set up the generator