Commit Graph

54 Commits (56b02aee2eff313c45adbbf6f2d93493cb6cced2)

Author SHA1 Message Date
Callum Prentice 56b02aee2e Fix for SL-15389 -- Pull in the patch to add the Akamai cert fix specified in SL-15370 2021-06-11 11:03:39 -07:00
Andrey Kleshchev 4eefce9767 SL-13921 Only one of extended key usages is needed
LN (EKU_TLS) is more likely to be present thus should be checked first
2020-09-09 18:07:21 +03:00
Andrey Lihatskiy 3ec5970695 Merge branch 'marchcat/SL-13910' into DRTVWR-503-maint 2020-09-05 04:13:23 +03:00
Andrey Lihatskiy 645393c5e9 SL-13910 Added the TLS Web Server Authentication certificate check 2020-09-04 21:29:06 +03:00
Andrey Kleshchev b856745048 SL-13835 SSL verification should not crash on invalid certificate 2020-08-21 20:14:35 +03:00
Andrey Kleshchev 4e98602746 SL-12421 Don't fail silently, show an error 2020-03-05 13:43:58 +02:00
andreykproductengine c090cd32b8 SL-12486 Size check fix 2020-01-08 22:56:10 +02:00
andreykproductengine 19caca91e9 SL-12486 Better data deletion 2020-01-07 00:52:04 +02:00
andreykproductengine 99a4bd23da SL-9699 Login selection 2019-08-09 21:34:12 +03:00
andreykproductengine 5a273d430a MAINT-8297 path fix #2 2018-03-02 19:46:06 +02: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
Oz Linden 47257bb010 remove warnings for bad certificates (too scary), add info
for the rejected count
2018-01-12 12:34:19 -05: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
Oz Linden 8e30a2f06d merge changes for 4.1.1-release 2016-10-18 15:38:33 -04: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
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
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
Don Kjer c06c35609c Updating linux build to gcc4.6 2012-10-11 00:09:04 +00: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
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
Roxie Linden a7d1c68c78 Fixup some certificate related unit tests 2010-05-24 15:31:10 -07:00
Roxie Linden 1ad46b5cd0 DEV-50173 - investigate certificate code performance
DEV-50166 - LLBasicCertificateChain::validate calls in log
Added caching of certificates that have been validated.
The sha1 hash for the certificate is stored and is associated
with the from and to times.  When the certificate is validated,
the code determines whether the certificate has successfully
been validated before by looking for it in the cache, and then
checks the date of the cert.  If that is successful,
the validation calls with success.

Otherwise, it proceeds to do a full validation of the certificate.
2010-05-24 13:59:10 -07:00
Roxie Linden cae4e785be Allow update of the default CAs on install 2010-05-18 22:18:54 -07:00
Roxie Linden d82a10217a Fix issue parsing wildcard cns in certificates
CR: Karina
2010-04-26 17:41:21 -07:00
Roxie Linden 658ccc3e85 Re-insert backed out SLE checkin so we can fix it 2010-04-07 11:08:04 -07:00
Tofu Linden 0bb3f144c0 Backed out changeset 63b699f90efd 2010-04-07 10:37:07 +01:00
Roxie Linden d79af12e04 Fix windows build break, segfault on exit and bad library link location 2010-03-02 13:42:17 -08:00
Roxie Linden c70d0f0ee2 DEV-42996 GIAB: configuring via CLI tools corrupts viewer certs
Added authority key identifier/subject key identifier checking.
Whenever a new cert was created, a new private key was also
created.  Typically you get a new key identifier with
that private key which is written to the child cert.  The
child cert can then find the appropriate parent cert
for validation via subject key identifier.
2009-12-08 00:00:51 -08:00
Roxie Linden b11a625e6f Automated merge with a few fixups for code review comments 2010-03-01 15:31:04 -08:00
Karen Lahey 8f2df75f3d Fix build. 2009-10-16 19:26:46 -07:00