Commit 7430903
authored
fix: install custom crypto engine before pkijs parseInternalValues (#44)
When a P12 file uses legacy encryption (3DES, RC2) for its safe contents,
pkijs needs our custom CryptoEngine during parseInternalValues(). Previously,
the engine was only installed lazily on first getCrypto() call in
extractPrivateKey(), which runs after parseInternalValues().
This caused 'Unknown contentEncryptionAlgorithm: 1.2.840.113549.1.12.1.3'
when a legacy P12 was the first one opened in a process. Our tests masked
this because AES tests always ran first, installing the engine as a side
effect.1 parent 82e0767 commit 7430903
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
113 | 119 | | |
114 | 120 | | |
115 | 121 | | |
| |||
0 commit comments