code: func NewBundlerFromPEM(caBundlePEM, intBundlePEM []byte, opt ...Option) (*Bundler, error) {
  	opts := defaultOptions
  	for _, o := range opt {
  		o(&opts)
  	}
  
  	log.Debug("parsing root certificates from PEM")
  	roots, err := helpers.ParseCertificatesPEM(caBundlePEM)
  	if err != nil {
  		log.Errorf("failed to parse root bundle: %v", err)
  		return nil, errors.New(errors.RootError, errors.ParseFailed)
  	}
  
  	log.Debug("parse intermediate certificates from PEM")
  	intermediates, err := helpers.ParseCertificatesPEM(intBundlePEM)
  	if err != nil {
  		log.Errorf("failed to parse intermediate bundle: %v", err)
  		return nil, errors.New(errors.IntermediatesError, errors.ParseFailed)
  	}
  
  	b := &Bundler{
  		KnownIssuers:     map[string]bool{},
  		IntermediatePool: x509.NewCertPool(),
  		opts:             opts,
  	}
  
  	log.Debug("building certificate pools")
  
  	// RootPool will be nil if caBundlePEM is nil, also
  	// that translates to caBundleFile is "".
  	// Systems root store will be used.
  	if caBundlePEM != nil {
  		b.RootPool = x509.NewCertPool()
  	}
  
  	for _, c := range roots {
  		b.RootPool.AddCert(c)
  		b.KnownIssuers[string(c.Signature)] = true
  	}
  
  	for _, c := range intermediates {
  		b.IntermediatePool.AddCert(c)
  		b.KnownIssuers[string(c.Signature)] = true
  	}
  
  	log.Debug("bundler set up")
  	return b, nil
  }
docs: // NewBundlerFromPEM creates a new Bundler from PEM-encoded root certificates and
  // intermediate certificates.
  // If caBundlePEM is nil, the resulting Bundler can only do "Force" bundle.