]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/tls.c
Fix Linux builds without normal prerequisite libraries installed.
[thirdparty/cups.git] / cups / tls.c
index 1a0b00fa41468fccc7fa344b82296f4981fed22a..f0d799d1d3d98954eb171842e2a5cf1f6d12f17b 100644 (file)
 #    include "tls-gnutls.c"
 #  elif defined(HAVE_CDSASSL)
 #    include "tls-darwin.c"
-#  else
+#  else defined(HAVE_SSPI)
 #    include "tls-sspi.c"
 #  endif /* HAVE_GNUTLS */
+#else
+/* Stubs for when TLS is not supported/available */
+int
+httpCopyCredentials(http_t *http, cups_array_t **credentials)
+{
+  (void)http;
+  if (credentials)
+    *credentials = NULL;
+  return (-1);
+}
+int
+httpCredentialsAreValidForName(cups_array_t *credentials, const char *common_name)
+{
+  (void)credentials;
+  (void)common_name;
+  return (1);
+}
+time_t
+httpCredentialsGetExpiration(cups_array_t *credentials)
+{
+  (void)credentials;
+  return (INT_MAX);
+}
+http_trust_t
+httpCredentialsGetTrust(cups_array_t *credentials, const char *common_name)
+{
+  (void)credentials;
+  (void)common_name;
+  return (HTTP_TRUST_OK);
+}
+size_t
+httpCredentialsString(cups_array_t *credentials, char *buffer, size_t bufsize)
+{
+  (void)credentials;
+  (void)bufsize;
+  if (buffer)
+    *buffer = '\0';
+  return (0);
+}
+int
+httpLoadCredentials(const char *path, cups_array_t **credentials, const char *common_name)
+{
+  (void)path;
+  (void)credentials;
+  (void)common_name;
+  return (-1);
+}
+int
+httpSaveCredentials(const char *path, cups_array_t *credentials, const char *common_name)
+{
+  (void)path;
+  (void)credentials;
+  (void)common_name;
+  return (-1);
+}
 #endif /* HAVE_SSL */