cryptutil: generate certificates from deriveca

This commit is contained in:
Caleb Doxsey 2023-02-17 18:54:45 -07:00
parent b13afc7b0c
commit 91fca06397
8 changed files with 28 additions and 62 deletions

View file

@ -46,7 +46,7 @@ func TestBuildSubjectNameIndication(t *testing.T) {
}
func TestValidateCertificate(t *testing.T) {
cert, err := cryptutil.GenerateSelfSignedCertificate("example.com", func(tpl *x509.Certificate) {
cert, err := cryptutil.GenerateCertificate(nil, "example.com", func(tpl *x509.Certificate) {
// set the must staple flag on the cert
tpl.ExtraExtensions = append(tpl.ExtraExtensions, pkix.Extension{
Id: oidMustStaple,