func (s *Signer) GetX509Cert() *x509.Certificate {
	return s.cert
}
GetX509Cert returns the X509 certificate for this signer
package x509
import (
	"crypto/x509"
	"fmt"
	"github.com/hyperledger/fabric-sdk-go/pkg/common/providers/core"
	"github.com/kfsoftware/hlf-operator/internal/github.com/hyperledger/fabric-ca/lib/attrmgr"
	"github.com/kfsoftware/hlf-operator/internal/github.com/hyperledger/fabric-ca/sdkinternal/pkg/util"
	"github.com/pkg/errors"
)
func NewSigner(key core.Key, cert []byte) (*Signer, error) {
	s := &Signer{
		key:       key,
		certBytes: cert,
	}
	var err error
	s.cert, err = util.GetX509CertificateFromPEM(s.certBytes)
	if err != nil {
		return nil, errors.WithMessage(err, "Failed to unmarshal X509 certificate bytes")
	}
	s.name = util.GetEnrollmentIDFromX509Certificate(s.cert)
	return s, nil
}
type Signer struct {
	key core.Key
	certBytes []byte
	cert *x509.Certificate
	name string
}
func (s *Signer) Key() core.Key {
	return s.key
}
func (s *Signer) Cert() []byte {
	return s.certBytes
}