test_certificates

command
v0.0.0-...-d123447 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2025 License: MIT Imports: 6 Imported by: 0

README

A set of commands and configs to generate test certificates for the testing purposes.

  1. Generate CA key
openssl genrsa -out ca.key 4096
  1. Generate CA certificate
openssl req -new -x509 -days 365 -key ca.key -out ca.crt -subj "/C=US/ST=CA/L=San Francisco/O=Test/OU=Test/CN=ca"
  1. Generate private key:
openssl genrsa -out qseal.key 4096
  1. Generate QcStatements separately:
go run generate_qc_statements.go main.go
  1. Copy the output to the qseal.cnf file and replace the value for 1.3.6.1.5.5.7.1.3 policy.

  2. Generate CSR:

openssl req -new -key qseal.key -out qseal.csr -config qseal.cnf
  1. Generate self-signed certificate:
openssl x509 -req -days 365 -in qseal.csr -signkey qseal.key -out qseal.crt -extensions v3_ext -extfile qseal.cnf
  1. Sign the certificate with CA:
openssl x509 -req -days 365 -in qseal.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out qseal.pem -extensions v3_ext -extfile qseal.cnf

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL