code: func VerifyPeerCertificate(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error {
  	for _, chaincert := range rawCerts {
  		cert, err := utils.DERToX509Certificate(chaincert)
  		if err != nil {
  			logger.Warn("Got error while verifying cert")
  		}
  		if cert != nil {
  			err = ValidateCertificateDates(cert)
  			if err != nil {
  				//cert is expired or not valid
  				logger.Warn(err.Error())
  				return err
  			}
  		}
  	}
  	for _, certs := range verifiedChains {
  		for _, cert := range certs {
  			err := ValidateCertificateDates(cert)
  			if err != nil {
  				//cert is expired or not valid
  				logger.Warn(err.Error())
  				return err
  			}
  		}
  	}
  	return nil
  }
docs: //VerifyPeerCertificate verifies raw certs and chain certs for expiry and not yet valid dates