func (xcg *X509CertGenerator) ValidateCertificate(addr string, authOptions *auth.Options) (bool, error) {
	tlsConfig, err := xcg.ReadTLSConfig(addr, authOptions)
	if err != nil {
		return false, err
	}

	dialer := &net.Dialer{
		Timeout: time.Second * 20,
	}

	_, err = tls.DialWithDialer(dialer, "tcp", addr, tlsConfig)
	if err != nil {
		return false, err
	}

	return true, nil
}
func (xcg *X509CertGenerator) ValidateCertificate(addr string, authOptions *auth.Options) (bool, error) {
	tlsConfig, err := xcg.ReadTLSConfig(addr, authOptions)
	if err != nil {
		return false, err
	}

	dialer := &net.Dialer{
		Timeout: time.Second * 20,
	}

	_, err = tls.DialWithDialer(dialer, "tcp", addr, tlsConfig)
	if err != nil {
		return false, err
	}

	return true, nil
}
func ( xcg * X509CertGenerator ) ValidateCertificate ( addr string , authOptions * auth . Options ) ( bool , error ) { tlsConfig , err := xcg . ReadTLSConfig ( addr , authOptions ) if err != nil { return false , err } dialer := & net . Dialer { Timeout : time . Second * 20 , } _ , err = tls . DialWithDialer ( dialer , " " , addr , tlsConfig ) if err != nil { return false , err } return true , nil }
// ValidateCertificate validate the certificate installed on the vm.
ValidateCertificate validate the certificate installed on the vm .