Blame winpr/tools/makecert-cli/winpr-makecert.1.in

Packit 1fb8d4
.de URL
Packit 1fb8d4
\\$2 \(laURL: \\$1 \(ra\\$3
Packit 1fb8d4
..
Packit 1fb8d4
.if \n[.g] .mso www.tmac
Packit 1fb8d4
.TH winpr\-makecert 1 2017-01-11 "@FREERDP_VERSION_FULL@" "FreeRDP"
Packit 1fb8d4
.SH NAME
Packit 1fb8d4
winpr\-makecert \- A tool to create X.509 certificates.
Packit 1fb8d4
.SH SYNOPSIS
Packit 1fb8d4
.B winpr\-makecert
Packit 1fb8d4
[\fB-rdp\fP]
Packit 1fb8d4
[\fB-silent\fP]
Packit 1fb8d4
[\fB-live\fP]
Packit 1fb8d4
[\fB-format\fP { \fIcrt\fP | \fIpem\fP | \fIpfx\fP }]
Packit 1fb8d4
[\fB-p\fP password]
Packit 1fb8d4
[\fB-n\fP common_name]
Packit 1fb8d4
[\fB-y\fP years]
Packit 1fb8d4
[\fB-m\fP months]
Packit 1fb8d4
[\fB-len\fP length]
Packit 1fb8d4
[\fB-#\fP serial]
Packit 1fb8d4
[\fB-a\fP { \fImd5\fP | \fIsha1\fP | \fIsha256\fP | \fIs384\fP | \fIsha512\fP }]
Packit 1fb8d4
[\fB-path\fP outputpath] 
Packit 1fb8d4
[outputname]
Packit 1fb8d4
.SH DESCRIPTION
Packit 1fb8d4
.B winpr-makecert
Packit 1fb8d4
is a tool for generating X.509 certificates modeled after the Windows command
Packit 1fb8d4
MakeCert. winpr-makecert aims to be command line compatible with MakeCert
Packit 1fb8d4
however not all options are supported or implemented yet.
Packit 1fb8d4
Packit 1fb8d4
Unimplemented features are not described here. They are marked as "Unsupported"
Packit 1fb8d4
in winpr-makecerts help.
Packit 1fb8d4
Packit 1fb8d4
In contrast to it's Windows counterpart winpr\-makecert does, unless the
Packit 1fb8d4
\fB\-live\fP option is given, always creates and save a certificate.
Packit 1fb8d4
If \fIoutputname\fP isn't set it is tried to determine the host name of the
Packit 1fb8d4
computer the command is run on.
Packit 1fb8d4
.br
Packit 1fb8d4
\fBWarning:\fP if the file already exists it will be overwritten without asking.
Packit 1fb8d4
Packit 1fb8d4
Without further options the generated certificates have the following properties:
Packit 1fb8d4
Packit 1fb8d4
* 2048 bit long
Packit 1fb8d4
.br
Packit 1fb8d4
* sha256 as hash algorithm
Packit 1fb8d4
.br
Packit 1fb8d4
* the detected host name is used as common name
Packit 1fb8d4
.br
Packit 1fb8d4
* a time stamp is used as serial number
Packit 1fb8d4
.br
Packit 1fb8d4
* validity period of one year
Packit 1fb8d4
.br
Packit 1fb8d4
* saved in the current working directory in crt format
Packit 1fb8d4
.SH OPTIONS
Packit 1fb8d4
.IP "-rdp"
Packit 1fb8d4
Dummy parameter. Can be used to quickly generate a certificate with default
Packit 1fb8d4
properties without specifying any further parameters.
Packit 1fb8d4
.IP "-silent"
Packit 1fb8d4
Don't print the generated certificate to stdout.
Packit 1fb8d4
.IP "-f format"
Packit 1fb8d4
Three formats are supported: crt, pem and pfx.
Packit 1fb8d4
.br
Packit 1fb8d4
\fIcrt\fP outputs the key and the certificate in a separate file each with the file
Packit 1fb8d4
endings .key and .crt.
Packit 1fb8d4
.br
Packit 1fb8d4
\fIpem\fP outputs the key and certificate into a single file with the file ending pem.
Packit 1fb8d4
.br
Packit 1fb8d4
And \fIpfx\fP outputs key and certificate into a  pkcs12 file with the ending .pfx.
Packit 1fb8d4
.IP "-p password"
Packit 1fb8d4
Password to use if the pfx format is used as format.
Packit 1fb8d4
.IP "-live"
Packit 1fb8d4
Don't write the key/certificate to disk. When used from the command line this
Packit 1fb8d4
can be thought as "dummy" mode.
Packit 1fb8d4
.IP "-n common_name"
Packit 1fb8d4
The common name to use in the certificate.
Packit 1fb8d4
.IP "-m months"
Packit 1fb8d4
Validity period in months.
Packit 1fb8d4
.IP "-y years"
Packit 1fb8d4
Validity period in years. If months and years are specified the specified
Packit 1fb8d4
month parameter will take precedence.
Packit 1fb8d4
.IP "-len length"
Packit 1fb8d4
Key length in bits to use.
Packit 1fb8d4
.IP "-a { \fImd5\fP | \fIsha1\fP | \fIsha256\fP | \fIs384\fP | \fIsha512\fP }"
Packit 1fb8d4
The hashing algorithm to use.
Packit 1fb8d4
.IP "-# serial"
Packit 1fb8d4
The serial number to use for the certificate.
Packit 1fb8d4
.IP "-path"
Packit 1fb8d4
A directory where the certificate should be created in.
Packit 1fb8d4
.IP "outputname"
Packit 1fb8d4
The base name of the created file(s). A suffix, the format specific suffix is
Packit 1fb8d4
appended to this name.
Packit 1fb8d4
.SH EXAMPLES
Packit 1fb8d4
winpr-makecert -rdp
Packit 1fb8d4
Packit 1fb8d4
Creates a certificate with the default properties, saved to a file in the
Packit 1fb8d4
current working directory in crt format named like the host. If the host is
Packit 1fb8d4
named freerdp the created files are called freerdp.key and freerdp.crt. 
Packit 1fb8d4
Packit 1fb8d4
Packit 1fb8d4
winpr-makecert -len 4096 -a sha384 -path /tmp -# 22 -m 144 -y 1 -format crt mycert
Packit 1fb8d4
Packit 1fb8d4
The command above creates the file /tmp/mycert.pem containing a key and a
Packit 1fb8d4
certificate with a length of 4096. It will use sha384 as hash algorithm.
Packit 1fb8d4
The certificate has the serial number 22 and is valid for 12 years (144 months).
Packit 1fb8d4
.SH EXIT STATUS
Packit 1fb8d4
.TP
Packit 1fb8d4
.B 0
Packit 1fb8d4
Successful program execution.
Packit 1fb8d4
.TP
Packit 1fb8d4
.B 1
Packit 1fb8d4
Otherweise.
Packit 1fb8d4
Packit 1fb8d4
.SH SEE ALSO
Packit 1fb8d4
Packit 1fb8d4
.URL  "https://msdn.microsoft.com/library/windows/desktop/aa386968.aspx" "MakeCert help page" 
Packit 1fb8d4
Packit 1fb8d4
.SH AUTHOR
Packit 1fb8d4
FreeRDP <team@freerdp.com>