mirror of
https://github.com/aljazceru/cyphernode.git
synced 2026-01-03 04:55:46 +01:00
gatekeeper prompts now ask for confirmation of the keys archive password
This commit is contained in:
@@ -23,6 +23,8 @@ const hasCert = function( props ) {
|
||||
props.gatekeeper_sslcert
|
||||
}
|
||||
|
||||
let password = '';
|
||||
|
||||
module.exports = {
|
||||
name: function() {
|
||||
return name;
|
||||
@@ -37,6 +39,24 @@ module.exports = {
|
||||
filter: utils._trimFilter,
|
||||
validate: utils._notEmptyValidator
|
||||
},
|
||||
{
|
||||
when: function( props ) {
|
||||
// hacky hack
|
||||
password = props.gatekeeper_clientkeyspassword;
|
||||
return true;
|
||||
},
|
||||
type: 'password',
|
||||
name: 'gatekeeper_clientkeyspassword_c',
|
||||
default: utils._getDefault( 'gatekeeper_clientkeyspassword_c' ),
|
||||
message: prefix()+'Config your client keys password.'+utils._getHelp('gatekeeper_clientkeyspassword_c'),
|
||||
filter: utils._trimFilter,
|
||||
validate: function( input ) {
|
||||
if(input !== password) {
|
||||
throw new Error( 'Client keys passwords do not match' );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
},
|
||||
{
|
||||
when: function() { return hasAuthKeys( utils.props ); },
|
||||
type: 'confirm',
|
||||
|
||||
Reference in New Issue
Block a user