github.com/blend/go-sdk@v1.20220411.3/certutil/create_self_cert.go.go (about)

     1  /*
     2  
     3  Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved
     4  Use of this source code is governed by a MIT license that can be found in the LICENSE file.
     5  
     6  */
     7  
     8  package certutil
     9  
    10  // CreateSelfServerCert creates a self signed server certificate bundle.
    11  func CreateSelfServerCert(commonName string, options ...CertOption) (*CertBundle, error) {
    12  	ca, err := CreateCertificateAuthority()
    13  	if err != nil {
    14  		return nil, err
    15  	}
    16  	return CreateServer(commonName, ca, options...)
    17  }