summaryrefslogtreecommitdiff
path: root/indra/newview/llsecapi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llsecapi.cpp')
-rw-r--r--indra/newview/llsecapi.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/newview/llsecapi.cpp b/indra/newview/llsecapi.cpp
index a928b4580e..ba343f5387 100644
--- a/indra/newview/llsecapi.cpp
+++ b/indra/newview/llsecapi.cpp
@@ -50,11 +50,33 @@ void initializeSecHandler()
OpenSSL_add_all_digests();
gHandlerMap[BASIC_SECHANDLER] = new LLSecAPIBasicHandler();
+
// Currently, we only have the Basic handler, so we can point the main sechandler
// pointer to the basic handler. Later, we'll create a wrapper handler that
// selects the appropriate sechandler as needed, for instance choosing the
// mac keyring handler, with fallback to the basic sechandler
gSecAPIHandler = gHandlerMap[BASIC_SECHANDLER];
+
+ // initialize all SecAPIHandlers
+ LLProtectedDataException ex = LLProtectedDataException("");
+ std::map<std::string, LLPointer<LLSecAPIHandler> >::const_iterator itr;
+ for(itr = gHandlerMap.begin(); itr != gHandlerMap.end(); ++itr)
+ {
+ LLPointer<LLSecAPIHandler> handler = (*itr).second;
+ try
+ {
+ handler->init();
+ }
+ catch (LLProtectedDataException e)
+ {
+ ex = e;
+ }
+ }
+ if (ex.getMessage().length() > 0 ) // an exception was thrown.
+ {
+ throw ex;
+ }
+
}
// start using a given security api handler. If the string is empty
// the default is used