Commit Graph

26 Commits (8a13530ce4eeb481ee467fd3ec54f1ed7e9f632a)

Author SHA1 Message Date
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
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
Nat Goodspeed 47d93e4f65 DRTVWR-418: Remove rogue getMessage() from llsecapi.h exceptions.
The LLProtectedDataException and LLCertException exception classes didn't used
to be derived from std::exception, so they followed their own getMessage()
convention instead of the standard what() convention. Now that they're derived
from std::exception, remove getMessage() and change its few consumers to use
what() instead. Thanks NickyD for suggesting.
2016-07-19 14:08:43 -04:00
Nat Goodspeed cefa598e49 MAINT-5011: Per NickyD, make LLCertException::getMessage() const.
Also getCert().

Also LLProtectedDataException::getMessage().
2016-07-14 11:33:29 -04:00
Nat Goodspeed b031b1a625 MAINT-5011: Derive remaining exception classes from std::exception.
In particular:
NotImplemented in llhttpnode.cpp
RelocateError in llupdateinstaller.cpp
LLProtectedDataException, LLCertException and subclasses in llsecapi.h

Had to add no-throw destructor overrides to LLCertException and subclasses
because otherwise clang complains that the implicitly-generated destructor's
exception specification is more lax than the base class's.
2016-07-13 10:43:36 -04:00
Oz Linden 9be58e915a merge with 4.0.3-release 2016-04-04 15:53:09 -04:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
Rider Linden 97236a42ca MAINT-5507: Remove HTTPClient and related cruft. 2015-09-14 11:15:23 -07:00
Richard Linden 075a7bcc98 SH-4297 WIP interesting: viewer-interesting starts loading cached scene late
dependency cleanup - removed a lot of unecessary includes
2013-07-18 15:09:45 -07:00
Richard Linden 0a96b47663 merge with viewer-release 2013-06-05 19:05:43 -07:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
Dave Parks 19371a9abe STORM-1562 Potential fix for crash in LLCurl::run -- make sure all ref counted members of llsecapi are thread safe 2011-09-13 13:09:10 -05:00
Logan Dethrow ce0b04889d Merge. 2011-08-18 17:52:00 -04: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
Logan Dethrow 7717b6f647 STORM-1112 More cleanup of SOCKS 5 proxy code.
Renamed llsocks5.cpp to llproxy.cpp.
2011-06-28 19:54:53 -04:00
Oz Linden 06b0d72efa Change license from GPL to LGPL (version 2.1) 2010-08-13 07:24:57 -04: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 5e727964db DEV-49332 - cryptic error message when typing in single username when logging into maingrid.
Needs to be changed when IE is checked in, of course.

Now we check the expected credential formats for a given grid against the
format that is typed in, and throw an error if it's invalid.
2010-04-22 15:09:34 -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 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
Karen Lahey 73e86b0bed MAC Address Change no longer causes viewer to die cr:Roxie 2009-10-15 16:52:03 -07:00
Roxanne Skelly e65b6d9695 DEV-34822
svn merge -c120157 svn+ssh://svn.lindenlab.com/svn/linden/branches/giab-viewer/giab-viewer-2
2009-07-09 21:45:04 +00:00
Roxanne Skelly 9e89819d55 DEV-34822 - merge with 1.23
certificate notification code
-r 118191

ignore-dead-branch
2009-07-08 00:45:17 +00:00
Roxie Linden fe71dd340a Merge giab-viewer-trunk 2497, general merge of more
secapi stuff as well as certificate handling stuff.
Grid manager as well
2010-02-01 15:10:19 -08:00
Roxanne Skelly 1a9d19d955 Initial secapi merge
svn merge -c112450  svn+ssh://svn.lindenlab.com/svn/linden/branches/giab-viewer/giab-viewer-1 giab-viewer-1-23

svn merge -c112913  svn+ssh://svn.lindenlab.com/svn/linden/branches/giab-viewer/giab-viewer-1 giab-viewer-1-23
2009-07-03 01:05:27 +00:00