Merge branch 'stable-3.1'

* stable-3.1:
  InitSshd: Use correct flag to set empty passphrase for all key types
  Move EventEmitter on Gerrit to gr-gerrit file

Change-Id: Id2be221e3b893168df67dfc76460058efe07b2e0
This commit is contained in:
David Pursehouse
2019-12-12 10:27:46 +09:00
3 changed files with 41 additions and 40 deletions

View File

@@ -124,7 +124,7 @@ public class InitSshd implements InitStep {
"-q" /* quiet */,
"-t",
"ed25519",
"-P",
"-N",
emptyPassphraseArg,
"-C",
comment,
@@ -152,7 +152,7 @@ public class InitSshd implements InitStep {
"ecdsa",
"-b",
"256",
"-P",
"-N",
emptyPassphraseArg,
"-C",
comment,
@@ -180,7 +180,7 @@ public class InitSshd implements InitStep {
"ecdsa",
"-b",
"384",
"-P",
"-N",
emptyPassphraseArg,
"-C",
comment,
@@ -208,7 +208,7 @@ public class InitSshd implements InitStep {
"ecdsa",
"-b",
"521",
"-P",
"-N",
emptyPassphraseArg,
"-C",
comment,

View File

@@ -156,4 +156,41 @@
// Preloaded plugins should be installed after Gerrit.install() is set,
// since plugin preloader substitutes Gerrit.install() temporarily.
Gerrit._pluginLoader.installPreloadedPlugins();
// TODO(taoalpha): List all internal supported event names.
// Also convert this to inherited class once we move Gerrit to class.
Gerrit._eventEmitter = new EventEmitter();
['addListener',
'dispatch',
'emit',
'off',
'on',
'once',
'removeAllListeners',
'removeListener',
].forEach(method => {
/**
* Enabling EventEmitter interface on Gerrit.
*
* This will enable to signal across different parts of js code without relying on DOM,
* including core to core, plugin to plugin and also core to plugin.
*
* @example
*
* // Emit this event from pluginA
* Gerrit.install(pluginA => {
* fetch("some-api").then(() => {
* Gerrit.on("your-special-event", {plugin: pluginA});
* });
* });
*
* // Listen on your-special-event from pluignB
* Gerrit.install(pluginB => {
* Gerrit.on("your-special-event", ({plugin}) => {
* // do something, plugin is pluginA
* });
* });
*/
Gerrit[method] = Gerrit._eventEmitter[method].bind(Gerrit._eventEmitter);
});
})(window);

View File

@@ -381,40 +381,4 @@
};
window.Plugin = Plugin;
// TODO(taoalpha): List all internal supported event names.
// Also convert this to inherited class once we move Gerrit to class.
Gerrit._eventEmitter = new EventEmitter();
['addListener',
'dispatch',
'emit',
'off',
'on',
'once',
'removeAllListeners',
'removeListener',
].forEach(method => {
/**
* Enabling EventEmitter interface on Gerrit.
*
* This will enable to signal across different parts of js code without relying on DOM,
* including core to core, plugin to plugin and also core to plugin.
*
* @example
*
* // Emit this event from pluginA
* Gerrit.install(pluginA => {
* fetch("some-api").then(() => {
* Gerrit.on("your-special-event", {plugin: pluginA});
* });
* });
*
* // Listen on your-special-event from pluignB
* Gerrit.install(pluginB => {
* Gerrit.on("your-special-event", ({plugin}) => {
* // do something, plugin is pluginA
* });
* });
*/
Gerrit[method] = Gerrit._eventEmitter[method].bind(Gerrit._eventEmitter);
});
})(window);