mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-23 14:41:08 +00:00
Use private key algorithm
This commit is contained in:
parent
37953b2168
commit
5b00bbd321
1 changed files with 6 additions and 1 deletions
|
@ -2716,7 +2716,12 @@ public class FragmentCompose extends FragmentBase {
|
|||
CMSSignedDataGenerator cmsGenerator = new CMSSignedDataGenerator();
|
||||
cmsGenerator.addCertificates(store);
|
||||
|
||||
ContentSigner contentSigner = new JcaContentSignerBuilder("SHA256withRSA")
|
||||
String algorithm = privkey.getAlgorithm();
|
||||
Log.i("Private key algorithm=" + algorithm);
|
||||
if (TextUtils.isEmpty(algorithm))
|
||||
algorithm = "RSA";
|
||||
|
||||
ContentSigner contentSigner = new JcaContentSignerBuilder("SHA256with" + algorithm)
|
||||
.build(privkey);
|
||||
DigestCalculatorProvider digestCalculator = new JcaDigestCalculatorProviderBuilder()
|
||||
.build();
|
||||
|
|
Loading…
Reference in a new issue