]> git.ipfire.org Git - thirdparty/cups.git/blame - cups/tls.c
Move debug printfs to internal usage only.
[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 *
e3101897 10 * Licensed under Apache License v2.0. See the file "LICENSE" for more information.
25731360
MS
11 */
12
13/*
14 * Include necessary headers...
15 */
16
17#include "cups-private.h"
fb863569 18#include "debug-internal.h"
25731360
MS
19#include <fcntl.h>
20#include <math.h>
19dc16f7 21#ifdef _WIN32
25731360
MS
22# include <tchar.h>
23#else
24# include <signal.h>
25# include <sys/time.h>
26# include <sys/resource.h>
19dc16f7 27#endif /* _WIN32 */
25731360
MS
28#ifdef HAVE_POLL
29# include <poll.h>
30#endif /* HAVE_POLL */
31
32
33/*
a7aabde8 34 * Include platform-specific TLS code...
25731360
MS
35 */
36
37#ifdef HAVE_SSL
38# ifdef HAVE_GNUTLS
39# include "tls-gnutls.c"
40# elif defined(HAVE_CDSASSL)
41# include "tls-darwin.c"
015214aa 42# elif defined(HAVE_SSPISSL)
25731360
MS
43# include "tls-sspi.c"
44# endif /* HAVE_GNUTLS */
7d5824d6
MS
45#else
46/* Stubs for when TLS is not supported/available */
47int
48httpCopyCredentials(http_t *http, cups_array_t **credentials)
49{
50 (void)http;
51 if (credentials)
52 *credentials = NULL;
53 return (-1);
54}
55int
56httpCredentialsAreValidForName(cups_array_t *credentials, const char *common_name)
57{
58 (void)credentials;
59 (void)common_name;
60 return (1);
61}
62time_t
63httpCredentialsGetExpiration(cups_array_t *credentials)
64{
65 (void)credentials;
66 return (INT_MAX);
67}
68http_trust_t
69httpCredentialsGetTrust(cups_array_t *credentials, const char *common_name)
70{
71 (void)credentials;
72 (void)common_name;
73 return (HTTP_TRUST_OK);
74}
75size_t
76httpCredentialsString(cups_array_t *credentials, char *buffer, size_t bufsize)
77{
78 (void)credentials;
79 (void)bufsize;
80 if (buffer)
81 *buffer = '\0';
82 return (0);
83}
84int
85httpLoadCredentials(const char *path, cups_array_t **credentials, const char *common_name)
86{
87 (void)path;
88 (void)credentials;
89 (void)common_name;
90 return (-1);
91}
92int
93httpSaveCredentials(const char *path, cups_array_t *credentials, const char *common_name)
94{
95 (void)path;
96 (void)credentials;
97 (void)common_name;
98 return (-1);
99}
25731360 100#endif /* HAVE_SSL */