Fix const-correctness warnings in OpenSSL's SSLi_init().
[umurmur.git] / src / ssli_openssl.c
index 4cc1db949cd24ab4ca28638c5e99ff486f8ef2c5..c35e1f82b4ef64338c7e4b6267d8b08a3463635c 100644 (file)
@@ -67,32 +67,6 @@ static int SSL_add_ext(X509 * crt, int nid, char *value) {
        return 1;
 }
 
-static X509 *SSL_readcert(char *certfile)
-{
-       FILE *fp;
-       X509 *x509;
-
-       /* open the certificate file */
-       fp = fopen(certfile, "r");
-       if (fp == NULL) {
-               Log_warn("Unable to open the X509 file %s for reading.", certfile);
-               return NULL;
-       }
-
-       /* allocate memory for the cert structure */
-       x509 = X509_new();
-
-       if (PEM_read_X509(fp, &x509, NULL, NULL) == 0) {
-               /* error reading the x509 information - check the error stack */
-               Log_warn("Error trying to read X509 info.");
-               fclose(fp);
-               X509_free(x509);
-               return NULL;
-       }
-       fclose(fp);
-       return x509;
-}
-
 static RSA *SSL_readprivatekey(char *keyfile)
 {
        FILE *fp;
@@ -214,7 +188,7 @@ void SSLi_init(void)
        SSL *ssl;
        int i, offset = 0, cipherstringlen = 0;
        STACK_OF(SSL_CIPHER) *cipherlist = NULL, *cipherlist_new = NULL;
-       SSL_CIPHER *cipher;
+       const SSL_CIPHER *cipher;
        char *cipherstring = NULL;
 
        SSL_library_init();