From fb554743df7395dc442e90ad39dd9b32cdd3ab3c Mon Sep 17 00:00:00 2001 From: fengweihao Date: Mon, 2 Jul 2018 16:39:09 +0800 Subject: [PATCH] =?UTF-8?q?[DEL]=201.=E5=88=A0=E9=99=A4=E6=8E=A5=E5=8F=A3C?= =?UTF-8?q?RYPTO=5Fcleanup=5Fall=5Fex=5Fdata()=E6=8E=A5=E5=8F=A3=E8=B0=83?= =?UTF-8?q?=E7=94=A8=202.=E6=B7=BB=E5=8A=A0=E5=AF=B9evhttp=E5=A4=B4?= =?UTF-8?q?=E7=9A=84=E9=87=8A=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cert_session.c | 7 +++---- src/rt/rt_common.h | 7 ------- src/rt/rt_sync.h | 9 --------- 3 files changed, 3 insertions(+), 20 deletions(-) diff --git a/src/cert_session.c b/src/cert_session.c index 6f3bc60..4d06445 100644 --- a/src/cert_session.c +++ b/src/cert_session.c @@ -596,8 +596,6 @@ X509 *x509_create_cert(char *host, int days) mkcert(&x509, &pkey, 1024, 0, host, days); - CRYPTO_cleanup_all_ex_data(); - EVP_PKEY_free(pkey); return x509; @@ -784,7 +782,7 @@ int x509_privatekey_init(EVP_PKEY **key, X509 **root) goto pkey_free; } - unsigned char buf[SG_DATA_SIZE * 2],*p; + unsigned char buf[SG_DATA_SIZE],*p; fp = fopen(key_path, "r"); if (NULL == fp){ mesa_runtime_log(RLOG_LV_FATAL, MODULE_NAME, "Failed to open file(%s)", key_path); @@ -803,7 +801,7 @@ int x509_privatekey_init(EVP_PKEY **key, X509 **root) mesa_runtime_log(RLOG_LV_FATAL, MODULE_NAME, "Failed to open file(%s)", cert_path); goto pkey_free; } - len = fread(buf, 1, SG_DATA_SIZE * 2, fp); + len = fread(buf, 1, SG_DATA_SIZE, fp); fclose(fp); p = buf; @@ -860,6 +858,7 @@ sample_decode_uri(const char *uri, char *host, if (vl) *valid = atoi(vl); + evhttp_clear_headers(¶ms); free(decoded_uri); finish: diff --git a/src/rt/rt_common.h b/src/rt/rt_common.h index 133e5e4..058c43e 100644 --- a/src/rt/rt_common.h +++ b/src/rt/rt_common.h @@ -1,10 +1,3 @@ -/* - * rt_common.h - * Created by fengweihao - * 30 May, 2018 - * Func: System timer control interface - */ - #ifndef __RT_COMMON_H__ #define __RT_COMMON_H__ diff --git a/src/rt/rt_sync.h b/src/rt/rt_sync.h index 7fec285..b8fc272 100644 --- a/src/rt/rt_sync.h +++ b/src/rt/rt_sync.h @@ -1,12 +1,3 @@ -/* -* sync.h -* Created by Tsihang -* 1 June, 2015 -* Func: System startup synchronous operation interface of SPASR -* Personal.Q -*/ - - #ifndef __SYSTEM_SYNC_H__ #define __SYSTEM_SYNC_H__