Skip to content

About

Simple tools that allow for displaying and conversion of X.509 certificate / private key files in Forklift via Quick Open

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Repository files navigation

forklift_x509_tools

Simple shell scripts that allow for displaying and conversion of X.509 certificate / private key files in Forklift via Quick Open.

List of scripts

  • ssl_display_cert.sh: display details of DER/PEM/CRT/CER/P12/PFX/P7B certificate files
  • ssl_display_pkey.sh: display details of RSA/EC DER/PEM/P12/PFX private key files
  • ssl_display_csr.sh: display details of CSR files
  • ssl_convert_cert.sh: convert between different certificate formats and also allow splitting a PEM file containing multiple certificates into separate PEM files
  • ssl_display_crl.sh: display details of CRL files

Requirements

The scripts require:

  • Binarynights Forklift 4.x file manager
  • openssl binary
  • GNU version of sed+awk which can be installed via brew:
brew install gnu-sed gawk

The scripts can also be used as standalone shell scripts without Forklift. It should work under any macOS/Linux/Unix.

Installation

Copy the scripts to the directory of choice, add executable rights:

chmod a+x ssl_display_cert.sh ssl_display_csr.sh ssl_display_pkey.sh ssl_convert_cert.sh ssl_display_crl.sh

Configuration

Change sed and awk binary paths in every script (in case they are different).

Set your own text editor in ssl_display_crl.sh.

Then create a new Forklift tool for every script via Commands -> Manage Tools.

forklift_x509_tools_config

For some scripts select Show output option (when something is being displayed), for others it is useful to have it disabled, but enable the option Run for every selected file (for example file conversion).

Type the default password in case of encrypted files as Forklift does not allow to get input from the user (however if you use it as standalone script you can type it as command line argument or the script will ask for the password in case it is missing).

That's it. Now if you press the keyboard shortcut for Quick Open (Esc by default), you'll have the option to handle your X.509 files directly from the Forklift interface.

List of the tools

List of some of the tools I defined for myself using the scripts:

  • Display PEM/DER/P12/PFX cert

/path_to_the_script/ssl_display_cert.sh "$SOURCE_SELECTION_PATHS" "your_default_password"

select Show output

  • Display PEM/DER CSR

/path_to_the_script/ssl_display_csr.sh "$SOURCE_SELECTION_PATHS"

select Show output

  • Display RSA private key

/path_to_the_script/ssl_display_pkey.sh RSA "$SOURCE_SELECTION_PATHS" "your_default_password"

select Show output

  • Display EC private key

/path_to_the_script/ssl_display_pkey.sh EC "$SOURCE_SELECTION_PATHS" "your_default_password"

select Show output

  • Convert PEM to DER

/path_to_the_script/ssl_convert_cert.sh pem2der "$SOURCE_SELECTION_PATHS"

select Run for every selected file

  • Convert DER to PEM

/path_to_the_script/ssl_convert_cert.sh der2pem "$SOURCE_SELECTION_PATHS"

select Run for every selected file

  • Convert P12 to PEM

/path_to_the_script/ssl_convert_cert.sh p12 "$SOURCE_SELECTION_PATHS" "your_default_password"

select Run for every selected file

  • Split PEM

/path_to_the_script/ssl_convert_cert.sh split-pem "$SOURCE_SELECTION_PATHS"

select Run for every selected file

  • Display CRL contents

/path_to_the_script/ssl_display_crl.sh "$SOURCE_SELECTION_PATHS"

select Show output

License

This project is licensed under the GPLv3 - see the LICENSE file for details

About

Simple tools that allow for displaying and conversion of X.509 certificate / private key files in Forklift via Quick Open

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Contributors

Languages