Merge pull request #477 from jslachta/kamailio-5.3
[feed/telephony.git] / libs / pjproject / patches / 0030-Revert-Misc-re-2147-Fixed-warnings-in-SSL-socket-red.patch
1 From 8d0652d4a02c7b8da58b1b98421cfda57056184d Mon Sep 17 00:00:00 2001
2 From: George Joseph <gjoseph@digium.com>
3 Date: Tue, 24 Sep 2019 06:41:16 -0600
4 Subject: [PATCH 30/33] Revert "Misc (re #2147): Fixed warnings in SSL socket:
5 redefinition of typedef 'pj_ssl_sock_t' and unused 'get_pem'."
6
7 This reverts commit 688a9b0de685328f62b2df86304b44c21e4460ae.
8 ---
9 pjlib/src/pj/ssl_sock_imp_common.h | 4 ++--
10 pjlib/src/pj/ssl_sock_ossl.c | 5 +----
11 2 files changed, 3 insertions(+), 6 deletions(-)
12
13 --- a/pjlib/src/pj/ssl_sock_imp_common.h
14 +++ b/pjlib/src/pj/ssl_sock_imp_common.h
15 @@ -93,7 +93,7 @@ typedef struct circ_buf_t {
16 /*
17 * Secure socket structure definition.
18 */
19 -struct pj_ssl_sock_t
20 +typedef struct pj_ssl_sock_t
21 {
22 pj_pool_t *pool;
23 pj_ssl_sock_t *parent;
24 @@ -139,7 +139,7 @@ struct pj_ssl_sock_t
25
26 circ_buf_t circ_buf_output;
27 pj_lock_t *circ_buf_output_mutex;
28 -};
29 +} pj_ssl_sock_t;
30
31
32 /*
33 --- a/pjlib/src/pj/ssl_sock_ossl.c
34 +++ b/pjlib/src/pj/ssl_sock_ossl.c
35 @@ -37,6 +37,7 @@
36 #if defined(PJ_HAS_SSL_SOCK) && PJ_HAS_SSL_SOCK != 0 && \
37 (PJ_SSL_SOCK_IMP == PJ_SSL_SOCK_IMP_OPENSSL)
38
39 +#include "ssl_sock_imp_common.h"
40 #include "ssl_sock_imp_common.c"
41
42 #define THIS_FILE "ssl_sock_ossl.c"
43 @@ -1579,10 +1580,6 @@ static void ssl_update_remote_cert_chain
44 {
45 int i;
46
47 - /* For now, get_pem has to be PJ_TRUE */
48 - pj_assert(get_pem);
49 - PJ_UNUSED_ARG(get_pem);
50 -
51 ci->raw_chain.cert_raw = (pj_str_t *)pj_pool_calloc(pool,
52 sk_X509_num(chain),
53 sizeof(pj_str_t));