1
0
mirror of https://github.com/golang/go synced 2024-11-14 06:50:21 -07:00
go/src/net
Damien Neil 770f1de8c5 net/http: remove test-only private key from production binaries
The net/http/internal package contains a PEM-encoded private key used in
tests. This key is initialized at init time, which prevents it from
being stripped by the linker in non-test binaries.

Move the certificate and key to a new net/http/internal/testcert
package to ensure it is only included in binaries that reference it.

Fixes #46677.

Change-Id: Ie98bda529169314cc791063e7ce4d99ef99113c8
Reviewed-on: https://go-review.googlesource.com/c/go/+/326771
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2021-06-10 20:20:58 +00:00
..
http net/http: remove test-only private key from production binaries 2021-06-10 20:20:58 +00:00
internal/socktest all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
mail net/mail: don't use MDT in test 2020-12-25 23:54:24 +00:00
rpc reflect: add Method.IsExported and StructField.IsExported methods 2021-02-25 21:21:51 +00:00
smtp
testdata net: reject leading zeros in IP address parsers 2021-06-08 20:23:22 +00:00
textproto all: update references to symbols moved from io/ioutil to io 2020-10-20 18:41:18 +00:00
url net/url: reject query values with semicolons 2021-06-09 15:44:42 +00:00
addrselect_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
addrselect.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
cgo_aix.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
cgo_android.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
cgo_bsd.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
cgo_linux.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
cgo_netbsd.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
cgo_openbsd.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
cgo_resnew.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
cgo_resold.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
cgo_socknew.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
cgo_sockold.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
cgo_solaris.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
cgo_stub.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
cgo_unix_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
cgo_unix.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
cgo_windows.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
conf_netcgo.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
conf_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
conf.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
conn_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
dial_test.go net, runtime: drop macOS 10.12 skip conditions in tests 2021-05-10 15:49:50 +00:00
dial_unix_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
dial.go docs: clarify when APIs use context.Background. 2021-03-11 16:37:38 +00:00
dnsclient_test.go net: remove dependency on math/rand 2020-10-12 16:30:11 +00:00
dnsclient_unix_test.go net: don't rely on system hosts in TestCVE202133195 2021-06-02 21:39:28 +00:00
dnsclient_unix.go net: make go resolver aware of network parameter 2021-03-23 11:14:58 +00:00
dnsclient.go all: add internal/itoa package 2021-03-14 17:56:50 +00:00
dnsconfig_unix_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
dnsconfig_unix.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
dnsname_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
error_plan9_test.go
error_plan9.go
error_posix_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
error_posix.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
error_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
error_unix_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
error_unix.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
error_windows_test.go
error_windows.go
example_test.go net: add Example for Unix dialer with context 2020-10-21 23:53:08 +00:00
external_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
fcntl_libc_test.go net: use syscall.fcntl on libc systems 2021-04-20 02:42:23 +00:00
fcntl_syscall_test.go net: use syscall.fcntl on libc systems 2021-04-20 02:42:23 +00:00
fd_plan9.go
fd_posix.go net: pass MSG_CMSG_CLOEXEC flag in ReadMsgUnix 2021-04-19 21:27:43 +00:00
fd_unix.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
fd_windows.go
file_plan9.go
file_stub.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
file_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
file_unix.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
file_windows.go
file.go
hook_plan9.go
hook_unix.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
hook_windows.go
hook.go
hosts_test.go net: reject leading zeros in IP address parsers 2021-06-08 20:23:22 +00:00
hosts.go
interface_aix.go
interface_bsd_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
interface_bsd.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
interface_bsdvar.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
interface_darwin.go
interface_freebsd.go net: don't check nil err twice in interfaceMessages on freebsd 2021-04-21 20:39:43 +00:00
interface_linux_test.go
interface_linux.go
interface_plan9.go all: add internal/itoa package 2021-03-14 17:56:50 +00:00
interface_solaris.go
interface_stub.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
interface_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
interface_unix_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
interface_windows.go
interface.go all: add internal/itoa package 2021-03-14 17:56:50 +00:00
ip_test.go net: reject leading zeros in IP address parsers 2021-06-08 20:23:22 +00:00
ip.go net: reject leading zeros in IP address parsers 2021-06-08 20:23:22 +00:00
iprawsock_plan9.go
iprawsock_posix.go net: pass MSG_CMSG_CLOEXEC flag in ReadMsgUnix 2021-04-19 21:27:43 +00:00
iprawsock_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
iprawsock.go
ipsock_plan9_test.go
ipsock_plan9.go net: fix (*ipStackCapabilities).probe godoc 2021-04-12 05:11:59 +00:00
ipsock_posix.go net: fix (*ipStackCapabilities).probe godoc 2021-04-12 05:11:59 +00:00
ipsock_test.go
ipsock.go net: never probe IPv4 map support on DragonFly BSD, OpenBSD 2021-04-12 21:26:59 +00:00
listen_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
lookup_fake.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
lookup_plan9.go all: add internal/itoa package 2021-03-14 17:56:50 +00:00
lookup_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
lookup_unix.go net: make go resolver aware of network parameter 2021-03-23 11:14:58 +00:00
lookup_windows_test.go
lookup_windows.go
lookup.go net: verify results from Lookup* are valid domain names 2021-05-27 19:55:46 +00:00
mac_test.go
mac.go
main_cloexec_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
main_conf_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
main_noconf_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
main_plan9_test.go
main_posix_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
main_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
main_unix_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
main_windows_test.go
mockserver_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
net_fake.go net: pass MSG_CMSG_CLOEXEC flag in ReadMsgUnix 2021-04-19 21:27:43 +00:00
net_test.go net: make ErrClosed and ParseError implement net.Error 2021-04-05 19:15:53 +00:00
net_windows_test.go net: disable Windows netsh tests when netsh won't run 2021-02-19 00:41:41 +00:00
net.go net: make ErrClosed and ParseError implement net.Error 2021-04-05 19:15:53 +00:00
netgo_unix_test.go net: make go resolver aware of network parameter 2021-03-23 11:14:58 +00:00
nss_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
nss.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
packetconn_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
parse_test.go
parse.go all: add internal/itoa package 2021-03-14 17:56:50 +00:00
pipe_test.go
pipe.go
platform_test.go all: enable more tests on macOS/ARM64 2020-10-06 21:56:24 +00:00
port_test.go
port_unix.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
port.go
protoconn_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
rawconn_stub_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
rawconn_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
rawconn_unix_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
rawconn_windows_test.go
rawconn.go
sendfile_linux.go
sendfile_stub.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
sendfile_test.go net: use io.Discard in TestSendfileOnWriteTimeoutExceeded 2021-03-09 10:37:50 +00:00
sendfile_unix_alt.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
sendfile_windows.go
server_test.go net, runtime: drop macOS 10.12 skip conditions in tests 2021-05-10 15:49:50 +00:00
sock_bsd.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
sock_cloexec.go internal/poll, net: fix comments regarding accept and sysSocket 2021-04-20 21:00:32 +00:00
sock_linux_test.go
sock_linux.go net, internal/poll: reset value before adding in minor kernel version 2020-11-20 04:21:00 +00:00
sock_plan9.go
sock_posix.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
sock_stub.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
sock_windows.go
sockaddr_posix.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
sockopt_aix.go
sockopt_bsd.go net: only perform IPv4 map check for AF_INET6 sockets 2021-03-25 19:55:42 +00:00
sockopt_linux.go
sockopt_plan9.go
sockopt_posix.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
sockopt_solaris.go
sockopt_stub.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
sockopt_windows.go
sockoptip_bsdvar.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
sockoptip_linux.go
sockoptip_posix.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
sockoptip_stub.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
sockoptip_windows.go
splice_linux.go
splice_stub.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
splice_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
sys_cloexec.go internal/poll, net: fix comments regarding accept and sysSocket 2021-04-20 21:00:32 +00:00
tcpsock_plan9.go
tcpsock_posix.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
tcpsock_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
tcpsock_unix_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
tcpsock.go all: add internal/itoa package 2021-03-14 17:56:50 +00:00
tcpsockopt_darwin.go
tcpsockopt_dragonfly.go
tcpsockopt_openbsd.go
tcpsockopt_plan9.go all: add internal/itoa package 2021-03-14 17:56:50 +00:00
tcpsockopt_posix.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
tcpsockopt_solaris.go
tcpsockopt_stub.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
tcpsockopt_unix.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
tcpsockopt_windows.go
timeout_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
udpsock_plan9_test.go
udpsock_plan9.go net: use mid-stack inlining with ReadFromUDP to avoid an allocation 2021-03-15 19:46:51 +00:00
udpsock_posix.go net: return nil UDPAddr from ReadFromUDP 2021-05-19 13:04:45 +00:00
udpsock_test.go net: return nil UDPAddr from ReadFromUDP 2021-05-19 13:04:45 +00:00
udpsock.go net: use mid-stack inlining with ReadFromUDP to avoid an allocation 2021-03-15 19:46:51 +00:00
unixsock_linux_test.go
unixsock_plan9.go
unixsock_posix.go net: pass MSG_CMSG_CLOEXEC in ReadMsgUnix on dragonfly, netbsd and openbsd 2021-04-20 21:00:46 +00:00
unixsock_readmsg_cloexec.go net: pass MSG_CMSG_CLOEXEC in ReadMsgUnix on dragonfly, netbsd and openbsd 2021-04-20 21:00:46 +00:00
unixsock_readmsg_cmsg_cloexec.go net: pass MSG_CMSG_CLOEXEC in ReadMsgUnix on dragonfly, netbsd and openbsd 2021-04-20 21:00:46 +00:00
unixsock_readmsg_other.go net: pass MSG_CMSG_CLOEXEC in ReadMsgUnix on dragonfly, netbsd and openbsd 2021-04-20 21:00:46 +00:00
unixsock_readmsg_test.go net: use syscall.fcntl on libc systems 2021-04-20 02:42:23 +00:00
unixsock_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
unixsock_windows_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
unixsock.go
write_unix_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
writev_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
writev_unix.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00