mirror of
https://github.com/bitwarden/mobile.git
synced 2024-11-27 12:26:31 +01:00
revert back to KeyPairGeneratorSpec
KeyGenParameterSpec crashes
This commit is contained in:
parent
5347624455
commit
8719b3eb64
@ -102,11 +102,12 @@ namespace Bit.Android.Services
|
||||
end.Add(CalendarField.Year, 30);
|
||||
|
||||
var gen = KeyPairGenerator.GetInstance(KeyProperties.KeyAlgorithmRsa, AndroidKeyStore);
|
||||
var spec = new KeyGenParameterSpec.Builder(KeyAlias, KeyStorePurpose.Encrypt | KeyStorePurpose.Decrypt)
|
||||
.SetCertificateSubject(new X500Principal($"CN={KeyAlias}"))
|
||||
.SetCertificateSerialNumber(BigInteger.Ten)
|
||||
.SetKeyValidityStart(start.Time)
|
||||
.SetKeyValidityEnd(end.Time)
|
||||
var spec = new KeyPairGeneratorSpec.Builder(Application.Context)
|
||||
.SetAlias(KeyAlias)
|
||||
.SetSubject(new X500Principal($"CN={KeyAlias}"))
|
||||
.SetSerialNumber(BigInteger.Ten)
|
||||
.SetStartDate(start.Time)
|
||||
.SetEndDate(end.Time)
|
||||
.Build();
|
||||
|
||||
gen.Initialize(spec);
|
||||
|
Loading…
Reference in New Issue
Block a user