Changeset 356
- Timestamp:
- 30/08/07 22:04:56 (15 months ago)
- Files:
-
- 1 modified
-
trunk/sx/ssl.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/sx/ssl.c
r141 r356 104 104 } 105 105 106 /* can't go on if we're on compressed stream */ 107 if(s->compressed > 0) { 108 _sx_debug(ZONE, "starttls requested on already compressed channel, dropping packet"); 109 return 0; 110 } 111 106 112 _sx_debug(ZONE, "starttls requested, setting up"); 107 113 … … 175 181 int ns; 176 182 177 /* if the session is already encrypted, or the app told us not to, then we don't offer anything */ 178 if(s->state > state_STREAM || s->ssf > 0 || !(s->flags & SX_SSL_STARTTLS_OFFER)) 183 /* if the session is already encrypted, or the app told us not to, 184 * or session is compressed then we don't offer anything */ 185 if(s->state > state_STREAM || s->ssf > 0 || !(s->flags & SX_SSL_STARTTLS_OFFER) || s->compressed) 179 186 return; 180 187 … … 629 636 } 630 637 631 /** args: pemfile */ 638 int sx_openssl_initialized = 0; 639 640 /** args: pemfile, cachain, mode */ 632 641 int sx_ssl_init(sx_env_t env, sx_plugin_t p, va_list args) { 633 642 char *pemfile, *cachain; … … 653 662 SSL_library_init(); 654 663 SSL_load_error_strings(); 664 665 sx_openssl_initialized = 1; 655 666 656 667 /* create the context */ … … 726 737 } 727 738 728 /* check if we're already encrypted */729 if(s->ssf > 0 ) {739 /* check if we're already encrypted or compressed */ 740 if(s->ssf > 0 || s->compressed) { 730 741 _sx_debug(ZONE, "encrypted channel already established"); 731 742 return 1;
