Re: [Chicken-users] openssl egg segfauls: ##sys#expand-home-path
I see, that sounds sensible. Could you apply the no-home-path-expansion patch and fix it upstream, so that openssl will work on 4.9.01? K. On Tue, May 19, 2015 at 3:23 PM, Thomas Chust ch...@web.de wrote: On 2015-05-19 13:35, Kristian Lein-Mathisen wrote: [...] It's been way too long! I'm running CHICKEN 4.9.0.1 and the openssl-egg segfaults at ssl-load-certificate-chain! and friends. I have two patches/suggestions: - remove home path expansion - use the pathname-expand egg [...] Hello, the only reason this functionality was included in the first place, was that CHICKEN's standard I/O procedures used to perform automatic home directory expansion, so I wanted the OpenSSL egg to behave similarly. If I'm not mistaken, the standard I/O procedures no longer do home directory expansion by default. I think it would make sense to also remove this functionality from the OpenSSL egg. If needed, one could always make use of the pathname-expand egg explicitly, which would make the intent clearer. Ciao, Thomas -- When C++ is your hammer, every problem looks like your thumb. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] openssl egg segfauls: ##sys#expand-home-path
Obs! I'm on Version 4.9.1 (rev 30bb2f2), sorry for the confusion Thomas! Thanks for getting it in there. I wonder what might break with this upcoming change. K. On Thu, May 21, 2015 at 6:01 PM, Thomas Chust ch...@web.de wrote: On 2015-05-21 09:18, Kristian Lein-Mathisen wrote: I see, that sounds sensible. Could you apply the no-home-path-expansion patch and fix it upstream, so that openssl will work on 4.9.01? [...] Hello, I just checked and apparently the home path expansion stuff is still in place in released versions of chicken: My installation of CHICKEN reports Version 4.9.0.1 (stability/4.9.0) (rev 8b3189b) and it has ##sys#expand-home-path and does automatic home path expansion for standard I/O procedures such as open-input-file :-/ There is commit 4f91e654f04254ba1039e327460e643fefbf5e36 in CHICKEN's Git repository that gets rid of this cruft, but it's not included in any released source tarball, as far as I can tell. I have removed the uses of ##sys#expand-home-path from the trunk version of the OpenSSL egg, but I think it doesn't make sense to tag a release at the moment. Ciao, Thomas -- When C++ is your hammer, every problem looks like your thumb. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] openssl egg segfauls: ##sys#expand-home-path
On 2015-05-21 09:18, Kristian Lein-Mathisen wrote: I see, that sounds sensible. Could you apply the no-home-path-expansion patch and fix it upstream, so that openssl will work on 4.9.01? [...] Hello, I just checked and apparently the home path expansion stuff is still in place in released versions of chicken: My installation of CHICKEN reports Version 4.9.0.1 (stability/4.9.0) (rev 8b3189b) and it has ##sys#expand-home-path and does automatic home path expansion for standard I/O procedures such as open-input-file :-/ There is commit 4f91e654f04254ba1039e327460e643fefbf5e36 in CHICKEN's Git repository that gets rid of this cruft, but it's not included in any released source tarball, as far as I can tell. I have removed the uses of ##sys#expand-home-path from the trunk version of the OpenSSL egg, but I think it doesn't make sense to tag a release at the moment. Ciao, Thomas -- When C++ is your hammer, every problem looks like your thumb. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] openssl egg segfauls: ##sys#expand-home-path
Hi guys, It's been way too long! I'm running CHICKEN 4.9.0.1 and the openssl-egg segfaults at ssl-load-certificate-chain! and friends. I have two patches/suggestions: - remove home path expansion - use the pathname-expand egg I need either of these patches to make openssl not segfault on my system. Any chance of fixing this upstream? Thanks! K. From 8aeb5252f681d472816dc84e6f00f284ce8aa3c9 Mon Sep 17 00:00:00 2001 From: Kristian Lein-Mathisen kristianl...@gmail.com Date: Tue, 19 May 2015 13:22:22 +0200 Subject: [PATCH] bugfix: no home-path expansion because `##sys#expand-home-path` was removed in something like 4.9.0.1. this variable is unbound and causes a segfault (OBS! no error saying that ##sys#expand-home-path is not available) --- openssl.scm | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/openssl.scm b/openssl.scm index db693fe..9e2d57a 100644 --- a/openssl.scm +++ b/openssl.scm @@ -42,8 +42,7 @@ ##sys#current-thread ##sys#size ##sys#setslot - ##sys#check-string - ##sys#expand-home-path)) + ##sys#check-string)) (use srfi-18 tcp) @@ -583,7 +582,7 @@ EOF (unless (eq? ((foreign-lambda int SSL_CTX_use_certificate_chain_file c-pointer c-string) - (ssl-unwrap-context obj) (##sys#expand-home-path pathname)) + (ssl-unwrap-context obj) pathname) 1) (ssl-abort 'ssl-load-certificate-chain! #f pathname))) @@ -602,7 +601,7 @@ EOF return(SSL_CTX_use_PrivateKey_file( (SSL_CTX *)ctx, path, (asn1 ? SSL_FILETYPE_ASN1 : SSL_FILETYPE_PEM)));\n) - (ssl-unwrap-context obj) (##sys#expand-home-path pathname) + (ssl-unwrap-context obj) pathname rsa? asn1?) 1) (ssl-abort 'ssl-load-private-key! #f pathname rsa? asn1?))) @@ -626,8 +625,8 @@ EOF ((foreign-lambda int SSL_CTX_load_verify_locations c-pointer c-string c-string) (ssl-unwrap-context obj) - (if pathname (##sys#expand-home-path pathname) #f) - (if dirname (##sys#expand-home-path dirname) #f)) + (if pathname pathname #f) + (if dirname dirname #f)) 1) (ssl-abort 'ssl-load-verify-root-certificates! #f pathname dirname))) @@ -636,8 +635,7 @@ EOF (##sys#check-string pathname) (ssl-clear-error) (cond - (((foreign-lambda c-pointer SSL_load_client_CA_file c-string) - (##sys#expand-home-path pathname)) + (((foreign-lambda c-pointer SSL_load_client_CA_file c-string) pathname) = (cut (foreign-lambda void SSL_CTX_set_client_CA_list c-pointer c-pointer) -- 2.4.1 From 14254fa5a4e0d9d2084c309abc3cc128950f6919 Mon Sep 17 00:00:00 2001 From: Kristian Lein-Mathisen kristianl...@gmail.com Date: Tue, 19 May 2015 13:31:21 +0200 Subject: [PATCH] bugfix: migrates from ##sys#expand-home-path = pathname-expand the ##sys#expand-home-path procedure was removed from core around chicken 4.9.0.1, and put in a separate egg. let's use that egg (or not expand at all?) without this patch, ssl-load-certificate-chain! and friends will segfault! it's trying to call an unbound procedure: ##sys#expand-home-path --- openssl.meta | 1 + openssl.scm | 15 +++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/openssl.meta b/openssl.meta index b27c8a2..5904c83 100644 --- a/openssl.meta +++ b/openssl.meta @@ -5,5 +5,6 @@ (author Thomas Chust) (license BSD) (category net) + (depends pathname-expand) (doc-from-wiki) (files openssl.scm openssl.release-info openssl.meta openssl.setup)) diff --git a/openssl.scm b/openssl.scm index db693fe..f7665d4 100644 --- a/openssl.scm +++ b/openssl.scm @@ -42,10 +42,9 @@ ##sys#current-thread ##sys#size ##sys#setslot - ##sys#check-string - ##sys#expand-home-path)) + ##sys#check-string)) -(use srfi-18 tcp) +(use srfi-18 tcp pathname-expand) # #include errno.h @@ -583,7 +582,7 @@ EOF (unless (eq? ((foreign-lambda int SSL_CTX_use_certificate_chain_file c-pointer c-string) - (ssl-unwrap-context obj) (##sys#expand-home-path pathname)) + (ssl-unwrap-context obj) (pathname-expand pathname)) 1) (ssl-abort 'ssl-load-certificate-chain! #f pathname))) @@ -602,7 +601,7 @@ EOF return(SSL_CTX_use_PrivateKey_file( (SSL_CTX *)ctx, path, (asn1 ? SSL_FILETYPE_ASN1 : SSL_FILETYPE_PEM)));\n) - (ssl-unwrap-context obj) (##sys#expand-home-path pathname) + (ssl-unwrap-context obj) (pathname-expand pathname) rsa? asn1?) 1) (ssl-abort 'ssl-load-private-key! #f pathname rsa? asn1?))) @@ -626,8 +625,8 @@ EOF ((foreign-lambda int SSL_CTX_load_verify_locations c-pointer c-string c-string) (ssl-unwrap-context obj) - (if pathname (##sys#expand-home-path pathname) #f) - (if dirname (##sys#expand-home-path dirname) #f)) + (if pathname (pathname-expand pathname) #f) + (if dirname (pathname-expand dirname) #f)) 1) (ssl-abort 'ssl-load-verify-root-certificates! #f
Re: [Chicken-users] openssl egg segfauls: ##sys#expand-home-path
On 2015-05-19 13:35, Kristian Lein-Mathisen wrote: [...] It's been way too long! I'm running CHICKEN 4.9.0.1 and the openssl-egg segfaults at ssl-load-certificate-chain! and friends. I have two patches/suggestions: - remove home path expansion - use the pathname-expand egg [...] Hello, the only reason this functionality was included in the first place, was that CHICKEN's standard I/O procedures used to perform automatic home directory expansion, so I wanted the OpenSSL egg to behave similarly. If I'm not mistaken, the standard I/O procedures no longer do home directory expansion by default. I think it would make sense to also remove this functionality from the OpenSSL egg. If needed, one could always make use of the pathname-expand egg explicitly, which would make the intent clearer. Ciao, Thomas -- When C++ is your hammer, every problem looks like your thumb. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users