Changeset 504
- Timestamp:
- 08/15/07 09:57:49 (1 year ago)
- Files:
-
- version_0/ext/ed.cpp (modified) (1 diff)
- version_0/ext/ed.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
version_0/ext/ed.cpp
r454 r504 624 624 throw std::runtime_error ("SSL/TLS already running on connection"); 625 625 626 SslBox = new SslBox_t (bIsServer );626 SslBox = new SslBox_t (bIsServer, PrivateKeyFilename, CertChainFilename); 627 627 _DispatchCiphertext(); 628 #endif 629 630 #ifdef WITHOUT_SSL 631 throw std::runtime_error ("Encryption not available on this event-machine"); 632 #endif 633 } 634 635 636 /********************************* 637 ConnectionDescriptor::SetTlsParms 638 *********************************/ 639 640 void ConnectionDescriptor::SetTlsParms (const char *privkey_filename, const char *certchain_filename) 641 { 642 #ifdef WITH_SSL 643 if (SslBox) 644 throw std::runtime_error ("call SetTlsParms before calling StartTls"); 645 if (privkey_filename && *privkey_filename) 646 PrivateKeyFilename = privkey_filename; 647 if (certchain_filename && *certchain_filename) 648 CertChainFilename = certchain_filename; 628 649 #endif 629 650 version_0/ext/ed.h
r501 r504 66 66 67 67 virtual void StartTls() {} 68 virtual void SetTlsParms (const char *privkey_filename, const char *certchain_filename) {} 68 69 69 70 // Properties: return 0/1 to signify T/F, and handle the values … … 149 150 150 151 virtual void StartTls(); 152 virtual void SetTlsParms (const char *privkey_filename, const char *certchain_filename); 151 153 void SetServerMode() {bIsServer = true;} 152 154 … … 175 177 #ifdef WITH_SSL 176 178 SslBox_t *SslBox; 179 std::string CertChainFilename; 180 std::string PrivateKeyFilename; 177 181 #endif 178 182 bool bIsServer;
