/// Initialize SSH key files for in-tree usage.
///
/// Requires the environment variable FUCHSIA_BUILD_DIR to be specified.
Initialize SSH key files for in-tree usage.
Requires the environment variable FUCHSIA_BUILD_DIR to be specified.
Initialize SSH key files for in - tree usage . Requires the environment variable FUCHSIA_BUILD_DIR to be specified .
pub fn from_tree_env(f: &impl FuchsiaPaths) -> Result<SSHKeys> {
        let ssh_file = File::open(f.find_fuchsia_root()?.join(".fx-ssh-path"))?;
        let ssh_file = BufReader::new(ssh_file);
        let mut lines = ssh_file.lines();
        let private_key = PathBuf::from(lines.next().unwrap()?);
        let auth_key = PathBuf::from(lines.next().unwrap()?);
        Ok(SSHKeys { auth_key: auth_key, private_key: private_key })
    }
pub fn from_tree_env ( f : & impl FuchsiaPaths ) -> Result < SSHKeys > { let ssh_file = File :: open ( f . find_fuchsia_root ( ) ? . join ( " " ) ) ? ; let ssh_file = BufReader :: new ( ssh_file ) ; let mut lines = ssh_file . lines ( ) ; let private_key = PathBuf :: from ( lines . next ( ) . unwrap ( ) ? ) ; let auth_key = PathBuf :: from ( lines . next ( ) . unwrap ( ) ? ) ; Ok ( SSHKeys { auth_key : auth_key , private_key : private_key } ) }
Initialize SSH key files for in-tree usage.
Initialize SSH key files for in - tree usage .
f
&impl FuchsiaPaths