pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkgsrc and openssl on NetBSD current



On Mon August 3 2009 23:17:34 Geoff Wing wrote:
> On Tuesday 2009-08-04 06:43 +0200, Bernd Ernesti output:
> :On Tue, Aug 04, 2009 at 10:05:22AM +1000, Geoff Wing wrote:
> :[..]
> :
> :> e.g. for lang/php5 try this patch (www/ap-php needs something
> :> similar (need to change the path for the patch) since it
> :> extracts the whole php archive and does stuff with that as well).
> :
> :That patch works with the version of openssl in NetBSD 4 and 5 or
> :other supported pkgsrc OS too?
>
> Ah, well, I should have made that point clearer.  I don't know.
>
> Just checked.  It doesn't appear in any openssl 0.9.8* versions so
> has only appeared in the 1.0.* (beta) version.  Therefore it's going
> to need a version check for openssl in each patch (unless there's
> some other magic way of doing it with pkgsrc - conditional patches
> via Makefile?).

Perhaps the attached patch for php5 (following the security/p5-Net-SSLeay 
patches).

Sverre
--- ext/openssl/openssl.c.orig  2009-08-04 09:50:58.000000000 -0600
+++ ext/openssl/openssl.c       2009-08-04 09:54:29.000000000 -0600
@@ -227,8 +227,13 @@ inline static int php_openssl_safe_mode_
 static char default_ssl_conf_filename[MAXPATHLEN];
 
 struct php_x509_request { /* {{{ */
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+       LHASH_OF(CONF_VALUE) * global_config;   /* Global SSL config */
+       LHASH_OF(CONF_VALUE) * req_config;      /* SSL config for this request 
*/
+#else
        LHASH * global_config;  /* Global SSL config */
        LHASH * req_config;             /* SSL config for this request */
+#endif
        const EVP_MD * md_alg;
        const EVP_MD * digest;
        char    * section_name,
@@ -410,7 +415,11 @@ static inline int php_openssl_config_che
                const char * section_label,
                const char * config_filename,
                const char * section,
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+               LHASH_OF(CONF_VALUE) * config TSRMLS_DC
+#else
                LHASH * config TSRMLS_DC
+#endif
                ) /* {{{ */
 {
        X509V3_CTX ctx;


Home | Main Index | Thread Index | Old Index