blob: 4c349827e7f3c0ddf82d641d83795173fd5c730e [file] [log] [blame]
# Copyright 2017 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
group("developer-keys") {
deps = [
":authorized_keys",
":host_key",
":id_key",
":ssh_config",
]
}
keys_dir = "${root_build_dir}/ssh-keys"
action("host_key") {
key_file = "${keys_dir}/ssh_host_ed25519_key"
script = "ssh-keygen-wrapper"
args = [
"ed25519",
rebase_path(key_file),
]
outputs = [
key_file,
key_file + ".pub"
]
}
action("id_key") {
key_file = "${keys_dir}/id_ed25519"
script = "ssh-keygen-wrapper"
args = [
"ed25519",
rebase_path(key_file),
]
outputs = [
key_file,
key_file + ".pub"
]
}
copy("authorized_keys") {
sources = [
"${keys_dir}/id_ed25519.pub",
]
outputs = [
"${keys_dir}/authorized_keys",
]
deps = [
":id_key",
]
}
action("ssh_config") {
config_file = "${keys_dir}/ssh_config"
script = "generate_ssh_config.sh"
args = [
rebase_path("${keys_dir}/id_ed25519"),
rebase_path(config_file),
]
outputs = [
config_file,
]
}