msg_err ("cannot sign files without openssl support");
return EXIT_FAILURE;
#else
+# if (OPENSSL_VERSION_NUMBER < 0x10000000L)
+ msg_err ("must have openssl at least 1.0.0 to perform this action");
+ return EXIT_FAILURE;
+# else
gint i, tests_num, res = EXIT_SUCCESS, fd;
guint diglen;
gchar *cur_file, in_file[PATH_MAX],
BIO_free (fbio);
return res;
+# endif
#endif
}
g_set_error (err, RCL_ERROR, RSPAMD_CL_EINTERNAL, "cannot check signatures without openssl");
return FALSE;
#else
+# if (OPENSSL_VERSION_NUMBER < 0x10000000L)
+ g_set_error (err, RCL_ERROR, RSPAMD_CL_EINTERNAL, "cannot check signatures, openssl version is unsupported");
+ return EXIT_FAILURE;
+# else
BIO *mem;
mem = BIO_new_mem_buf ((void *)key, len);
return FALSE;
}
LL_PREPEND (parser->keys, nkey);
+# endif
#endif
return TRUE;
}
}
-#ifdef HAVE_OPENSSL
+#if (defined(HAVE_OPENSSL) && OPENSSL_VERSION_NUMBER >= 0x10000000L)
static inline gboolean
rspamd_cl_sig_check (const guchar *data, gsize datalen,
const guchar *sig, gsize siglen, struct rspamd_cl_parser *parser)
}
if (check_signature) {
-#ifdef HAVE_OPENSSL
+#if (defined(HAVE_OPENSSL) && OPENSSL_VERSION_NUMBER >= 0x10000000L)
/* We need to check signature first */
rspamd_snprintf (urlbuf, sizeof (urlbuf), "%*s.sig", len, data);
if (!rspamd_cl_fetch_file (urlbuf, &sigbuf, &siglen, err)) {
}
if (check_signature) {
-#ifdef HAVE_OPENSSL
+#if (defined(HAVE_OPENSSL) && OPENSSL_VERSION_NUMBER >= 0x10000000L)
/* We need to check signature first */
rspamd_snprintf (filebuf, sizeof (filebuf), "%s.sig", realbuf);
if (!rspamd_cl_fetch_file (filebuf, &sigbuf, &siglen, err)) {