code: func Decode(p12 []byte, password string) (tls.Certificate, error) {
  	// decode an x509.Certificate to verify
  	privateKey, cert, err := pkcs12.Decode(p12, password)
  	if err != nil {
  		return tls.Certificate{}, err
  	}
  	if err := verify(cert); err != nil {
  		return tls.Certificate{}, err
  	}
  
  	// wraps x509 certificate as a tls.Certificate:
  	return tls.Certificate{
  		Certificate: [][]byte{cert.Raw},
  		PrivateKey:  privateKey,
  		Leaf:        cert,
  	}, nil
  }
docs: // Decode and verify an in memory .p12 certificate (DER binary format).