Commit 29f2c30
Align certificate validity and RSA defaults with AOSP (#167)
1. Certificate Validity: Matches `add_required_parameters`:
- NotBefore: Unix Epoch (0).
- NotAfter: RFC 5280 GeneralizedTime max (9999-12-31). Previous
defaults (Current Time to +1 Year) imply a fingerprinting risk.
2. RSA Exponent: Added a null-safe fallback to F4 (65537). This prevents
a NullPointerException when callers omit the public exponent
parameter.
Corresponding references:
1. https://cs.android.com/android/platform/superproject/+/android-latest-release:system/security/keystore2/src/security_level.rs;
2. https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/keystore/java/android/security/keystore2/AndroidKeyStoreKeyPairGeneratorSpi.java;
Co-authored-by: Mohammed Riad <52679407+MhmRdd@users.noreply.github.com>1 parent e82b982 commit 29f2c30
1 file changed
Lines changed: 16 additions & 6 deletions
Lines changed: 16 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
| |||
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
54 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
55 | 62 | | |
56 | 63 | | |
57 | 64 | | |
| |||
218 | 225 | | |
219 | 226 | | |
220 | 227 | | |
221 | | - | |
222 | | - | |
223 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
224 | 234 | | |
225 | 235 | | |
226 | 236 | | |
227 | 237 | | |
228 | 238 | | |
229 | | - | |
230 | | - | |
| 239 | + | |
| 240 | + | |
231 | 241 | | |
232 | 242 | | |
233 | 243 | | |
| |||
0 commit comments