|
reSIProcate/repro
9694
|
00001 #include "resip/stack/ssl/Security.hxx" 00002 #include "resip/stack/Pkcs8Contents.hxx" 00003 #include "resip/stack/X509Contents.hxx" 00004 #include "resip/dum/DialogUsageManager.hxx" 00005 #include "repro/stateAgents/CertServer.hxx" 00006 #include "resip/dum/MasterProfile.hxx" 00007 #include "rutil/WinLeakCheck.hxx" 00008 00009 using namespace resip; 00010 using namespace repro; 00011 00012 CertServer::CertServer(DialogUsageManager& dum) : 00013 mDum(dum), 00014 mPrivateKeyServer(*mDum.getSecurity()), 00015 mPrivateKeyUpdater(*mDum.getSecurity()), 00016 mCertServer(*mDum.getSecurity()), 00017 mCertUpdater(*mDum.getSecurity()) 00018 { 00019 MasterProfile& profile = *mDum.getMasterProfile(); 00020 profile.addSupportedMethod(PUBLISH); 00021 profile.addSupportedMethod(SUBSCRIBE); 00022 //profile.validateAcceptEnabled() = true; // !slg! this causes Accept validation for registration requests as well, which is not really desired 00023 profile.validateContentEnabled() = true; 00024 profile.addSupportedMimeType(PUBLISH, Pkcs8Contents::getStaticType()); 00025 profile.addSupportedMimeType(SUBSCRIBE, Pkcs8Contents::getStaticType()); 00026 profile.addSupportedMimeType(PUBLISH, X509Contents::getStaticType()); 00027 profile.addSupportedMimeType(SUBSCRIBE, X509Contents::getStaticType()); 00028 00029 mDum.addServerSubscriptionHandler(Symbols::Credential, &mPrivateKeyServer); 00030 mDum.addServerSubscriptionHandler(Symbols::Certificate, &mCertServer); 00031 mDum.addServerPublicationHandler(Symbols::Credential, &mPrivateKeyUpdater); 00032 mDum.addServerPublicationHandler(Symbols::Certificate, &mCertUpdater); 00033 //setServerAuthManager(std::auto_ptr<ServerAuthManager>(new ServerAuthManager(profile))); 00034 } 00035 00036 CertServer::~CertServer() 00037 { 00038 } 00039
1.7.5.1