You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
299 lines
7.4 KiB
299 lines
7.4 KiB
// Copyright (C) 2020 The Android Open Source Project
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
package {
|
|
default_applicable_licenses: ["external_openssh_license"],
|
|
}
|
|
|
|
// Added automatically by a large-scale-change that took the approach of
|
|
// 'apply every license found to every target'. While this makes sure we respect
|
|
// every license restriction, it may not be entirely correct.
|
|
//
|
|
// e.g. GPL in an MIT project might only apply to the contrib/ directory.
|
|
//
|
|
// Please consider splitting the single license below into multiple licenses,
|
|
// taking care not to lose any license_kind information, and overriding the
|
|
// default license using the 'licenses: [...]' property on targets as needed.
|
|
//
|
|
// For unused files, consider creating a 'fileGroup' with "//visibility:private"
|
|
// to attach the license to, and including a comment whether the files may be
|
|
// used in the current project.
|
|
//
|
|
// large-scale-change filtered out the below license kinds as false-positives:
|
|
// SPDX-license-identifier-GPL
|
|
// See: http://go/android-license-faq
|
|
license {
|
|
name: "external_openssh_license",
|
|
visibility: [":__subpackages__"],
|
|
license_kinds: [
|
|
"SPDX-license-identifier-BSD",
|
|
"SPDX-license-identifier-Beerware",
|
|
"SPDX-license-identifier-MIT",
|
|
"SPDX-license-identifier-OpenSSL",
|
|
"legacy_notice",
|
|
"legacy_unencumbered",
|
|
],
|
|
license_text: [
|
|
"LICENCE",
|
|
],
|
|
}
|
|
|
|
cc_defaults {
|
|
name: "ssh_defaults",
|
|
vendor: true,
|
|
cflags: [
|
|
"-Wno-incompatible-pointer-types",
|
|
"-Wno-pointer-sign",
|
|
"-Wno-unused-parameter",
|
|
],
|
|
include_dirs: [
|
|
"external/openssh/openbsd-compat",
|
|
"external/openssh/prebuilt-intermediates",
|
|
],
|
|
shared_libs: [
|
|
"libdl",
|
|
"libcrypto",
|
|
"libssl",
|
|
"libz",
|
|
],
|
|
}
|
|
|
|
cc_library {
|
|
name: "libssh",
|
|
defaults: ["ssh_defaults"],
|
|
cflags: ["-DENABLE_SK"],
|
|
srcs: [
|
|
"addrmatch.c",
|
|
"atomicio.c",
|
|
"authfd.c",
|
|
"authfile.c",
|
|
"bitmap.c",
|
|
"canohost.c",
|
|
"chacha.c",
|
|
"channels.c",
|
|
"cipher-aes.c",
|
|
"cipher-aesctr.c",
|
|
"cipher-chachapoly.c",
|
|
"cipher-ctr.c",
|
|
"cipher.c",
|
|
"cleanup.c",
|
|
"compat.c",
|
|
"dh.c",
|
|
"digest-openssl.c",
|
|
"dispatch.c",
|
|
"dns.c",
|
|
"ed25519.c",
|
|
"entropy.c",
|
|
"fatal.c",
|
|
"fe25519.c",
|
|
"ge25519.c",
|
|
"gss-genr.c",
|
|
"hash.c",
|
|
"hmac.c",
|
|
"hostfile.c",
|
|
"kex.c",
|
|
"kexc25519.c",
|
|
"kexdh.c",
|
|
"kexecdh.c",
|
|
"kexgen.c",
|
|
"kexgex.c",
|
|
"kexgexc.c",
|
|
"kexsntrup4591761x25519.c",
|
|
"krl.c",
|
|
"log.c",
|
|
"mac.c",
|
|
"match.c",
|
|
"misc.c",
|
|
"moduli.c",
|
|
"monitor_fdpass.c",
|
|
"msg.c",
|
|
"nchan.c",
|
|
"openbsd-compat/bcrypt_pbkdf.c",
|
|
"openbsd-compat/bindresvport.c",
|
|
"openbsd-compat/blowfish.c",
|
|
"openbsd-compat/bsd-closefrom.c",
|
|
"openbsd-compat/bsd-err.c",
|
|
"openbsd-compat/bsd-getpagesize.c",
|
|
"openbsd-compat/bsd-getpeereid.c",
|
|
"openbsd-compat/bsd-malloc.c",
|
|
"openbsd-compat/bsd-misc.c",
|
|
"openbsd-compat/bsd-openpty.c",
|
|
"openbsd-compat/bsd-signal.c",
|
|
"openbsd-compat/bsd-statvfs.c",
|
|
"openbsd-compat/explicit_bzero.c",
|
|
"openbsd-compat/fmt_scaled.c",
|
|
"openbsd-compat/freezero.c",
|
|
"openbsd-compat/getopt_long.c",
|
|
"openbsd-compat/glob.c",
|
|
"openbsd-compat/libressl-api-compat.c",
|
|
"openbsd-compat/openssl-compat.c",
|
|
"openbsd-compat/port-linux.c",
|
|
"openbsd-compat/port-net.c",
|
|
"openbsd-compat/pwcache.c",
|
|
"openbsd-compat/readpassphrase.c",
|
|
"openbsd-compat/reallocarray.c",
|
|
"openbsd-compat/recallocarray.c",
|
|
"openbsd-compat/rresvport.c",
|
|
"openbsd-compat/setproctitle.c",
|
|
"openbsd-compat/strcasestr.c",
|
|
"openbsd-compat/strmode.c",
|
|
"openbsd-compat/strtonum.c",
|
|
"openbsd-compat/timingsafe_bcmp.c",
|
|
"openbsd-compat/vis.c",
|
|
"packet.c",
|
|
"platform-misc.c",
|
|
"platform-pledge.c",
|
|
"poly1305.c",
|
|
"readpass.c",
|
|
"rijndael.c",
|
|
"sc25519.c",
|
|
"sntrup4591761.c",
|
|
"smult_curve25519_ref.c",
|
|
"ssh-dss.c",
|
|
"ssh-ecdsa.c",
|
|
"ssh-ecdsa-sk.c",
|
|
"ssh-ed25519.c",
|
|
"ssh-ed25519-sk.c",
|
|
"ssh-rsa.c",
|
|
"ssh-sk.c",
|
|
"sshbuf-io.c",
|
|
"sshbuf-getput-basic.c",
|
|
"sshbuf-getput-crypto.c",
|
|
"sshbuf-misc.c",
|
|
"sshbuf.c",
|
|
"ssherr.c",
|
|
"sshkey.c",
|
|
"ttymodes.c",
|
|
"uidswap.c",
|
|
"umac.c",
|
|
"umac128.c",
|
|
"utf8.c",
|
|
"verify.c",
|
|
"xmalloc.c",
|
|
],
|
|
}
|
|
|
|
cc_binary {
|
|
name: "ssh",
|
|
defaults: ["ssh_defaults"],
|
|
srcs: [
|
|
"clientloop.c",
|
|
"mux.c",
|
|
"readconf.c",
|
|
"ssh.c",
|
|
"sshconnect.c",
|
|
"sshconnect2.c",
|
|
"sshtty.c",
|
|
],
|
|
shared_libs: ["libssh"],
|
|
}
|
|
|
|
cc_binary {
|
|
name: "sftp",
|
|
defaults: ["ssh_defaults"],
|
|
srcs: [
|
|
"sftp.c",
|
|
"sftp-client.c",
|
|
"sftp-common.c",
|
|
"sftp-glob.c",
|
|
"progressmeter.c",
|
|
],
|
|
shared_libs: ["libssh"],
|
|
}
|
|
|
|
cc_binary {
|
|
name: "scp",
|
|
defaults: ["ssh_defaults"],
|
|
srcs: [
|
|
"scp.c",
|
|
"progressmeter.c",
|
|
],
|
|
shared_libs: ["libssh"],
|
|
}
|
|
|
|
cc_binary {
|
|
name: "sshd",
|
|
defaults: ["ssh_defaults"],
|
|
srcs: [
|
|
"audit-bsm.c",
|
|
"audit-linux.c",
|
|
"audit.c",
|
|
"auth-bsdauth.c",
|
|
"auth-krb5.c",
|
|
"auth-options.c",
|
|
"auth-pam.c",
|
|
"auth-rhosts.c",
|
|
"auth-shadow.c",
|
|
"auth-sia.c",
|
|
"auth.c",
|
|
"auth2-chall.c",
|
|
"auth2-gss.c",
|
|
"auth2-hostbased.c",
|
|
"auth2-kbdint.c",
|
|
"auth2-none.c",
|
|
"auth2-passwd.c",
|
|
"auth2-pubkey.c",
|
|
"auth2.c",
|
|
"groupaccess.c",
|
|
"gss-serv-krb5.c",
|
|
"gss-serv.c",
|
|
"kexgexs.c",
|
|
"loginrec.c",
|
|
"md5crypt.c",
|
|
"monitor.c",
|
|
"monitor_wrap.c",
|
|
"platform.c",
|
|
"platform-tracing.c",
|
|
"sandbox-null.c",
|
|
"sandbox-rlimit.c",
|
|
"sandbox-systrace.c",
|
|
"servconf.c",
|
|
"serverloop.c",
|
|
"session.c",
|
|
"sftp-common.c",
|
|
"sftp-realpath.c",
|
|
"sftp-server.c",
|
|
"sshd.c",
|
|
"sshlogin.c",
|
|
"sshpty.c",
|
|
],
|
|
shared_libs: [
|
|
"libcutils",
|
|
"libssh",
|
|
],
|
|
}
|
|
|
|
cc_binary {
|
|
name: "ssh-keygen",
|
|
defaults: ["ssh_defaults"],
|
|
srcs: [
|
|
"ssh-keygen.c",
|
|
"sshsig.c",
|
|
],
|
|
shared_libs: ["libssh"],
|
|
}
|
|
|
|
prebuilt_etc {
|
|
name: "sshd_config",
|
|
vendor: true,
|
|
src: "sshd_config.android",
|
|
relative_install_path: "ssh",
|
|
}
|
|
|
|
sh_binary {
|
|
name: "start-ssh",
|
|
vendor: true,
|
|
src: "start-ssh",
|
|
}
|