super.CheckMandatory();
if (auth_method.isPassword() || auth_method.isPublicKey()) {
// ok
}
else {
throw new JSExceptionMandatoryOptionMissing("ErrSSH010 invalid or no AuthenticationMethod specified");
}
if (auth_method.isPassword()) {
if (password.IsEmpty()) {
throw new JSExceptionMandatoryOptionMissing("ErrSSH020 AuthenticationMethod 'password' requires a Password, but no password was specified");
}
}
if (auth_method.isPublicKey()) {
if (auth_file.IsNotEmpty()) {
auth_file.CheckMandatory(true);
}
else {
throw new JSExceptionMandatoryOptionMissing("ErrSSH050 AuthenticationMethod 'publickey' requires a keyfile, but no keyfile was specified");
}
}
if (command.IsEmpty() && command_script.IsEmpty() && command_script_file.IsEmpty()) {
throw new JSExceptionMandatoryOptionMissing("ErrSSH060 no command, command_script or command_script_file has been specified");
}
} // private void CheckMandatory