Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 653830 - typo in libressl patch file for md_crypt in apache2
Summary: typo in libressl patch file for md_crypt in apache2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-22 21:13 UTC by wolfwood
Modified: 2018-04-23 04:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
fixed patch file (apache-2.4.33-libressl-compatibility.patch,3.93 KB, patch)
2018-04-22 21:21 UTC, wolfwood
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description wolfwood 2018-04-22 21:13:44 UTC
from /usr/portage/www-servers/apache/files/apache-2.4.33-libressl-compatibility.patch

--- a/modules/md/md_crypt.c
+++ b/modules/md/md_crypt.c
@@ -190,7 +190,7 @@ static int pem_passwd(char *buf, int size, int rwflag, void *baton)
  */
 static apr_time_t md_asn1_time_get(const ASN1_TIME* time)
 {
-#ifdef LIBRESSL_VERSION_NUMBER
+#ifdef LIBRESSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER)
     /* courtesy: https://stackoverflow.com/questions/10975542/asn1-time-to-time-t-conversion#11263731
      * all bugs are mine */
     apr_time_exp_t t;
@@ -471,7 +471,7 @@ apr_status_t md_pkey_gen(md_pkey_t **ppkey, apr_pool_t *p, md_pkey_spec_t *spec)
     }
 }
 
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000f)

that last paren is unmatched:

...skipping...
                                ^
md_crypt.c: At top level:
md_crypt.c:474:117: error: missing '(' in expression
 #if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000f)
                                                                                                                     ^
md_crypt.c: In function 'md_pkey_get_rsa_e64':
md_crypt.c:514:5: warning: implicit declaration of function 'RSA_get0_key' [-Wimplicit-function-declaration]
     RSA_get0_key(rsa, NULL, &e, NULL);
     ^~~~~~~~~~~~
Comment 1 wolfwood 2018-04-22 21:21:05 UTC
Created attachment 528234 [details, diff]
fixed patch file

/usr/portage/www-servers/apache/files/apache-2.4.33-libressl-compatibility.patch
Comment 2 wolfwood 2018-04-22 21:21:38 UTC
removing the stray paren from the patch file allows compilation to succeed
Comment 3 Larry the Git Cow gentoo-dev 2018-04-23 04:09:39 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0299098e25329e93dd847e3dbc1ad4a23a3f224

commit d0299098e25329e93dd847e3dbc1ad4a23a3f224
Author:     Aaron Bauman <bman@gentoo.org>
AuthorDate: 2018-04-23 04:09:19 +0000
Commit:     Aaron Bauman <bman@gentoo.org>
CommitDate: 2018-04-23 04:09:19 +0000

    www-servers/apache: add missing parenthese in LibreSSL patch
    
    Closes: https://bugs.gentoo.org/653830
    Package-Manager: Portage-2.3.31, Repoman-2.3.9

 www-servers/apache/files/apache-2.4.33-libressl-compatibility.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)