* Help acme-client find its certificate store
@ 2016-12-13 22:15 Leo Famulari
2016-12-14 14:19 ` Leo Famulari
0 siblings, 1 reply; 3+ messages in thread
From: Leo Famulari @ 2016-12-13 22:15 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1.1: Type: text/plain, Size: 125 bytes --]
I'm successfully using this package with this change.
I don't know if this is the "right way" to solve this. Your thoughts?
[-- Attachment #1.2: 0001-gnu-acme-client-Provide-path-to-certificates.patch --]
[-- Type: text/plain, Size: 1166 bytes --]
From a732b5ffaae2b80496d9c7fc5f957c69919072e5 Mon Sep 17 00:00:00 2001
From: Leo Famulari <leo@famulari.name>
Date: Mon, 12 Dec 2016 21:04:43 -0500
Subject: [PATCH] gnu: acme-client: Provide path to certificates.
* gnu/packages/tls.scm (acme-client)[arguments]: Add 'patch-paths' phase.
---
gnu/packages/tls.scm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index f5ffe42b9..e577421fa 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -717,6 +717,13 @@ number generator")
(string-append "PREFIX=" (assoc-ref %outputs "out")))
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((pem (string-append (assoc-ref inputs "libressl")
+ "/etc/ssl/cert.pem")))
+ (substitute* "http.c"
+ (("/etc/ssl/cert.pem") pem))
+ #t)))
(delete 'configure)))) ; no './configure' script
(native-inputs
`(("pkg-config" ,pkg-config)))
--
2.11.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: Help acme-client find its certificate store
2016-12-13 22:15 Help acme-client find its certificate store Leo Famulari
@ 2016-12-14 14:19 ` Leo Famulari
2016-12-14 15:44 ` Marius Bakke
0 siblings, 1 reply; 3+ messages in thread
From: Leo Famulari @ 2016-12-14 14:19 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 1082 bytes --]
On Tue, Dec 13, 2016 at 05:15:05PM -0500, Leo Famulari wrote:
> I'm successfully using this package with this change.
>
> I don't know if this is the "right way" to solve this. Your thoughts?
To clarify, here is what happens on Debian Jessie without this change:
$ acme-client -nN example.com
acme-client: tls_config_set_ca_file: failed to open CA file '/etc/ssl/cert.pem': No such file or directory: No such file or directory
And here are the upstream notes on this subject [0]:
"You can also set DEFAULT_CA_FILE for the location of the certificate
file loaded by libtls."
https://github.com/kristapsdz/acme-client-portable/blob/master/README.md#configuration
> + (let ((pem (string-append (assoc-ref inputs "libressl")
> + "/etc/ssl/cert.pem")))
> + (substitute* "http.c"
> + (("/etc/ssl/cert.pem") pem))
The upstream maintainer recommends setting this value in 'config.h', but
it's only used in 'http.c', so I thought this solution would be a little
easier to read.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Help acme-client find its certificate store
2016-12-14 14:19 ` Leo Famulari
@ 2016-12-14 15:44 ` Marius Bakke
0 siblings, 0 replies; 3+ messages in thread
From: Marius Bakke @ 2016-12-14 15:44 UTC (permalink / raw)
To: Leo Famulari, guix-devel
[-- Attachment #1: Type: text/plain, Size: 1227 bytes --]
Leo Famulari <leo@famulari.name> writes:
> On Tue, Dec 13, 2016 at 05:15:05PM -0500, Leo Famulari wrote:
>> I'm successfully using this package with this change.
>>
>> I don't know if this is the "right way" to solve this. Your thoughts?
>
> To clarify, here is what happens on Debian Jessie without this change:
>
> $ acme-client -nN example.com
> acme-client: tls_config_set_ca_file: failed to open CA file '/etc/ssl/cert.pem': No such file or directory: No such file or directory
>
> And here are the upstream notes on this subject [0]:
>
> "You can also set DEFAULT_CA_FILE for the location of the certificate
> file loaded by libtls."
>
> https://github.com/kristapsdz/acme-client-portable/blob/master/README.md#configuration
>
>> + (let ((pem (string-append (assoc-ref inputs "libressl")
>> + "/etc/ssl/cert.pem")))
>> + (substitute* "http.c"
>> + (("/etc/ssl/cert.pem") pem))
>
> The upstream maintainer recommends setting this value in 'config.h', but
> it's only used in 'http.c', so I thought this solution would be a little
> easier to read.
LGTM. I did not know libressl maintains their own root trust.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-12-14 15:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-13 22:15 Help acme-client find its certificate store Leo Famulari
2016-12-14 14:19 ` Leo Famulari
2016-12-14 15:44 ` Marius Bakke
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.