# include "config.h"
#endif
+#ifdef USE_SSL
+
#include <openssl/ssl.h>
#include <openssl/x509.h>
#include <openssl/err.h>
#include <string.h>
+#include <lib-lib/mem.h>
+
#include "mutt.h"
#include "mutt_socket.h"
#include "mutt_menu.h"
} sslsockdata;
/* local prototypes */
-int ssl_init (void);
+static int ssl_init (void);
static int add_entropy (const char *file);
static int ssl_socket_read (CONNECTION * conn, char *buf, size_t len);
static int ssl_socket_write (CONNECTION * conn, const char *buf, size_t len);
return 0;
bail_ssl:
- mem_free (&ssldata->ssl);
+ p_delete(&ssldata->ssl);
bail_ctx:
- mem_free (&ssldata->ctx);
+ p_delete(&ssldata->ctx);
bail_ssldata:
- mem_free (&ssldata);
+ p_delete(&ssldata);
bail:
return -1;
}
* versions also. (That's the reason for the ugly #ifdefs and macros,
* otherwise I could have simply #ifdef'd the whole ssl_init funcion)
*/
-int ssl_init (void)
+static int ssl_init (void)
{
char path[_POSIX_PATH_MAX];
static unsigned char init_complete = 0;
}
-int ssl_socket_setup (CONNECTION * conn)
+int mutt_ssl_socket_setup (CONNECTION * conn)
{
if (ssl_init () < 0) {
conn->conn_open = ssl_socket_open_err;
#endif
SSL_free (data->ssl);
SSL_CTX_free (data->ctx);
- mem_free (&conn->sockdata);
+ p_delete(&conn->sockdata);
}
return raw_socket_close (conn);
return snprintf (buf, size, "%s", account->pass);
}
+
+#endif /* USE_SSL */