message: Replace one of the compile-time GnuTLS version checks with a run-time check.
diff: @@ -542,15 +542,19 @@ void GnuTLS_socketbuf::start_session()
  session_started = status.good();
  if (status.good())
  {
  -#if GNUTLS_VERSION_NUMBER >= 0x020c00 // what is the right version here?
  - // This works for version 0x020c17 and above
  - const char *priorities =
  - "NONE:+VERS-TLS1.2:+CIPHER-ALL:+MAC-ALL:+SIGN-ALL:+COMP-ALL:"
  - "+KX-ALL:+CTYPE-OPENPGP:+CURVE-ALL";
  -#else
  - // This works for version 0x020805 and below
  - const char *priorities = "NORMAL:-CTYPE-X.509";
  -#endif
  + const char *priorities;
  + // what is the right version here?
  + if (gnutls_check_version("2.12.0") != NULL)
  + {
  + // This works for version 2.12.23 (0x020c17) and above
  + priorities = "NONE:+VERS-TLS1.2:+CIPHER-ALL:+MAC-ALL:+SIGN-ALL:"
  + "+COMP-ALL:+KX-ALL:+CTYPE-OPENPGP:+CURVE-ALL";
  + }
  + else
  + {
  + // This works for version 2.8.5 (0x020805) and below
  + priorities = "NORMAL:-CTYPE-X.509";
  + }
  const char *err_ptr;
  status.set_result(
  gnutls_priority_set_direct(session, priorities, &err_ptr));
  