Remove $Id$ tags from most of webcit
[citadel.git] / webcit / crypto.c
index 0545b7260fa31c2217f074352c3d9ac7ebec30d4..abf63e2af30e21f14f5b349589d7c930a01407d2 100644 (file)
@@ -1,5 +1,19 @@
 /*
- * $Id$
+ * Copyright (c) 1996-2010 by the citadel.org team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include "sysdep.h"
 #define CTDL_CSR_PATH          file_crpt_file_csr
 #define CTDL_CER_PATH          file_crpt_file_cer
 #define SIGN_DAYS              3650                    /* how long our certificate should live */
-#define WEBCIT_CIPHER_LIST     "DEFAULT"               /* See http://openssl.org/docs/apps/ciphers.html */
 
 SSL_CTX *ssl_ctx;              /* SSL context */
 pthread_mutex_t **SSLCritters; /* Things needing locking */
+char *ssl_cipher_list = DEFAULT_SSL_CIPHER_LIST;
 
 pthread_key_t ThreadSSL;       /* Per-thread SSL context */
 
@@ -96,12 +110,12 @@ void init_ssl(void)
                return;
        }
 
-       if (!(SSL_CTX_set_cipher_list(ssl_ctx, WEBCIT_CIPHER_LIST))) {
+       lprintf(9, "Requesting cipher list: %s\n", ssl_cipher_list);
+       if (!(SSL_CTX_set_cipher_list(ssl_ctx, ssl_cipher_list))) {
                lprintf(3, "SSL_CTX_set_cipher_list failed: %s\n", ERR_reason_error_string(ERR_get_error()));
                return;
        }
 
-
        CRYPTO_set_locking_callback(ssl_lock);
        CRYPTO_set_id_callback(id_callback);