Generate a self-signed certificate (for testing/development)
Use OpenSSL to create a self-signed certificate:
Step 1: Install OpenSSL (if not already installed)
# On Ubuntu/WSL
sudo apt-get update
sudo apt-get install openssl
Step 2: Generate the certificate
# Create certs directory
mkdir -p certs
cd certs
# Generate a private key and certificate
openssl req -x509 -newkey rsa:2048 -keyout signature-key.pem -out signature-cert.pem -days 365 -nodes
# Convert to PKCS#12 format (.p12)
openssl pkcs12 -export -out signature-cert.p12 -inkey signature-key.pem -in signature-cert.pem -name "Invoice Signing Certificate"
When prompted:
- Enter a password for the .p12 file (To use in env variable)
- Fill in certificate details (or press Enter to skip)
This will generate the certs file for you.
Thank you.
Comments
Post a Comment