]> git.ipfire.org Git - thirdparty/cups.git/blame - cups/tls.c
Fix .PHONY declaration
[thirdparty/cups.git] / cups / tls.c
CommitLineData
25731360 1/*
25731360
MS
2 * TLS routines for CUPS.
3 *
4 * Copyright 2007-2014 by Apple Inc.
5 * Copyright 1997-2007 by Easy Software Products, all rights reserved.
6 *
7 * This file contains Kerberos support code, copyright 2006 by
8 * Jelmer Vernooij.
9 *
10 * These coded instructions, statements, and computer programs are the
11 * property of Apple Inc. and are protected by Federal copyright
12 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
13 * which should have been included with this file. If this file is
57b7b66b 14 * missing or damaged, see the license at "http://www.cups.org/".
25731360
MS
15 *
16 * This file is subject to the Apple OS-Developed Software exception.
17 */
18
19/*
20 * Include necessary headers...
21 */
22
23#include "cups-private.h"
24#include <fcntl.h>
25#include <math.h>
26#ifdef WIN32
27# include <tchar.h>
28#else
29# include <signal.h>
30# include <sys/time.h>
31# include <sys/resource.h>
32#endif /* WIN32 */
33#ifdef HAVE_POLL
34# include <poll.h>
35#endif /* HAVE_POLL */
36
37
38/*
39 * Local functions...
40 */
41
42#ifdef HAVE_SSL
43# ifdef HAVE_GNUTLS
44# include "tls-gnutls.c"
45# elif defined(HAVE_CDSASSL)
46# include "tls-darwin.c"
015214aa 47# elif defined(HAVE_SSPISSL)
25731360
MS
48# include "tls-sspi.c"
49# endif /* HAVE_GNUTLS */
7d5824d6
MS
50#else
51/* Stubs for when TLS is not supported/available */
52int
53httpCopyCredentials(http_t *http, cups_array_t **credentials)
54{
55 (void)http;
56 if (credentials)
57 *credentials = NULL;
58 return (-1);
59}
60int
61httpCredentialsAreValidForName(cups_array_t *credentials, const char *common_name)
62{
63 (void)credentials;
64 (void)common_name;
65 return (1);
66}
67time_t
68httpCredentialsGetExpiration(cups_array_t *credentials)
69{
70 (void)credentials;
71 return (INT_MAX);
72}
73http_trust_t
74httpCredentialsGetTrust(cups_array_t *credentials, const char *common_name)
75{
76 (void)credentials;
77 (void)common_name;
78 return (HTTP_TRUST_OK);
79}
80size_t
81httpCredentialsString(cups_array_t *credentials, char *buffer, size_t bufsize)
82{
83 (void)credentials;
84 (void)bufsize;
85 if (buffer)
86 *buffer = '\0';
87 return (0);
88}
89int
90httpLoadCredentials(const char *path, cups_array_t **credentials, const char *common_name)
91{
92 (void)path;
93 (void)credentials;
94 (void)common_name;
95 return (-1);
96}
97int
98httpSaveCredentials(const char *path, cups_array_t *credentials, const char *common_name)
99{
100 (void)path;
101 (void)credentials;
102 (void)common_name;
103 return (-1);
104}
25731360 105#endif /* HAVE_SSL */