shithub: rc

ref: ba1c7bab3fb2eb6cffc8cc24ff4e46245e60dd04
dir: /bin/tlsupdate/

View raw version
#!/bin/rc
fn filter {
	awk '/sha256=.*/ { print "x509", $NF }'
}
fn update {
	echo |\
	tlsclient -t /sys/lib/tls/$1 $2 |[2]\
	filter >> /sys/lib/tls/$1
}
if(! ~ $#* 0 && test -f /sys/lib/tls/$1){
	filter >> /sys/lib/tls/$1
	exit
}
update mail tcp!imap.gmail.com!imaps
update smtp tcp!smtp.gmail.com!ssmtp
update mail tcp!imap.mail.yahoo.com!imaps
update smtp tcp!smtp.mail.yahoo.com!ssmtp