* make it const where possible...
[citadel.git] / citadel / modules / crypto / serv_crypto.c
index 21ccd82517b20e0f55fb3a489a3be215b1b89bdd..5224aaac86e85ce93e7fbc8b81e908ea19487a98 100644 (file)
@@ -260,17 +260,23 @@ void init_ssl(void)
                                        */
 
                                        X509_NAME_add_entry_by_txt(name, "O",
-                                               MBSTRING_ASC, config.c_humannode, -1, -1, 0);
+                                                                  MBSTRING_ASC, 
+                                                                  (unsigned char*) config.c_humannode,
+                                                                  -1, -1, 0);
 
                                        X509_NAME_add_entry_by_txt(name, "OU",
-                                               MBSTRING_ASC, "Citadel server", -1, -1, 0);
+                                                                  MBSTRING_ASC, 
+                                                                  (unsigned const char*)"Citadel server",
+                                                                  -1, -1, 0);
 
                                        /* X509_NAME_add_entry_by_txt(name, "CN",
                                                MBSTRING_ASC, config.c_fqdn, -1, -1, 0);
                                        */
 
-                                       X509_NAME_add_entry_by_txt(name, "CN",
-                                               MBSTRING_ASC, "*", -1, -1, 0);
+                                       X509_NAME_add_entry_by_txt(name, 
+                                                                  "CN",
+                                                                  MBSTRING_ASC, 
+                                                                  (const unsigned char *)"*", -1, -1, 0);
                                
                                        X509_REQ_set_subject_name(req, name);
 
@@ -387,7 +393,7 @@ void init_ssl(void)
 /*
  * client_write_ssl() Send binary data to the client encrypted.
  */
-void client_write_ssl(char *buf, int nbytes)
+void client_write_ssl(const char *buf, int nbytes)
 {
        int retval;
        int nremain;