code: func TryLoadCertFromDisk(pkiPath, name string) (*x509.Certificate, error) {
  	certificatePath := pathForCert(pkiPath, name)
  
  	certs, err := certutil.CertsFromFile(certificatePath)
  	if err != nil {
  		return nil, errors.Wrapf(err, "couldn't load the certificate file %s", certificatePath)
  	}
  
  	// We are only putting one certificate in the certificate pem file, so it's safe to just pick the first one
  	// TODO: Support multiple certs here in order to be able to rotate certs
  	cert := certs[0]
  
  	// Check so that the certificate is valid now
  	now := time.Now()
  	if now.Before(cert.NotBefore) {
  		return nil, errors.New("the certificate is not valid yet")
  	}
  	if now.After(cert.NotAfter) {
  		return nil, errors.New("the certificate has expired")
  	}
  
  	return cert, nil
  }
docs: // TryLoadCertFromDisk tries to load the cert from the disk and validates that it is valid