// SetHsmCertificate sets the HsmCertificate field's value.
545282
func (s *Certificates) SetHsmCertificate(v string) *Certificates {
	s.HsmCertificate = &v
	return s
}
236685
func (s *BaiduChannelResponse) SetHasCredential(v bool) *BaiduChannelResponse {
	s.HasCredential = &v
	return s
}
517
func (s *SslConfiguration) SetCertificate(v string) *SslConfiguration {
	s.Certificate = &v
	return s
}
1364566
func (c *Ctx) UseCertificate(cert *Certificate) error {
	runtime.LockOSThread()
	defer runtime.UnlockOSThread()
	c.cert = cert
	if int(C.SSL_CTX_use_certificate(c.ctx, cert.x)) != 1 {
		return errorFromErrorQueue()
	}
	return nil
}
79590
func (s *RestoreFromClusterSnapshotInput) SetHsmClientCertificateIdentifier(v string) *RestoreFromClusterSnapshotInput {
	s.HsmClientCertificateIdentifier = &v
	return s
}
1214808
func (s *DeleteHsmInput) SetHsmId(v string) *DeleteHsmInput {
	s.HsmId = &v
	return s
}
1117410
func (s *APNSSandboxChannelRequest) SetCertificate(v string) *APNSSandboxChannelRequest {
	s.Certificate = &v
	return s
}
544750
func (s *CreateClusterInput) SetHsmClientCertificateIdentifier(v string) *CreateClusterInput {
	s.HsmClientCertificateIdentifier = &v
	return s
}
779846
func (s *DescribeHsmConfigurationsInput) SetHsmConfigurationIdentifier(v string) *DescribeHsmConfigurationsInput {
	s.HsmConfigurationIdentifier = &v
	return s
}
157374
func (o *Me) CreateCertificate(child *Certificate) *bambou.Error {

	return bambou.CurrentSession().CreateChild(o, child)
}
447636
func makeCertificate(certPEMBlock, keyPEMBlock []byte) (Certificate, error) {
	var cert Certificate

	// Convert to a tls.Certificate
	tlsCert, err := tls.X509KeyPair(certPEMBlock, keyPEMBlock)
	if err != nil {
		return cert, err
	}
	if len(tlsCert.Certificate) == 0 {
		return cert, errors.New("certificate is empty")
	}
	cert.Certificate = tlsCert

	// Parse leaf certificate, extract relevant metadata, and staple OCSP
	leaf, err := x509.ParseCertificate(tlsCert.Certificate[0])
	if err != nil {
		return cert, err
	}
	err = fillCertFromLeaf(&cert, leaf)
	if err != nil {
		return cert, err
	}
	err = stapleOCSP(&cert, certPEMBlock)
	if err != nil {
		log.Printf("[WARNING] Stapling OCSP: %v", err)
	}

	return cert, nil
}
82078
func (sa *StorageAuthority) RevokeCertificate(ctx context.Context, req *sapb.RevokeCertificateRequest) error {
	return nil
}
92735
func NewHostCertificateCache(keygen sshca.Authority, authClient auth.ClientI) (*certificateCache, error) {
	cache, err := ttlmap.New(defaults.HostCertCacheSize)
	if err != nil {
		return nil, trace.Wrap(err)
	}

	return &certificateCache{
		keygen:     keygen,
		cache:      cache,
		authClient: authClient,
	}, nil
}
957806
func (s *GetSigningCertificateOutput) SetCertificate(v string) *GetSigningCertificateOutput {
	s.Certificate = &v
	return s
}
811647
func (sa *StorageAuthority) AddCertificate(_ context.Context, certDER []byte, regID int64, _ []byte, _ *time.Time) (digest string, err error) {
	return
}
505653
func (s *CreateHsmConfigurationInput) SetHsmPartitionName(v string) *CreateHsmConfigurationInput {
	s.HsmPartitionName = &v
	return s
}
987977
func cacheUnmanagedCertificatePEMBytes(certBytes, keyBytes []byte) error {
	cert, err := makeCertificate(certBytes, keyBytes)
	if err != nil {
		return err
	}
	cacheCertificate(cert)
	return nil
}