~moody/rc-gemd

ref: 155f3d40db228d89bd4a400f81920d7eeb241af7 rc-gemd/README -rw-r--r-- 1002 bytes
155f3d40Moody Make error codes more closely match spec 1 year, 1 month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
rc-gemd is a gemini server inspired by rc-httpd.

The scripts expect to be installed under /rc/bin/rc-gemd.

The following script will allow you to test them before installing:
ramfs
mkdir /tmp/rc-gemd
bind . /tmp/rc-gemd
bind -b /tmp /rc/bin

or one can change the rc_gemd_dir setting in the script.

The serve can be started with a combination of listen(8) and tlssrv(8),
however the requirments of tlssrv to have the tls key be in factotum can be
a bit tricky to deal when running as 'none'. To fix this there is an example
start script, tlsshim, which starts factotum and populates it with the private
key on each listen1 connection.

Using the tlsshim and assuming the tls files are /lib/ssl^(gem.key gem.cert):
aux/listen1 tcp!*!1965 /rc/bin/rc-gemd/tlsshim

The tls files can be generated by running the following commands:
mkdir -p /lib/ssl
auth/rsagen -t 'service=tls owner=*' >/lib/ssl/gem.key
auth/rsa2x509 'C=US CN=your.domain.here' gem.key |
	auth/pemencode CERTIFICATE >/lib/ssl/gem.cert