monit-dev
[Top][All Lists]
Advanced

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

[monit-dev] Patch to allow for chained SSL certificates


From: Lawrence Tan
Subject: [monit-dev] Patch to allow for chained SSL certificates
Date: Tue, 04 Aug 2009 14:03:43 -0400
User-agent: Thunderbird 2.0.0.22 (Macintosh/20090605)

Dear all,

I'm writing with reference to an issue which came up sometime last year on the general mailing list which I found when I encountered the same problem recently.

(Re: http://lists.gnu.org/archive/html/monit-general/2008-05/msg00042.html)

When Monit is run with a chained SSL certificate, the http server only serves the server digital certificate, but not the rest of the chain, causing browsers to produce an error. I have attached a patch below that should address this problem.

Index: ssl.c
===================================================================
--- ssl.c       (revision 15)
+++ ssl.c       (working copy)
@@ -351,8 +351,7 @@
     goto sslerror;
   }

-  if(SSL_CTX_use_certificate_file(ssl_server->ctx, pemfile,
-                                  SSL_FILETYPE_PEM) != 1) {
+  if(SSL_CTX_use_certificate_chain_file(ssl_server->ctx, pemfile) != 1) {
     LogError("%s: Cannot initialize SSL server certificate -- %s\n",
              prog, SSLERROR);
     goto sslerror;

I have tested this in a rudimentary manner - I built monit with this patch applied, verified that it still accepts non-chained certificates, and that it also accepts my chained certificate successfully and serves it correctly to firefox. Please let me know if there are other tests that should be run before I submit this again. Thank you!

Best regards
Lawrence




reply via email to

[Prev in Thread] Current Thread [Next in Thread]