Description: Load the ssl certificate from absolute location
  Currently ssl.c loads the ssl certificate from the local directory, which is
  fine for the compiled-from-source case but not for the packaged binaries.
Bug: http://code.google.com/p/ratproxy/issues/detail?id=34
Author: Iustin Pop <iustin@debian.org>
Last-Update: 2010-04-18
--- a/ssl.c
+++ b/ssl.c
@@ -44,6 +44,8 @@
 #include "debug.h"
 #include "ssl.h"
 
+#define SSLCERT_FILE "/usr/share/ratproxy/keyfile.pem"
+
 _s32 ssl_cli_tap,		/* Client traffic tap      */
      ssl_srv_tap;		/* Server traffic tap      */
 
@@ -143,10 +145,10 @@
 
   if (!srv_ctx || !cli_ctx || !err) ssl_fatal("unable to create SSL CTX or BIO", err);
 
-  if (SSL_CTX_use_certificate_chain_file(cli_ctx,"keyfile.pem") != 1) 
+  if (SSL_CTX_use_certificate_chain_file(cli_ctx, SSLCERT_FILE) != 1) 
     ssl_fatal("certificate load failed", err);
 
-  if (SSL_CTX_use_PrivateKey_file(cli_ctx,"keyfile.pem",SSL_FILETYPE_PEM) != 1) 
+  if (SSL_CTX_use_PrivateKey_file(cli_ctx,SSLCERT_FILE,SSL_FILETYPE_PEM) != 1) 
     ssl_fatal("private key load failed", err);
 
   cli_ssl = SSL_new(cli_ctx);
