From e8833424932099ec2a5fe40a6601581599842a97 Mon Sep 17 00:00:00 2001 From: Andrew McNab Date: Mon, 23 Jun 2008 15:16:14 +0000 Subject: [PATCH] _LARGEFILE64_SOURCE --- org.gridsite.core/src/Makefile | 2 +- org.gridsite.core/src/gsexec.c | 7 +++ org.gridsite.core/src/mod_gridsite.c | 8 +++- org.gridsite.core/src/mod_ssl-private.h | 75 +++++++++++++++++++++++++++++++-- 4 files changed, 87 insertions(+), 5 deletions(-) diff --git a/org.gridsite.core/src/Makefile b/org.gridsite.core/src/Makefile index 3b914dd..403e581 100644 --- a/org.gridsite.core/src/Makefile +++ b/org.gridsite.core/src/Makefile @@ -49,7 +49,7 @@ export libdir=lib endif ifndef MYCFLAGS -export MYCFLAGS=-I. -I../interface $(HTTPD_FLAGS) -I/usr/include/httpd -I/usr/include/apr-0 -I/opt/glite/include -fPIC +export MYCFLAGS=-I. -I../interface $(HTTPD_FLAGS) -I/usr/include/httpd -I/usr/include/apr-0 -I/usr/include/apr-1 -I/opt/glite/include -fPIC endif ifndef MYLDFLAGS diff --git a/org.gridsite.core/src/gsexec.c b/org.gridsite.core/src/gsexec.c index 4278c77..122dbba 100644 --- a/org.gridsite.core/src/gsexec.c +++ b/org.gridsite.core/src/gsexec.c @@ -29,6 +29,13 @@ * */ +#include +#if AP_MODULE_MAGIC_AT_LEAST(20051115,0) +#ifndef _LARGEFILE64_SOURCE +#define _LARGEFILE64_SOURCE +#endif +#endif + #include "apr.h" #include "apr_file_io.h" #include "ap_config.h" diff --git a/org.gridsite.core/src/mod_gridsite.c b/org.gridsite.core/src/mod_gridsite.c index e551943..12eb1ac 100644 --- a/org.gridsite.core/src/mod_gridsite.c +++ b/org.gridsite.core/src/mod_gridsite.c @@ -71,8 +71,14 @@ #include #include #include -#include +#if AP_MODULE_MAGIC_AT_LEAST(20051115,0) +#ifndef _LARGEFILE64_SOURCE +#define _LARGEFILE64_SOURCE +#endif +#endif + +#include #include #include #include diff --git a/org.gridsite.core/src/mod_ssl-private.h b/org.gridsite.core/src/mod_ssl-private.h index 7b0b784..4a7bd52 100644 --- a/org.gridsite.core/src/mod_ssl-private.h +++ b/org.gridsite.core/src/mod_ssl-private.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2003-4, Andrew McNab, University of Manchester + Copyright (c) 2003-8, Andrew McNab, University of Manchester All rights reserved. Redistribution and use in source and binary forms, with or @@ -67,6 +67,10 @@ #include +#ifndef BOOL +#define BOOL unsigned int +#endif + typedef enum { SSL_SHUTDOWN_TYPE_UNSET, SSL_SHUTDOWN_TYPE_STANDARD, @@ -74,6 +78,23 @@ typedef enum { SSL_SHUTDOWN_TYPE_ACCURATE } ssl_shutdown_type_e; +typedef enum { + SSL_ENABLED_UNSET = -1, + SSL_ENABLED_FALSE = 0, + SSL_ENABLED_TRUE = 1, + SSL_ENABLED_OPTIONAL = 3 +} ssl_enabled_t; + +#if AP_MODULE_MAGIC_AT_LEAST(20051115,0) +typedef enum { + SSL_CVERIFY_UNSET = -1, + SSL_CVERIFY_NONE = 0, + SSL_CVERIFY_OPTIONAL = 1, + SSL_CVERIFY_REQUIRE = 2, + SSL_CVERIFY_OPTIONAL_NO_CA = 3 +} ssl_verify_t; +#endif + typedef struct { SSL *ssl; const char *client_dn; @@ -87,20 +108,68 @@ typedef struct { int non_ssl_request; } SSLConnRec; +#if AP_MODULE_MAGIC_AT_LEAST(20051115,0) +typedef struct { + const char *ca_cert_path; + const char *ca_cert_file; + + const char *cipher_suite; + + int verify_depth; + ssl_verify_t verify_mode; +} modssl_auth_ctx_t; +#endif + typedef struct { void *sc; /* pointer back to server config */ SSL_CTX *ssl_ctx; +#if AP_MODULE_MAGIC_AT_LEAST(20051115,0) + void *pks; + void *pkp; + + int protocol; + + int pphrase_dialog_type; + const char *pphrase_dialog_path; + + const char *cert_chain; + + const char *crl_path; + const char *crl_file; + X509_STORE *crl; + + modssl_auth_ctx_t auth; +#endif } modssl_ctx_t; typedef struct { void *mc; - unsigned int enabled; - unsigned int proxy_enabled; + BOOL enabled; + BOOL proxy_enabled; const char *vhost_id; int vhost_id_len; int session_cache_timeout; +#if AP_MODULE_MAGIC_AT_LEAST(20051115,0) + BOOL cipher_server_pref; +#endif modssl_ctx_t *server; modssl_ctx_t *proxy; } SSLSrvConfigRec; +#if AP_MODULE_MAGIC_AT_LEAST(20051115,0) +typedef struct { + BOOL bSSLRequired; + apr_array_header_t *aRequirement; + int nOptions; + int nOptionsAdd; + int nOptionsDel; + const char *szCipherSuite; + ssl_verify_t nVerifyClient; + int nVerifyDepth; + const char *szCACertificatePath; + const char *szCACertificateFile; + const char *szUserName; +} SSLDirConfigRec; +#endif + extern module AP_MODULE_DECLARE_DATA ssl_module; -- 1.8.2.3