This post has NOT been accepted by the mailing list yet.
I am trying to encrypt mail to recipient which has certificate with ECDSA algorithm. For this using below code :
SMIMEEnvelopedGenerator encrypter = new SMIMEEnvelopedGenerator();
JceKeyAgreeRecipientInfoGenerator rig = new JceKeyAgreeRecipientInfoGenerator(CMSAlgorithm.ECDH_SHA1KDF, senderPrivKey, senderPubKey, CMSAlgorithm.AES128_WRAP);
MimeBodyPart encryptedPart = encrypter.generate(mimeMessage, new JceCMSContentEncryptorBuilder(CMSAlgorithm.RC2_CBC).setProvider(BC).build());
The code works if the sender certificate is also having ECDSA algorithm but fails if sender certificate has RSA algorithm. Get below exception: