Re: svn commit: r830765 - /httpd/httpd/trunk/modules/ssl/ssl_toolkit_compat.h

View: New views
4 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: svn commit: r830765 - /httpd/httpd/trunk/modules/ssl/ssl_toolkit_compat.h

by Ruediger Pluem :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On 10/28/2009 10:17 PM, fuankg@... wrote:

> Author: fuankg
> Date: Wed Oct 28 21:17:50 2009
> New Revision: 830765
>
> URL: http://svn.apache.org/viewvc?rev=830765&view=rev
> Log:
> define HAVE_OCSP dependent on OpenSSL version to make things
> easier for non-configure platforms (NetWare, Win32).
>
> Modified:
>     httpd/httpd/trunk/modules/ssl/ssl_toolkit_compat.h
>
> Modified: httpd/httpd/trunk/modules/ssl/ssl_toolkit_compat.h
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_toolkit_compat.h?rev=830765&r1=830764&r2=830765&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/ssl/ssl_toolkit_compat.h (original)
> +++ httpd/httpd/trunk/modules/ssl/ssl_toolkit_compat.h Wed Oct 28 21:17:50 2009
> @@ -39,7 +39,8 @@
>  #include <openssl/rand.h>
>  #include <openssl/x509v3.h>
>  
> -#ifdef HAVE_OCSP
> +#if OPENSSL_VERSION_NUMBER >= 0x00907000
> +#define HAVE_OCSP
>  #include <openssl/x509_vfy.h>
>  #include <openssl/ocsp.h>
>  #endif
>
>

I now get the following warnings on Linux:

In file included from ssl_private.h:57,
                 from mod_ssl.c:27:
ssl_toolkit_compat.h:43:1: warning: "HAVE_OCSP" redefined
In file included from /usr/src/apache/httpd-trunk/include/ap_config.h:234,
                 from /usr/src/apache/httpd-trunk/include/httpd.h:43,
                 from ssl_private.h:30,
                 from mod_ssl.c:27:
/usr/src/apache/httpd-trunk/include/ap_config_auto.h:102:1: warning: this is the location of the previous definition

So if the above is only needed for Netware and Windows we should make this either conditional
on those two OS'es or we should add an

#ifndef HAVE_OCSP

#endif

block around this.

Regards

Rüdiger


Re: svn commit: r830765 - /httpd/httpd/trunk/modules/ssl/ssl_toolkit_compat.h

by Guenter Knauf-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Ruediger,
Ruediger Pluem schrieb:

> I now get the following warnings on Linux:
>
> In file included from ssl_private.h:57,
>                  from mod_ssl.c:27:
> ssl_toolkit_compat.h:43:1: warning: "HAVE_OCSP" redefined
> In file included from /usr/src/apache/httpd-trunk/include/ap_config.h:234,
>                  from /usr/src/apache/httpd-trunk/include/httpd.h:43,
>                  from ssl_private.h:30,
>                  from mod_ssl.c:27:
> /usr/src/apache/httpd-trunk/include/ap_config_auto.h:102:1: warning: this is the location of the previous definition
>
> So if the above is only needed for Netware and Windows we should make this either conditional
> on those two OS'es or we should add an
>
> #ifndef HAVE_OCSP
>
> #endif
>
> block around this.
we can just remove the define from the config.m4 - though I was unsure
if removing the lines:

AC_DEFUN([CHECK_OCSP], [
AC_CHECK_HEADERS(openssl/ocsp.h,·
  [AC_DEFINE([HAVE_OCSP], 1, [Define if OCSP is supported by OpenSSL])]
)
])

would be sufficient?

Gün.



Re: svn commit: r830765 - /httpd/httpd/trunk/modules/ssl/ssl_toolkit_compat.h

by Ruediger Pluem :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On 11/03/2009 12:28 AM, Guenter Knauf wrote:

> Hi Ruediger,
> Ruediger Pluem schrieb:
>> I now get the following warnings on Linux:
>>
>> In file included from ssl_private.h:57,
>>                  from mod_ssl.c:27:
>> ssl_toolkit_compat.h:43:1: warning: "HAVE_OCSP" redefined
>> In file included from /usr/src/apache/httpd-trunk/include/ap_config.h:234,
>>                  from /usr/src/apache/httpd-trunk/include/httpd.h:43,
>>                  from ssl_private.h:30,
>>                  from mod_ssl.c:27:
>> /usr/src/apache/httpd-trunk/include/ap_config_auto.h:102:1: warning: this is the location of the previous definition
>>
>> So if the above is only needed for Netware and Windows we should make this either conditional
>> on those two OS'es or we should add an
>>
>> #ifndef HAVE_OCSP
>>
>> #endif
>>
>> block around this.
> we can just remove the define from the config.m4 - though I was unsure
> if removing the lines:
>
> AC_DEFUN([CHECK_OCSP], [
> AC_CHECK_HEADERS(openssl/ocsp.h,·
>   [AC_DEFINE([HAVE_OCSP], 1, [Define if OCSP is supported by OpenSSL])]
> )
> ])
>
> would be sufficient?

Additionally we would need to remove at least the call of CHECK_OCSP. But
I am not sure if this is sufficient either.
Plus I don't know if we need the outcome of this test in other parts of
configure.


Regards

Rüdiger

Re: svn commit: r830765 - /httpd/httpd/trunk/modules/ssl/ssl_toolkit_compat.h

by William A. Rowe Jr. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Guenter Knauf wrote:
>
> AC_DEFUN([CHECK_OCSP], [
> AC_CHECK_HEADERS(openssl/ocsp.h,·
>   [AC_DEFINE([HAVE_OCSP], 1, [Define if OCSP is supported by OpenSSL])]
> )
> ])

This seems like a very wordy way of expressing

AC_CHECK_HEADERS(openssl/ocsp.h)