In this example, we will create a private key and save it to the ./private_key.pem file.
In this example, we will create a csr and save it to the ./csr.pem file. Before creating the csr, we need to prepare the configuration file ./createCsrCfg.yml.
In this example, we will sign the root certificate and save it to the ./root_cert.pem file. Before signing the certificate, we need to prepare the configuration file ./signCertCfg.yml.
As we demonstrate how to sign the root certificate, for intermediate or end-entity certificate, it is the same process except the sign function name:
SignRootCertificate(yamlPath string, overwrite bool) ([]byte, error)
SignIntermediateCertificate(yamlPath string, overwrite bool) ([]byte, error)
SignServerCertificate(yamlPath string, overwrite bool) ([]byte, error)
SignClientCertificate(yamlPath string, overwrite bool) ([]byte, error)