Skip to content
Snippets Groups Projects
Commit 62386dd1 authored by Joshua Colp's avatar Joshua Colp Committed by Gerrit Code Review
Browse files

Merge "pjproject_bundled: Crash on pj_ssl_get_info() while ioqueue_on_read_complete()."

parents 6ac1c686 7a46cd74
No related branches found
No related tags found
No related merge requests found
Index: /pjproject/trunk/pjlib/src/pj/ssl_sock_ossl.c
===================================================================
--- a/pjlib/src/pj/ssl_sock_ossl.c (revision 5564)
+++ b/pjlib/src/pj/ssl_sock_ossl.c (revision 5565)
@@ -145,5 +145,6 @@
SSL_STATE_NULL,
SSL_STATE_HANDSHAKING,
- SSL_STATE_ESTABLISHED
+ SSL_STATE_ESTABLISHED,
+ SSL_STATE_ERROR
};
@@ -1907,4 +1908,8 @@
buf->len += size_;
+ if (status != PJ_SUCCESS) {
+ ssock->ssl_state = SSL_STATE_ERROR;
+ }
+
ret = (*ssock->param.cb.on_data_read)(ssock, buf->data,
buf->len, status,
@@ -2658,5 +2663,9 @@
/* Current cipher */
cipher = SSL_get_current_cipher(ssock->ossl_ssl);
- info->cipher = (SSL_CIPHER_get_id(cipher) & 0x00FFFFFF);
+ if (cipher) {
+ info->cipher = (SSL_CIPHER_get_id(cipher) & 0x00FFFFFF);
+ } else {
+ info->cipher = PJ_TLS_UNKNOWN_CIPHER;
+ }
/* Remote address */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment