Malar-
Could you try applying the attached patch to mod_auth_cas.c ? Looks like
something where VC++ is holding stricter than GCC. I tested this using VC++
2010 Express with Apache 2.2 and OpenSSL 0.9.8r.
-Matt
Matthew J. Smith
University of Connecticut UITS
[email protected]
________________________________________
From: Malarvizhi Perumalraja [[email protected]]
Sent: Friday, April 22, 2011 10:53 AM
To: [email protected]
Subject: RE:[cas-user] mod_auth_cas Build error Help Please!
Hi Matt,
We are using Visual C++ 2008 Express, OpenSSL v0.9.8o and
Apache 2.2.17
Thanks,
Malar
-----Original Message-----
From: Smith, Matthew J. [mailto:[email protected]]
Sent: Thursday, April 21, 2011 8:06 PM
To: [email protected]
Subject: RE:[cas-user] mod_auth_cas Build error Help Please!
Malar,
A few questions-
What version of Visual Studio (We've only tested with Visual C++ 2008 Express) ?
What version of OpenSSL (We've only tested with v0.9.8g)?
The error "C:\OpenSSL\include\openssl/ossl_typ.h(178) : error C2059: syntax
error : 'type'" is most likely the root problem.
This seems related to this:
http://www.mail-archive.com/[email protected]/msg24079.html
Some workarounds are posted, but they seem ugly. So, before we consider the
workarounds, let's validate OpenSSL and Visual Studio versions.
-Matt
Matthew J. Smith
University of Connecticut UITS
[email protected]
________________________________________
From: Malarvizhi Perumalraja [[email protected]]
Sent: Thursday, April 21, 2011 6:12 PM
To: [email protected]
Subject: [cas-user] mod_auth_cas Build error Help Please!
Hi,
I tried to build mod_auth_cas-1.0.9.1 on windows 2008 64 bit
server using the README.Win32 file instructions. I got the following error:
------ Rebuild All started: Project: mod_auth_cas, Configuration: Release Win32
------
Deleting intermediate and output files for project 'mod_auth_cas',
configuration 'Release|Win32'
Compiling...
cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be
removed in a future release
mod_auth_cas.c
.\src\mod_auth_cas.c(40) : fatal error C1083: Cannot open include file:
'curl/curl.h': No such file or directory
Build log was saved at "file://c:\mod_auth_cas-1.0.9.1\Release\BuildLog.htm"
mod_auth_cas - 1 error(s), 1 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
Then I tried to build mod_auth_cas-1.0.8.1, as read in this forum that this
version is known to work with windows, but I got the following error
------ Rebuild All started: Project: mod_auth_cas, Configuration: Release Win32
------
Deleting intermediate and output files for project 'mod_auth_cas',
configuration 'Release|Win32'
Compiling...
cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be
removed in a future release
mod_auth_cas.c
C:\OpenSSL\include\openssl/ossl_typ.h(178) : error C2059: syntax error : 'type'
.\src\mod_auth_cas.c(294) : warning C4018: '<' : signed/unsigned mismatch
.\src\mod_auth_cas.c(426) : error C2275: 'cas_dir_cfg' : illegal use of this
type as an expression
c:\mod_auth_cas-1.0.8.1\src\mod_auth_cas.h(133) : see declaration of
'cas_dir_cfg'
.\src\mod_auth_cas.c(426) : error C2065: 'd' : undeclared identifier
.\src\mod_auth_cas.c(427) : error C2065: 'd' : undeclared identifier
.\src\mod_auth_cas.c(427) : error C2223: left of '->CASGateway' must point to
struct/union
.\src\mod_auth_cas.c(427) : error C2065: 'd' : undeclared identifier
.\src\mod_auth_cas.c(427) : error C2223: left of '->CASGateway' must point to
struct/union
.\src\mod_auth_cas.c(427) : error C2065: 'd' : undeclared identifier
.\src\mod_auth_cas.c(427) : error C2223: left of '->CASGateway' must point to
struct/union
.\src\mod_auth_cas.c(427) : error C2198: 'strlen' : too few arguments for call
.\src\mod_auth_cas.c(427) : warning C4047: 'function' : 'const char *' differs
in levels of indirection from 'size_t'
.\src\mod_auth_cas.c(427) : warning C4024: 'strncmp' : different types for
formal and actual parameter 2
.\src\mod_auth_cas.c(427) : error C2198: 'strncmp' : too few arguments for call
.\src\mod_auth_cas.c(1166) : warning C4267: 'function' : conversion from
'size_t' to 'int', possible loss of data
.\src\mod_auth_cas.c(1408) : error C2275: 'WSADATA' : illegal use of this type
as an expression
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winsock2.h(376) :
see declaration of 'WSADATA'
.\src\mod_auth_cas.c(1408) : error C2146: syntax error : missing ';' before
identifier 'wsaData'
.\src\mod_auth_cas.c(1408) : error C2065: 'wsaData' : undeclared identifier
.\src\mod_auth_cas.c(1409) : error C2065: 'wsaData' : undeclared identifier
.\src\mod_auth_cas.c(1409) : warning C4133: 'function' : incompatible types -
from 'int *__w64 ' to 'LPWSADATA'
.\src\mod_auth_cas.c(1484) : warning C4244: 'function' : conversion from
'socket_t' to 'int', possible loss of data
Build log was saved at "file://c:\mod_auth_cas-1.0.8.1\Release\BuildLog.htm"
mod_auth_cas - 15 error(s), 7 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
If anyone can direct me to the instructions for compiling mod_auth_cas on
windows 2008 64 bit, it will be of great help.
Thanks,
Malar
This email is intended for the designated recipient only, and may be
confidential, non-public, proprietary, protected by the attorney/client or
other privilege. Unauthorized reading, distribution, copying or other use of
this communication is prohibited and may be unlawful. Receipt by anyone other
than the intended recipients should not be deemed a waiver of any privilege or
protection. If you are not the intended recipient or if you believe that you
have received this email in error, please notify the sender immediately and
delete all copies from your computer system without reading, saving, or using
it in any manner. Although it has been checked for viruses and other malicious
software, malware, we do not warrant, represent or guarantee in any way that
this communication is free of malware or potentially damaging defects. All
liability for any actual or alleged loss, damage, or injury arising out of or
resulting in any way from the receipt, opening or use of this email is
expressly disclaimed.
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user
This email is intended for the designated recipient only, and may be
confidential, non-public, proprietary, protected by the attorney/client or
other privilege. Unauthorized reading, distribution, copying or other use of
this communication is prohibited and may be unlawful. Receipt by anyone other
than the intended recipients should not be deemed a waiver of any privilege or
protection. If you are not the intended recipient or if you believe that you
have received this email in error, please notify the sender immediately and
delete all copies from your computer system without reading, saving, or using
it in any manner. Although it has been checked for viruses and other malicious
software, malware, we do not warrant, represent or guarantee in any way that
this communication is free of malware or potentially damaging defects. All
liability for any actual or alleged loss, damage, or injury arising out of or
resulting in any way from the receipt, opening or use of this email is
expressly disclaimed.
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-userIndex: mod_auth_cas.c
===================================================================
--- mod_auth_cas.c (revision 23480)
+++ mod_auth_cas.c (working copy)
@@ -418,12 +418,13 @@
static char *getCASGateway(request_rec *r)
{
char *rv = "";
+ cas_dir_cfg *d = NULL;
cas_cfg *c = ap_get_module_config(r->server->module_config, &auth_cas_module);
if(c->CASDebug)
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "entering getCASGateway()");
- cas_dir_cfg *d = ap_get_module_config(r->per_dir_config, &auth_cas_module);
+ d = (cas_dir_cfg*)ap_get_module_config(r->per_dir_config, &auth_cas_module);
if(d->CASGateway != NULL && strncmp(d->CASGateway, r->parsed_uri.path, strlen(d->CASGateway)) == 0 && c->CASVersion > 1) { /* gateway not supported in CAS v1 */
rv = "&gateway=true";
}
@@ -1391,6 +1392,9 @@
/* also inspired by some code from Shawn Bayern */
static char *getResponseFromServer (request_rec *r, cas_cfg *c, char *ticket)
{
+#ifdef WIN32
+ WSADATA wsaData;
+#endif
char *validateRequest, validateResponse[CAS_MAX_RESPONSE_SIZE];
apr_finfo_t f;
int i, bytesIn;
@@ -1405,7 +1409,6 @@
if(c->CASDebug)
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "entering getResponseFromServer()");
#ifdef WIN32
- WSADATA wsaData;
if (WSAStartup(MAKEWORD(2,0), &wsaData) != 0){
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "MOD_AUTH_CAS: cannot initialize winsock2: (%d)", WSAGetLastError());
return NULL;