<commit_before>.\" Manpage for jsign.
.TH man 1 "1 Dec 2019" "@VERSION@" "jsign man page"

.SH NAME
jsign \- sign and timestamp executable files for Windows, Microsoft Installers (MSI) and scripts (PowerShell, VBScript, JScript, WSF)

.SH SYNOPSIS
.B jsign
[OPTIONS] FILE

.SH DESCRIPTION
Jsign is a Java implementation of Microsoft Authenticode that lets you sign
and timestamp executable files for Windows, Microsoft Installers (MSI) and
scripts. Jsign is platform independent and provides an alternative to native
tools like signcode/signtool on Windows or the Mono development tools on Unix
systems.

Jsign can use private keys and certificates in various formats, either Java keystores,
PKCS#12 keystores, PKCS#11 hardware tokens or SPC/PVK files.

.SH OPTIONS

.TP
.B -s, --keystore <FILE>
The keystore file containing the certificate and the private key used for signing
the file. jsign supports Java keystores and PKCS#12 keystores. This option must
be specified unless the keyfile and certfile options are already specified.

.TP
.B --storepass <PASSWORD>
The password to open the keystore

.TP
.B --storetype <TYPE>
The type of the keystore:
.br
- JKS    : Java keystore (.jks files)
.br
- PKCS12 : Standard PKCS#12 keystore (.p12 or .pfx files)
.br
- PKCS11 : PKCS#11 hardware token
.br
This options is not required if the keystore has a known extension (.jks, .p12 or .pfx).

.TP
.B -a, --alias <NAME>
The alias of the certificate used for signing in the keystore. This option
is mandatory in the keystore option is specified.

.TP
.B --keypass <PASSWORD>
The password of the private key. When using a keystore, this parameter can be
omitted if the keystore shares the same password.

.TP
.B --keyfile <FILE>
The file containing the private key. Only PVK files are supported. This option
is used in combination with the certfile option.

.TP
.B -c, --certfile <FILE>
The file containing the PKCS#7 certificate chain (.p7b or .spc files). This
option is used in combination with the keyfile option.

.TP
.B -t, --tsaurl <URL>
The URL of the timestamping authority, either RFC 3161 or Authenticode services.
You can use the COMODO or the Verisign services:
.br
- http://timestamp.comodoca.com/authenticode
.br
- http://timestamp.verisign.com/scripts/timstamp.dll

.TP
.B -m, --tsmode <MODE>
The timestamping mode (RFC3161 or Authenticode). The default mode is Authenticode.

.TP
.B -r, --tsretries <NUMBER>
The number of retries for timestamping (default to 3 attempts).

.TP
.B -w, --tsretrywait <SECONDS>
The number of seconds to wait between timestamping retries (10 seconds by default).

.TP
.B -n, --name <NAME>
The name of the application. This is an optional information embedded in the signature.

.TP
.B -u, --url <URL>
The URL of the application. This is an optional information embedded in the signature.

.TP
.B --proxyUrl <URL>
The URL of the HTTP proxy.

.TP
.B --proxyUser <NAME>
The user for the HTTP proxy. If an user is needed.

.TP
.B --proxyPass <PASSWORD>
The password for the HTTP proxy user. If an user is needed.

.TP
.B --replace
Tells if previous signatures should be replaced. By default the new signature is appended to the existing ones.

.TP
.B -e, --encoding <ENCODING>
The encoding of the script to be signed (UTF-8 by default, or the encoding specified by the byte order mark if there is one).

.TP
.B -h, --help
Print the help


.SH REPORTING BUGS
Bugs and suggestions can be reported to the project home page: https://ebourg.github.io/jsign

.SH AUTHOR
<NAME> (<EMAIL>)
<commit_msg>Added some examples to the man page<commit_after>.\" Manpage for jsign.
.TH man 1 "1 Dec 2019" "@VERSION@" "jsign man page"

.SH NAME
jsign \- sign and timestamp executable files for Windows, Microsoft Installers (MSI) and scripts (PowerShell, VBScript, JScript, WSF)

.SH SYNOPSIS
.B jsign
[OPTIONS] FILE

.SH DESCRIPTION
Jsign is a Java implementation of Microsoft Authenticode that lets you sign
and timestamp executable files for Windows, Microsoft Installers (MSI) and
scripts. Jsign is platform independent and provides an alternative to native
tools like signcode/signtool on Windows or the Mono development tools on Unix
systems.

Jsign can use private keys and certificates in various formats, either Java keystores,
PKCS#12 keystores, PKCS#11 hardware tokens or SPC/PVK files.

.SH OPTIONS

.TP
.B -s, --keystore <FILE>
The keystore file containing the certificate and the private key used for signing
the file. jsign supports Java keystores and PKCS#12 keystores. This option must
be specified unless the keyfile and certfile options are already specified.

.TP
.B --storepass <PASSWORD>
The password to open the keystore

.TP
.B --storetype <TYPE>
The type of the keystore:
.br
- JKS    : Java keystore (.jks files)
.br
- PKCS12 : Standard PKCS#12 keystore (.p12 or .pfx files)
.br
- PKCS11 : PKCS#11 hardware token
.br
This options is not required if the keystore has a known extension (.jks, .p12 or .pfx).

.TP
.B -a, --alias <NAME>
The alias of the certificate used for signing in the keystore. This option
is mandatory in the keystore option is specified.

.TP
.B --keypass <PASSWORD>
The password of the private key. When using a keystore, this parameter can be
omitted if the keystore shares the same password.

.TP
.B --keyfile <FILE>
The file containing the private key. Only PVK files are supported. This option
is used in combination with the certfile option.

.TP
.B -c, --certfile <FILE>
The file containing the PKCS#7 certificate chain (.p7b or .spc files). This
option is used in combination with the keyfile option.

.TP
.B -t, --tsaurl <URL>
The URL of the timestamping authority, either RFC 3161 or Authenticode services.
You can use the COMODO or the Verisign services:
.br
- http://timestamp.comodoca.com/authenticode
.br
- http://timestamp.verisign.com/scripts/timstamp.dll

.TP
.B -m, --tsmode <MODE>
The timestamping mode (RFC3161 or Authenticode). The default mode is Authenticode.

.TP
.B -r, --tsretries <NUMBER>
The number of retries for timestamping (default to 3 attempts).

.TP
.B -w, --tsretrywait <SECONDS>
The number of seconds to wait between timestamping retries (10 seconds by default).

.TP
.B -n, --name <NAME>
The name of the application. This is an optional information embedded in the signature.

.TP
.B -u, --url <URL>
The URL of the application. This is an optional information embedded in the signature.

.TP
.B --proxyUrl <URL>
The URL of the HTTP proxy.

.TP
.B --proxyUser <NAME>
The user for the HTTP proxy. If an user is needed.

.TP
.B --proxyPass <PASSWORD>
The password for the HTTP proxy user. If an user is needed.

.TP
.B --replace
Tells if previous signatures should be replaced. By default the new signature is appended to the existing ones.

.TP
.B -e, --encoding <ENCODING>
The encoding of the script to be signed (UTF-8 by default, or the encoding specified by the byte order mark if there is one).

.TP
.B -h, --help
Print the help


.SH EXAMPLES

.TP
Signing with a PKCS#12 keystore and timestamping:

jsign --keystore keystore.p12 --alias test --storepass password --tsaurl http://timestamp.comodoca.com/authenticode application.exe


.TP
Signing with a SPC certificate and a PVK key:

jsign --certfile certificate.spc --keyfile key.pvk --keypass password installer.msi


.SH REPORTING BUGS
Bugs and suggestions can be reported to the project home page: https://ebourg.github.io/jsign

.SH AUTHOR
<NAME> (<EMAIL>)

{'fraction_non_alphanumeric': 0.07855653986451276, 'fraction_numerical': 0.010422094841063054, 'mean_word_length': 3.151974040021633, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '968712', 'n_tokens_mistral': 2567, 'n_tokens_neox': 2398, 'n_words': 1132}