projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
that was in fact a memcpy, nice try
[apps/madmutt.git]
/
lib-sys
/
mutt_ssl.c
diff --git
a/lib-sys/mutt_ssl.c
b/lib-sys/mutt_ssl.c
index
1557a8f
..
5d7c551
100644
(file)
--- a/
lib-sys/mutt_ssl.c
+++ b/
lib-sys/mutt_ssl.c
@@
-7,9
+7,7
@@
* please see the file GPL in the top level source directory.
*/
* please see the file GPL in the top level source directory.
*/
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include <lib-lib/lib-lib.h>
#ifdef USE_SSL
#ifdef USE_SSL
@@
-18,10
+16,6
@@
#include <openssl/err.h>
#include <openssl/rand.h>
#include <openssl/err.h>
#include <openssl/rand.h>
-#include <string.h>
-
-#include <lib-lib/lib-lib.h>
-
#include <lib-ui/curses.h>
#include <lib-ui/menu.h>
#include <lib-ui/curses.h>
#include <lib-ui/menu.h>
@@
-339,9
+333,6
@@
static int ssl_socket_close (CONNECTION * conn)
if (data) {
SSL_shutdown (data->ssl);
if (data) {
SSL_shutdown (data->ssl);
-#if 0
- X509_free (data->cert);
-#endif
SSL_free (data->ssl);
SSL_CTX_free (data->ctx);
p_delete(&conn->sockdata);
SSL_free (data->ssl);
SSL_CTX_free (data->ctx);
p_delete(&conn->sockdata);
@@
-516,7
+507,7
@@
static int check_certificate_by_digest (X509 * peercert)
return 0;
if (!X509_digest (peercert, EVP_sha1 (), peermd, &peermdlen)) {
return 0;
if (!X509_digest (peercert, EVP_sha1 (), peermd, &peermdlen)) {
-
fclose (
fp);
+
m_fclose(&
fp);
return 0;
}
return 0;
}
@@
-526,7
+517,7
@@
static int check_certificate_by_digest (X509 * peercert)
break;
}
X509_free (cert);
break;
}
X509_free (cert);
-
fclose (
fp);
+
m_fclose(&
fp);
return pass;
}
return pass;
}
@@
-630,7
+621,7
@@
static int ssl_check_certificate (sslsockdata * data)
if ((fp = fopen (SslCertFile, "a"))) {
if (PEM_write_X509 (fp, data->cert))
done = 1;
if ((fp = fopen (SslCertFile, "a"))) {
if (PEM_write_X509 (fp, data->cert))
done = 1;
-
fclose (
fp);
+
m_fclose(&
fp);
}
if (!done) {
mutt_error (_("Warning: Couldn't save certificate"));
}
if (!done) {
mutt_error (_("Warning: Couldn't save certificate"));