ref: 613578b69f8bada4c6aa791e56768e59b017b20c
parent: bd50adc942797ef52ac80ab29b5edca8bddd554b
author: cinap_lenrek <[email protected]>
date: Mon May 16 18:55:30 EDT 2016
kernel: add srvtls and tlsclient to bootfs.proto for encrypting connection to the file server
--- a/sys/src/9/boot/bootfs.proto
+++ b/sys/src/9/boot/bootfs.proto
@@ -37,6 +37,7 @@
sleep
srv
test
+ tlsclient
unmount
nusb
usbd
@@ -52,6 +53,7 @@
bin
fstype
diskparts
+ srvtls
nusbrc 555 sys sys ../boot/nusbrc
bootrc 555 sys sys ../boot/bootrc
tmp
--- a/sys/src/9/boot/bootrc
+++ b/sys/src/9/boot/bootrc
@@ -70,7 +70,7 @@
if(~ $#nobootprompt 0){
echo
showlocaldevs
- ask bootargs ' is (tcp, il, local!device)' $"bootargs
+ ask bootargs ' is (tcp, tls, il, local!device)' $"bootargs
}
if not bootargs=$nobootprompt
nobootprompt=()
--- a/sys/src/9/boot/net.rc
+++ b/sys/src/9/boot/net.rc
@@ -48,6 +48,12 @@
fs=$fs(1)
}
+fn connecttls{
+ while(! ~ $#fs 0 && ! srvtls -q tcp!$fs(1)^!17020 boot)
+ fs=$fs(2-);
+ fs=$fs(1)
+}
+
fn connectil{
while(! ~ $#fs 0 && ! srv -q il!$fs(1)^!17008 boot)
fs=$fs(2-);
@@ -55,5 +61,7 @@
}
mtcp=(confignet connecttcp)
+mtls=(confignet connecttls)
mil=(confignet connectil)
-mt=(mtcp mil $mt)
+
+mt=(mtcp mtls mil $mt)
--- a/sys/src/9/sgi/bootfs.proto
+++ b/sys/src/9/sgi/bootfs.proto
@@ -27,6 +27,7 @@
sleep
srv
test
+ tlsclient
unmount
xd
rc
@@ -34,5 +35,6 @@
rcmain
net.rc 555 sys sys ../boot/net.rc
bin
+ srvtls
bootrc 555 sys sys ../boot/bootrc
tmp