<p style="box-sizing: border-box; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; line-height: 22.4px; margin-top: 0px !important;">Hello ŁĄ</p><p style="box-sizing: border-box; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; line-height: 22.4px; margin-top: 0px !important;">I am using openssl in OpenImsCore project to enable tls feature. But when I run pcscf I met this problem  "undefined symbol: SSL_SESSION_hash".</p><p style="box-sizing: border-box; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; line-height: 22.4px; margin-top: 0px !important;">More information is here:</p><p style="box-sizing: border-box; margin-bottom: 16px; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; line-height: 22.4px; margin-top: 0px !important;"><font color="#0000ff">[root@iZ23djkgcm2Z wangxx]# cat /etc/redhat-release <br style="box-sizing: border-box;">CentOS Linux release 7.2.1511 (Core) <br style="box-sizing: border-box;">[root@iZ23djkgcm2Z wangxx]#</font></p><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; line-height: 22.4px;"><font color="#0000ff">[root@iZ23djkgcm2Z wangxx]# tar -xzvf openssl-OpenSSL_1_0_1s.tar.gz<br style="box-sizing: border-box;">[root@iZ23djkgcm2Z wangxx]# cd /home/wangxx/openssl-OpenSSL_1_0_1s<br style="box-sizing: border-box;">[root@iZ23djkgcm2Z wangxx]# ./config shared --prefix=/usr/local --openssldir=/usr/local/openssl && make && make install</font></p><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; line-height: 22.4px;">There is no symbol SSL_SESSION_hash in openssl-1.0.* however SSL_SESSION_hash exists in openssl-0.9.8*. See below.</p><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; line-height: 22.4px;"><font color="#0000ff">[root@iZ23djkgcm2Z tls]# nm /home/wangxx/openssl-OpenSSL_1_0_1s/libssl.so.1.0.0 | grep SSL_SESSION_hash<br style="box-sizing: border-box;">[root@iZ23djkgcm2Z tls]#</font></p><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; line-height: 22.4px;"><font color="#0000ff">[root@iZ23djkgcm2Z tls]# nm /home/wangxx/openssl-OpenSSL_0_9_8e/libssl.so.0.9.8 | grep SSL_SESSION_hash<br style="box-sizing: border-box;">000000000002e450 T SSL_SESSION_hash<br style="box-sizing: border-box;">000000000002e480 t SSL_SESSION_hash_LHASH_HASH<br style="box-sizing: border-box;">[root@iZ23djkgcm2Z tls]#</font></p><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; line-height: 22.4px;">Is the method SSL_SESSION_hash depricated? If so what method should I use to replace it?</p><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; line-height: 22.4px;">The code is like this:</p><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; line-height: 22.4px;"><font color="#0000ff">/**</font></p><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; line-height: 22.4px;"><font color="#0000ff">get TLS Session Hash<br style="box-sizing: border-box;"><a href="https://github.com/param" class="user-mention" style="box-sizing: border-box; text-decoration: none; font-weight: bold; white-space: nowrap; background-color: transparent;">@param</a> msg - sip msg received over a TLS secure connection<br style="box-sizing: border-box;"><a href="https://github.com/returns" class="user-mention" style="box-sizing: border-box; text-decoration: none; font-weight: bold; white-space: nowrap; background-color: transparent;">@returns</a> session_hash or 0 in case of error<br style="box-sizing: border-box;">/<br style="box-sizing: border-box;">unsigned long get_tls_session_hash(struct sip_msg msg, char str1, char str2)<br style="box-sizing: border-box;">{<br style="box-sizing: border-box;">struct tcp_connection c;<br style="box-sizing: border-box;">struct tls_extra_data extra;<br style="box-sizing: border-box;">SSL_SESSION *ssl_ses;<br style="box-sizing: border-box;">unsigned long ses_hash;</font></p><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; line-height: 22.4px;"><font color="#0000ff">if (msg->rcv.proto != PROTO_TLS) {<br style="box-sizing: border-box;">ERR("get_tls_session_hash: No TLS connection !\n");<br style="box-sizing: border-box;">return 0;<br style="box-sizing: border-box;">}<br style="box-sizing: border-box;">c = tcpconn_get(msg->rcv.proto_reserved1, 0, 0, tls_con_lifetime);<br style="box-sizing: border-box;">if (c && c->type != PROTO_TLS) {<br style="box-sizing: border-box;">ERR("get_tls_session_hash: Connection found but is not TLS !\n");<br style="box-sizing: border-box;">tcpconn_put(c);<br style="box-sizing: border-box;">return 0;<br style="box-sizing: border-box;">}</font></p><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; line-height: 22.4px;"><font color="#0000ff">if (!c || !c->extra_data) {<br style="box-sizing: border-box;">ERR("get_tls_session_hash: Unable to extract SSL data from TLS connection!\n");<br style="box-sizing: border-box;">return 0;<br style="box-sizing: border-box;">}<br style="box-sizing: border-box;">extra = (struct tls_extra_data*)c->extra_data;</font></p><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; line-height: 22.4px;"><font color="#0000ff">ssl_ses = SSL_get_session(extra->ssl) ;</font><br style="box-sizing: border-box;"><font color="#0000ff">if (!ssl_ses)</font><br style="box-sizing: border-box;"><font color="#0000ff">{</font><br style="box-sizing: border-box;"><font color="#0000ff">ERR("get_tls_session_hash: No ssl session found !\n");</font><br style="box-sizing: border-box;"><font color="#0000ff">tcpconn_put(c);</font><br style="box-sizing: border-box;"><font color="#0000ff">return 0;</font><br style="box-sizing: border-box;"><font color="#0000ff">}</font><br style="box-sizing: border-box;"><font color="#ff0000">ses_hash = SSL_SESSION_hash(ssl_ses);</font></p><p style="box-sizing: border-box; margin-top: 0px; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; line-height: 22.4px; margin-bottom: 0px !important;"><font color="#0000ff">tcpconn_put(c);<br style="box-sizing: border-box;">return ses_hash;<br style="box-sizing: border-box;">}</font></p>