code: func verify(cert *x509.Certificate) error {
  	_, err := cert.Verify(x509.VerifyOptions{})
  	if err == nil {
  		return nil
  	}
  
  	switch e := err.(type) {
  	case x509.CertificateInvalidError:
  		switch e.Reason {
  		case x509.Expired:
  			return ErrExpired
  		case x509.IncompatibleUsage:
  			// Apple cert fail on go 1.10
  			return nil
  		default:
  			return err
  		}
  	case x509.UnknownAuthorityError:
  		// Apple cert isn't in the cert pool
  		// ignoring this error
  		return nil
  	default:
  		return err
  	}
  }
docs: // verify checks if a certificate has expired