Commit Graph

64 Commits (56da70fa9651164e577caaf866fccec684bbd577)

Author SHA1 Message Date
Ansariel d5de986a95 CA file path fix 2018-03-02 20:45:02 +01:00
Ansariel c4e18fbcaa Merge viewer-neko 2018-02-27 18:08:48 +01:00
Andrey Kleshchev e55fcbeeee MAINT-8297 Removing old ca bundle 2018-02-21 17:32:06 +00:00
andreykproductengine b2f61c0e0b MAINT-8297 Fixed "Missing CA File" message when running under debugger on windows 2018-02-15 21:48:18 +02:00
Ansariel 3c0210491a Merge viewer-vivox 2018-01-16 20:25:31 +01:00
Oz Linden 47257bb010 remove warnings for bad certificates (too scary), add info
for the rejected count
2018-01-12 12:34:19 -05:00
Ansariel 2fff7fe963 Merge viewer-vivox 2017-04-20 00:33:01 +02:00
Oz Linden fd3628ef45 Change certificate store infrastructure to key off of the Subject Key
Id rather than sha1 hash, since that is rarely used in modern
certs. The previous form was storing trusted certs using an empty sha1
hash value as the key, which meant most certificates matched... not good.

Modify the LLCertException to pass certificate information back as
LLSD rather than an LLPointer<LLCertificate>, because when the
exception is being thown from the certificate constructor that results
in one of a couple of other exceptions (even refcounting won't save
you when the problem is that the thing you're pointing to never
finished coming into being properly).

Update the certificates in the llsechandler_basic_test to modern
conventions, and extend the classes to allow for an optional
validation date so that the test can use a fixed date. Also make all
the certificates include the plain text form for ease of reference.
2017-04-14 16:05:59 -04:00
Ansariel 915496bbea Merge viewer-vivox 2017-03-21 22:14:02 +01:00
Oz Linden 8e30a2f06d merge changes for 4.1.1-release 2016-10-18 15:38:33 -04:00
Nicky d7a0835432 Merge. 2016-09-26 21:12:34 +02:00
Nat Goodspeed 4d10172d8b MAINT-5011: Catch unhandled exceptions in LLCoros coroutines.
Wrap coroutine call in try/catch in top-level coroutine wrapper function
LLCoros::toplevel(). Distinguish exception classes derived from
LLContinueError (log and continue) from all others (crash with LL_ERRS).

Enhance CRASH_ON_UNHANDLED_EXCEPTIONS() and LOG_UNHANDLED_EXCEPTIONS() macros
to accept a context string to supplement the log message. This lets us replace
many places that called boost::current_exception_diagnostic_information() with
LOG_UNHANDLED_EXCEPTIONS() instead, since the explicit calls were mostly to
log supplemental information.

Provide supplemental information (coroutine name, function parameters) for
some of the previous LOG_UNHANDLED_EXCEPTIONS() calls. This information
duplicates LL_DEBUGS() information at the top of these functions, but in a
typical log file we wouldn't see the LL_DEBUGS() message.

Eliminate a few catch (std::exception e) clauses: the information we get from
boost::current_exception_diagnostic_information() in a catch (...) clause
makes it unnecessary to distinguish.

In a few cases, add a final 'throw;' to a catch (...) clause: having logged
the local context info, propagate the exception to be caught by higher-level
try/catch.

In a couple places, couldn't resist reconciling indentation within a
particular function: tabs where the rest of the function uses tabs, spaces
where the rest of the function uses spaces.

In LLLogin::Impl::loginCoro(), eliminate some confusing comments about an
array of rewritten URIs that date back to a long-deleted implementation.
2016-08-18 17:33:44 -04:00
Nat Goodspeed 993f54f6e9 MAINT-5011: Try to enrich catch (...) logging throughout viewer.
Turns out we have a surprising number of catch (...) clauses in the viewer
code base. If all we currently do is

    LL_ERRS() << "unknown exception" << LL_ENDL;

then call CRASH_ON_UNHANDLED_EXCEPTION() instead. If what we do is

    LL_WARNS() << "unknown exception" << LL_ENDL;

then call LOG_UNHANDLED_EXCEPTION() instead.

Since many places need LOG_UNHANDLED_EXCEPTION() and nobody catches
LLContinueError yet, eliminate LLContinueError& parameter from
LOG_UNHANDLED_EXCEPTION(). This permits us to use the same log message as
CRASH_ON_UNHANDLED_EXCEPTION(), just with a different severity level.

Where a catch (...) clause actually provides contextual information, or makes
an error string, add boost::current_exception_diagnostic_information() to try
to figure out actual exception class and message.
2016-08-17 15:40:03 -04:00
Nat Goodspeed 5e9d2f57c8 MAINT-5011: Use LLTHROW() instead of plain BOOST_THROW_EXCEPTION().
A level of preprocessor indirection lets us later change the implementation if
desired.
2016-08-17 11:36:24 -04:00
Oz Linden 4bf583aaa2 SL-429: Use a new certificate authority bundle based on data from Mozilla 2016-07-21 17:14:07 -04:00
Nat Goodspeed 9c49a6c91d MAINT-5011: Introduce LLException base class for viewer exceptions.
This also introduces LLContinueError for exceptions which should interrupt
some part of viewer processing (e.g. the current coroutine) but should attempt
to let the viewer session proceed.

Derive all existing viewer exception classes from LLException rather than from
std::runtime_error or std::logic_error.

Use BOOST_THROW_EXCEPTION() rather than plain 'throw' to enrich the thrown
exception with source file, line number and containing function.
2016-07-19 16:25:25 -04:00
Ansariel 3192fe832f Merge viewer-quickgraphics 2016-03-08 01:41:31 +01:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
Oz Linden 5c6cf3e7fb restore the ll[io]fstream because we need them as wrappers on Windows for wide char paths; on other platforms they are now just typedefs to the std classes 2015-04-10 11:02:37 -04:00
Oz Linden 8b42c7898e replace llifstream and llofstream with std::ifstream and std::ofstream respectively 2015-04-07 17:59:28 -04:00
Oz Linden 3a57b18896 convert llifstream and llofstream to std::ifstream and std::ofstream respectively 2015-04-07 17:28:05 -04:00
Oz Linden 4aafdfd1c6 add catch for possible exception in llsechandler_basic destructor (crash on exit) 2015-04-02 21:21:21 -04:00
Nicky 006190f2a1 Merge with tools update. 2015-05-05 13:09:27 +02:00
Tank_Master 6babf8abd2 Merge LL 3.7.7 2014-06-09 11:29:57 -07:00
Nicky 56ed43dd05 Properly handle certificate loading from UTF8 paths. 2014-04-06 18:26:19 +02:00
Richard Linden fe518bde8e merge with release 2013-11-06 17:22:04 -08:00
Nicky 5172d4edac OPEN-187: Properly cleanup all allocated OpenSSL structures. 2013-09-03 13:50:35 -04:00
Richard Linden e340009fc5 second phase summer cleaning
replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc.
2013-08-09 17:11:19 -07:00
Oz Linden ddd5659f81 merge changes for DRTVWR-294 2013-04-19 10:11:29 -04:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
Tank_Master 6007d1235e merge snowstorm repo 2013-10-19 23:48:44 -07:00
Nicky 59f933a751 More memory leak stuffing in llsechandler_basic 2013-08-14 21:08:05 +02:00
Nicky fe924e06e5 Stop leaking X509 structures. 2013-08-10 22:47:42 +02:00
Tank_Master d4640277d0 Merge LL 3.5.3 release. 2013-07-09 16:24:58 -07:00
Don Kjer c06c35609c Updating linux build to gcc4.6 2012-10-11 00:09:04 +00:00
Tank_Master ea86bb88c3 first pass merge 2013-02-04 10:52:32 -08:00
Tank_Master e61c20d499 Merge LL 3.3.1 Viewer Release 2012-04-26 17:31:35 -07:00
callum 5c8b24a055 EXP-1825 FIX crash in LLSecAPIBasicHandler::_writeProtectedData() 2012-01-20 10:47:11 -08:00
Aaron Stone c7141025c8 Respect --no-verify-ssl-cert option. 2011-08-23 14:45:42 -07:00
Vadim ProductEngine 6a7bbe0159 STORM-1546 FIXED Fixed a crash caused by a race condition in LLRefCount.
Reason:
secapiSSLCertVerifyCallback() seems to be called simultaneously by multiple threads,
which causes a race condition in LLRefCount::ref/unref() methods.
The reference counter in LLSecAPIBasicHandler::mStore goes to zero, and the object gets destroyed.

Fix:
Derive LLCertificateStore from LLThreadSafeRefCount instead of LLRefCount,
which should fix the race condition.

Note:
The LLThreadSafeRefCount constructor is private, so we have to wrap instances of the class with LLPointer.
2011-08-09 22:47:19 +03:00
Arrehn 7394730eaa Merge up to LL FUI 2011-10-28 02:00:09 -04:00
Arrehn 1a48719121 FIRE-965 WIP, Don't erase saved passwords automatically on config change, Satomi Ahn 2011-08-31 02:41:48 -04:00
Vadim ProductEngine 3a69d89bb3 STORM-1546 FIXED Fixed a crash caused by a race condition in LLRefCount.
Reason:
secapiSSLCertVerifyCallback() seems to be called simultaneously by multiple threads,
which causes a race condition in LLRefCount::ref/unref() methods.
The reference counter in LLSecAPIBasicHandler::mStore goes to zero, and the object gets destroyed.

Fix:
Derive LLCertificateStore from LLThreadSafeRefCount instead of LLRefCount,
which should fix the race condition.

Note:
The LLThreadSafeRefCount constructor is private, so we have to wrap instances of the class with LLPointer.
2011-08-09 22:47:19 +03:00
Tonya Souther 0d103a6873 Satomi Ahn's login manager. Fixes FIRE-964. 2011-08-22 18:31:09 -05:00
Oz Linden 06b0d72efa Change license from GPL to LGPL (version 2.1) 2010-08-13 07:24:57 -04:00
Roxie Linden 1fe7b13d1f automated merge 2010-05-28 12:10:29 -07:00
Tofu Linden 7e0b36d610 CID-442
Checker: FORWARD_NULL
Function: LLBasicCertificateVector::insert(LLCertificateVector::iterator, LLPointer<LLCertificate>)
File: /indra/newview/llsechandler_basic.cpp
2010-05-28 12:47:45 +01:00
Roxie Linden 0ffba7c663 automated merge 2010-05-27 22:58:40 -07:00
karina cca5aa48ae Add new mechanism for getting a unique machine id. 2010-05-26 23:46:42 -07:00
Roxie Linden 32ad37b3f7 Few more touchups for the cert performance code 2010-05-24 16:21:29 -07:00