Changeset 581

Show
Ignore:
Timestamp:
11/19/07 18:36:04 (1 year ago)
Author:
blackhedd
Message:

Fixed bug: EM::Connection#start_tls was not working with server connections.
Reported by Michael S. Fischer.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • version_0/ChangeLog

    r580 r581  
    919119Nov07: Added EventMachine#set_max_timers. Requested by Matthieu Riou and 
    9292        others. 
     9319Nov07: Fixed bug with EM::Connection#start_tls. Was not working with server 
     94        connections. Reported by Michael S. Fischer. 
  • version_0/ext/ssl.cpp

    r505 r581  
    156156                // The SSL_CTX calls here do NOT allocate memory. 
    157157                int e; 
    158                 e = SSL_CTX_use_PrivateKey (pCtx, DefaultPrivateKey); 
     158                if (privkeyfile.length() > 0) 
     159                        e = SSL_CTX_use_PrivateKey_file (pCtx, privkeyfile.c_str(), SSL_FILETYPE_PEM); 
     160                else 
     161                        e = SSL_CTX_use_PrivateKey (pCtx, DefaultPrivateKey); 
    159162                assert (e > 0); 
    160                 e = SSL_CTX_use_certificate (pCtx, DefaultCertificate); 
     163                if (certchainfile.length() > 0) 
     164                        e = SSL_CTX_use_certificate_chain_file (pCtx, certchainfile.c_str()); 
     165                else 
     166                        e = SSL_CTX_use_certificate (pCtx, DefaultCertificate); 
    161167                assert (e > 0); 
    162168        }