9front - general discussion about 9front
 help / color / mirror / Atom feed
From: mischief@9.offblast.org
To: 9front@9front.org
Subject: boot root filesystem over tls
Date: Sat, 24 Jan 2015 19:17:14 -0500	[thread overview]
Message-ID: <42564d90e74d01f64a2518a3c6edf506@sigma.offblast.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 240 bytes --]

attached is a diff to boot the root filesystem over tls. a new bootargs argument is added, tcptls. if used, the fingerprint of the remote server is checked against fsthumb=, set in plan9.ini, in thumbprint(6) format.

any comments on this?

[-- Attachment #2: Type: text/plain, Size: 1257 bytes --]

diff -r 27d6b9ab8cce sys/src/9/boot/bootfs.proto
--- a/sys/src/9/boot/bootfs.proto	Fri Jan 23 14:01:56 2015 +0100
+++ b/sys/src/9/boot/bootfs.proto	Sat Jan 24 16:12:33 2015 -0800
@@ -35,6 +35,7 @@
 		sleep
 		srv
 		test
+		tlsclient
 		unmount
 		nusb
 			usbd
diff -r 27d6b9ab8cce sys/src/9/boot/bootrc
--- a/sys/src/9/boot/bootrc	Fri Jan 23 14:01:56 2015 +0100
+++ b/sys/src/9/boot/bootrc	Sat Jan 24 16:12:33 2015 -0800
@@ -66,7 +66,7 @@
 		if(~ $#nobootprompt 0){
 			echo
 			showlocaldevs
-			ask bootargs ' is (tcp, il, local!device)' $"bootargs
+			ask bootargs ' is (tcp, tcptls, il, local!device)' $"bootargs
 		}
 		if not bootargs=$nobootprompt
 		nobootprompt=()
diff -r 27d6b9ab8cce sys/src/9/boot/net.rc
--- a/sys/src/9/boot/net.rc	Fri Jan 23 14:01:56 2015 +0100
+++ b/sys/src/9/boot/net.rc	Sat Jan 24 16:12:33 2015 -0800
@@ -48,6 +48,12 @@
 	fs=$fs(1)
 }
 
+fn connecttcptls{
+	while(! ~ $#fs 0 && ! srv -qe 'tlsclient -t <{echo $fsthumb} tcp!'^$fs(1)^!5564 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)
+mtcptls=(confignet connecttcptls)
 mil=(confignet connectil)
-mt=(mtcp mil $mt)
+mt=(mtcp mtcptls mil $mt)
+

                 reply	other threads:[~2015-01-25  0:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42564d90e74d01f64a2518a3c6edf506@sigma.offblast.org \
    --to=mischief@9.offblast.org \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).