Move registerEmailPrivateKey to secure.config

This is the last column in the system_config table that is needed by
the stand-alone daemon installation format. Later we can look into
dropping the entire system_config table.

Change-Id: I8448c79e959b465e370a10a7fa6751c200c1b1a0
This commit is contained in:
Shawn O. Pearce
2011-06-16 19:18:54 -07:00
parent 1eabff5098
commit 34f38cf679
8 changed files with 54 additions and 78 deletions

View File

@@ -18,6 +18,7 @@ import static com.google.gerrit.pgm.init.InitUtil.dnOf;
import com.google.gerrit.pgm.util.ConsoleUI;
import com.google.gerrit.reviewdb.AuthType;
import com.google.gwtjsonrpc.server.SignedToken;
import com.google.inject.Inject;
import com.google.inject.Singleton;
@@ -80,5 +81,9 @@ class InitAuth implements InitStep {
break;
}
}
if (auth.getSecure("registerEmailPrivateKey") == null) {
auth.setSecure("registerEmailPrivateKey", SignedToken.generateRandomKey());
}
}
}