NetDB: Set secret and privkey before decrypting encls2

This commit is contained in:
zzz
2019-05-22 16:30:32 +00:00
parent 06fa817bde
commit 7489a64e6c
2 changed files with 20 additions and 1 deletions

View File

@ -943,6 +943,13 @@ public abstract class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacad
} else {
encls.setSigningKey(bd.getUnblindedPubKey());
}
// secret
String secret = bd.getSecret();
if (secret != null)
encls.setSecret(secret);
// per-client auth
if (bd.getAuthType() != BlindData.AUTH_NONE)
encls.setClientPrivateKey(bd.getAuthPrivKey());
} else {
if (_log.shouldWarn())
_log.warn("No blind data found for encls: " + encls);