code: plan9front

Download patch

ref: 78cf847bfbb3aa5f78713fb47200070c5605d5ef
parent: 58b61ff9b948076c0547c80002b5c9f1276f15c5
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Jul 4 18:38:22 EDT 2021

rsa(8): document auth/x5092pub, fix usage lines

--- a/sys/man/8/rsa
+++ b/sys/man/8/rsa
@@ -1,6 +1,6 @@
 .TH RSA 8
 .SH NAME
-rsagen, rsafill, asn12rsa, rsa2asn1, rsa2pub, rsa2ssh, rsa2x509, rsa2csr \- generate and format rsa keys
+rsagen, rsafill, asn12rsa, rsa2asn1, rsa2pub, rsa2ssh, rsa2x509, rsa2csr, x5092pub \- generate and format rsa keys
 .SH SYNOPSIS
 .B rsagen
 [
@@ -63,6 +63,13 @@
 [
 .I file
 ]
+.PP
+.B x5092pub
+[
+.B -r
+] [
+.I file
+]
 .SH DESCRIPTION
 Plan 9 represents an RSA key as an attribute-value pair list
 prefixed with the string
@@ -245,6 +252,18 @@
 takes the
 .I subject
 and a RSA private key and outputs a signing request in ASN.1 format.
+.PP
+The program
+.I x5092pub
+converts a binary certificate (or certificate request when
+.B -r
+flag is given)
+read from
+.I file
+or stdin,
+and outputs the public key with a
+.B subject
+attribute on standard output.
 .SH EXAMPLES
 Generate a fresh key and use it to start a TLS-enabled web server:
 .IP
--- a/sys/src/cmd/auth/rsa2csr.c
+++ b/sys/src/cmd/auth/rsa2csr.c
@@ -9,7 +9,7 @@
 void
 usage(void)
 {
-	fprint(2, "usage: aux/rsa2csr 'C=US ...CN=xxx' [key]\n");
+	fprint(2, "usage: auth/rsa2csr 'C=US ...CN=xxx' [key]\n");
 	exits("usage");
 }
 
--- a/sys/src/cmd/auth/x5092pub.c
+++ b/sys/src/cmd/auth/x5092pub.c
@@ -12,7 +12,7 @@
 void
 usage(void)
 {
-	fprint(2, "usage: aux/x5092pub [-r] [file]\n");
+	fprint(2, "usage: auth/x5092pub [-r] [file]\n");
 	exits("usage");
 }