1 /* 2 * "$Id: http-private.h 148 2006-04-25 16:54:17Z njacobs $" 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 #pragma ident "%Z%%M% %I% %E% SMI" 31 32 /* 33 * Include necessary headers... 34 */ 35 #ifdef __cplusplus 36 extern "C" { 37 #endif 38 39 40 # include "config.h" 41 42 43 # ifdef __sun 44 /* 45 * Define FD_SETSIZE to CUPS_MAX_FDS on Solaris to get the correct version of 46 * select() for large numbers of file descriptors. 47 */ 48 49 #define CUPS_MAX_FDS 1024 50 51 # define FD_SETSIZE CUPS_MAX_FDS 52 # include <sys/select.h> 53 # endif /* __sun */ 54 55 # include "http.h" 56 57 # if defined HAVE_LIBSSL 58 /* 59 * The OpenSSL library provides its own SSL/TLS context structure for its 60 * IO and protocol management... 61 */ 62 63 # include <openssl/err.h> 64 # include <openssl/rand.h> 65 # include <openssl/ssl.h> 66 67 typedef SSL http_tls_t; 68 69 # elif defined HAVE_GNUTLS 70 /* 71 * The GNU TLS library is more of a "bare metal" SSL/TLS library... 72 */ 73 # include <gnutls/gnutls.h> 74 75 typedef struct 76 { 77 gnutls_session session; /* GNU TLS session object */ 78 void *credentials; /* GNU TLS credentials object */ 79 } http_tls_t; 80 81 # elif defined(HAVE_CDSASSL) 82 /* 83 * Darwin's Security framework provides its own SSL/TLS context structure 84 * for its IO and protocol management... 85 */ 86 87 # include <Security/SecureTransport.h> 88 89 typedef SSLConnectionRef http_tls_t; 90 91 # endif /* HAVE_LIBSSL */ 92 93 /* 94 * Some OS's don't have hstrerror(), most notably Solaris... 95 */ 96 97 # ifndef HAVE_HSTRERROR 98 extern const char *cups_hstrerror(int error); 99 # define hstrerror cups_hstrerror 100 # elif defined(_AIX) || defined(__osf__) 101 /* 102 * AIX and Tru64 UNIX don't provide a prototype but do provide the function... 103 */ 104 extern const char *hstrerror(int error); 105 # endif /* !HAVE_HSTRERROR */ 106 107 #ifdef __cplusplus 108 } 109 #endif 110 111 #endif /* !_CUPS_HTTP_PRIVATE_H_ */ 112 113 /* 114 * End of "$Id: http-private.h 148 2006-04-25 16:54:17Z njacobs $" 115 */ 116