]> git.ipfire.org Git - thirdparty/cups.git/blob - cups/http-private.h
1ea15f2ba4abb34ed96bf750286e4c1233e2c9b0
[thirdparty/cups.git] / cups / http-private.h
1 /*
2 * "$Id$"
3 *
4 * Private HTTP definitions for the Common UNIX Printing System (CUPS).
5 *
6 * Copyright 1997-2005 by Easy Software Products, all rights reserved.
7 *
8 * These coded instructions, statements, and computer programs are the
9 * property of Easy Software Products and are protected by Federal
10 * copyright law. Distribution and use rights are outlined in the file
11 * "LICENSE.txt" which should have been included with this file. If this
12 * file is missing or damaged please contact Easy Software Products
13 * at:
14 *
15 * Attn: CUPS Licensing Information
16 * Easy Software Products
17 * 44141 Airport View Drive, Suite 204
18 * Hollywood, Maryland 20636 USA
19 *
20 * Voice: (301) 373-9600
21 * EMail: cups-info@cups.org
22 * WWW: http://www.cups.org
23 *
24 * This file is subject to the Apple OS-Developed Software exception.
25 */
26
27 #ifndef _CUPS_HTTP_PRIVATE_H_
28 # define _CUPS_HTTP_PRIVATE_H_
29
30 /*
31 * Include necessary headers...
32 */
33
34 # include "config.h"
35
36 # ifdef __sun
37 /*
38 * Define FD_SETSIZE to CUPS_MAX_FDS on Solaris to get the correct version of
39 * select() for large numbers of file descriptors.
40 */
41
42 # define FD_SETSIZE CUPS_MAX_FDS
43 # include <sys/select.h>
44 # endif /* __sun */
45
46 # include "http.h"
47
48 # if defined HAVE_LIBSSL
49 /*
50 * The OpenSSL library provides its own SSL/TLS context structure for its
51 * IO and protocol management...
52 */
53
54 # include <openssl/err.h>
55 # include <openssl/rand.h>
56 # include <openssl/ssl.h>
57
58 typedef SSL http_tls_t;
59
60 # elif defined HAVE_GNUTLS
61 /*
62 * The GNU TLS library is more of a "bare metal" SSL/TLS library...
63 */
64 # include <gnutls/gnutls.h>
65
66 typedef struct
67 {
68 gnutls_session session; /* GNU TLS session object */
69 void *credentials; /* GNU TLS credentials object */
70 } http_tls_t;
71
72 # elif defined(HAVE_CDSASSL)
73 /*
74 * Darwin's Security framework provides its own SSL/TLS context structure
75 * for its IO and protocol management...
76 */
77
78 # include <Security/SecureTransport.h>
79
80 typedef SSLConnectionRef http_tls_t;
81
82 # endif /* HAVE_LIBSSL */
83
84 /*
85 * Some OS's don't have hstrerror(), most notably Solaris...
86 */
87
88 # ifndef HAVE_HSTRERROR
89 extern const char *_cups_hstrerror(int error);
90 # define hstrerror _cups_hstrerror
91 # elif defined(_AIX) || defined(__osf__)
92 /*
93 * AIX and Tru64 UNIX don't provide a prototype but do provide the function...
94 */
95 extern const char *hstrerror(int error);
96 # endif /* !HAVE_HSTRERROR */
97
98 #endif /* !_CUPS_HTTP_PRIVATE_H_ */
99
100 /*
101 * End of "$Id$".
102 */