@dotrino/vaultd 0.82.0 → 0.83.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/vault.js +8 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dotrino/vaultd",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.83.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Certificador personal de Dotrino: daemon headless que custodia la clave maestra y delega capacidades a tus dispositivos por el proxy. Tu CA propia.",
|
|
6
6
|
"bin": {
|
package/src/vault.js
CHANGED
|
@@ -1979,7 +1979,14 @@ export async function startVault ({ dir = dataDir(), proxyUrl, log = console.log
|
|
|
1979
1979
|
return false
|
|
1980
1980
|
} catch (_) {}
|
|
1981
1981
|
try {
|
|
1982
|
-
|
|
1982
|
+
// LA LLAVE DE LA MÁQUINA, EXPLÍCITA. `null` NO vale aquí: `defaultKey()` mira primero
|
|
1983
|
+
// `openKey()`, y con el perfil ABIERTO eso es la llave de la contraseña — o sea que
|
|
1984
|
+
// pasar `null` probaba la misma llave dos veces y la migración no migraba nada. Lo
|
|
1985
|
+
// dijo el propio diagnóstico: «no abre ni con la contraseña ni con la de la máquina»,
|
|
1986
|
+
// cuando la de la máquina no se había llegado a probar.
|
|
1987
|
+
const maquina = new Uint8Array(kekFor(dir))
|
|
1988
|
+
await secrets.recoveryOpensWith(maquina) // si esta tampoco, no hay migración que hacer
|
|
1989
|
+
const r = await secrets.rekeyRecovery(maquina, adminKey)
|
|
1983
1990
|
if (!r?.rekeyed) return false
|
|
1984
1991
|
log('[vault] the recovery copy was sealed with this machine\'s key: re-sealed under the profile password')
|
|
1985
1992
|
audit('secret.recovery-rekeyed', {})
|