.PP
.B rsa2asn1
[
+-a
+]
+[
.I file
]
.PP
and prints a full key.
.PP
.I Asn12rsa
-reads an RSA private key stored as ASN.1
+reads an RSA private or public key stored as ASN.1
encoded in the binary Distinguished Encoding Rules (DER)
and prints a Plan 9 RSA key,
inserting
is like
.I rsa2pub
but outputs the public key in ASN.1/DER format.
+With the
+.I -a
+flag a private key is read and encoded in ANS.1/DER format.
.PP
.I Rsa2ssh
reads a Plan 9 RSA public or private key and prints the public portion
auth/rsa2csr 'CN=example.com' key |
auth/pemencode 'CERTIFICATE REQUEST'
.EE
+.PP
+Generate a tinc host key:
+.IP
+.EX
+auth/rsagen -t 'service=tinc role=client host=myhost' > myhost.key
+auth/rsa2pub < myhost.key |
+ auth/rsa2asn1 | auth/pemencode 'RSA PUBLIC KEY' > hosts/myhost
+.EE
.SH SOURCE
.B /sys/src/cmd/auth
.SH "SEE ALSO