Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add openssl workflows #171

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Convert a DER formatted certificate file to PEM using openssl
command: "openssl x509 -inform der -outform pem -in {{infile}} -out {{outfile}}"
tags:
- openssl
description: Convert a DER formatted certificate file to PEM using openssl
arguments:
- name: infile
description: Path to a DER formatted certificate file.
default_value: ~
- name: outfile
description: Output path for the PEM formatted certificate
default_value: certificate.pem
source_url: https://www.openssl.org/docs/manpages.html
author: paulikt
author_url: ~
shells: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Convert a PEM certificate and private key to PFX/PKCS12 using openssl
command: "openssl pkcs12 -export -out {{outfile}} -inkey {{privatekey}} -in {{certificate}} -certfile {{ca_bundle}}\n\n\n"
tags:
- openssl
description: Convert a PEM certificate and private key to PFX/PKCS12 using openssl
arguments:
- name: outfile
description: Output path for the PFX/PKCS12 keystore file
default_value: keystore.pfx
- name: privatekey
description: Path to the file containing the private key
default_value: ~
- name: certificate
description: Path to the PEM file containing the certificate
default_value: ~
- name: ca_bundle
description: "Path to the PEM file containing the issuer certificate chain of the certificate. Optional, delete the '-certfile' param also if omitted."
default_value: ~
source_url: https://www.openssl.org/docs/manpages.html
author: paulikt
author_url: ~
shells: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Convert a PEM formatted certificate file to DER using openssl
command: "openssl x509 -inform pem -outform der -in {{infile}} -out {{outfile}}"
tags:
- openssl
description: Convert a PEM formatted certificate file to DER using openssl
arguments:
- name: infile
description: Path to a PEM formatted certificate file.
default_value: ~
- name: outfile
description: Output path for the DER formatted certificate
default_value: certificate.der
source_url: https://www.openssl.org/docs/manpages.html
author: paulikt
author_url: ~
shells: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Convert a PFX/PKCS12 file to PEM keystore using openssl
command: "openssl pkcs12 -in {{infile}} -out {{outfile}} -nodes"
tags:
- openssl
description: Convert a PFX/PKCS12 file to PEM keystore using openssl
arguments:
- name: infile
description: File path of the PFX/PKCS12 file
default_value: ~
- name: outfile
description: Output path for the converted PEM keystore
default_value: keystore.pem
source_url: https://www.openssl.org/docs/manpages.html
author: paulikt
author_url: ~
shells: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Display certificate infromation from a PKCS12/PFX file with openssl
command: "openssl pkcs12 -in {{pfx}} -clcerts -nokeys | openssl x509 -text -noout"
tags:
- openssl
description: Display certificate infromation from a PKCS12/PFX file with openssl
arguments:
- name: pfx
description: Path to the PFX file
default_value: ~
source_url: https://www.openssl.org/docs/manpages.html
author: paulikt
author_url: ~
shells: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Display certificate infromation from a certificate file with openssl
command: "openssl x509 -text -noout -inform {{inform}} -in {{certificate}}"
tags:
- openssl
description: Display certificate infromation from a certificate file with openssl
arguments:
- name: inform
description: "Encoding format of the certificate file. Either 'pem' or 'der'"
default_value: pem
- name: certificate
description: Path to the certificate file
default_value: ~
source_url: https://www.openssl.org/docs/manpages.html
author: paulikt
author_url: ~
shells: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Display certificate signing request (CSR/PKCS10) information with openssl
command: "openssl req -text -noout -in {{pkcs10}}"
tags:
- openssl
description: Display certificate signing request (CSR/PKCS10) information with openssl
arguments:
- name: pkcs10
description: Path to the PKCS10 file
default_value: ~
source_url: https://www.openssl.org/docs/manpages.html
author: paulikt
author_url: ~
shells: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Export certificate from a PKCS12/PFX file with openssl
command: "openssl pkcs12 -in {{pfx}} -clcerts -nokeys -out {{out_file}}"
tags:
- openssl
description: Export certificate from a PKCS12/PFX file with openssl
arguments:
- name: pfx
description: Path to the PFX file
default_value: ~
- name: out_file
description: Path to the output file
default_value: certificate.pem
source_url: https://www.openssl.org/docs/manpages.html
author: paulikt
author_url: ~
shells: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Generate EC (elliptic curve) keypair using openssl
command: "openssl ecparam -out {{keyfile}} -genkey -name {{curve}}\nopenssl req -new -key {{keyfile}} -sha256 -out {{csrfile}}"
tags:
- openssl
description: Generate EC (elliptic curve) keypair using openssl
arguments:
- name: keyfile
description: Output path for the private key file
default_value: private.key
- name: curve
description: Elliptic curve definition
default_value: prime256v1
- name: csrfile
description: Output path for the certificate request file
default_value: certificaterequest.csr
source_url: https://www.openssl.org/docs/manpages.html
author: paulikt
author_url: ~
shells: []
20 changes: 20 additions & 0 deletions specs/openssl/Generate RSA keypair using openssl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Generate RSA keypair using openssl
command: "openssl req -newkey rsa:{{keysize}} -out {{csrfile}} -keyout {{keyfile}}"
tags:
- openssl
description: Generate RSA keypair using openssl
arguments:
- name: keysize
description: "Keysize of the RSA keypair. Usual values: 2048, 3072, 4096"
default_value: "3072"
- name: csrfile
description: Output path for the certificate request file
default_value: certificaterequest.csr
- name: keyfile
description: Output path for the private key file
default_value: private.key
source_url: https://www.openssl.org/docs/manpages.html
author: paulikt
author_url: ~
shells: []