From fd3628ef45a8160f2434e0d8b747d31d65685340 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 14 Apr 2017 16:05:59 -0400 Subject: 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, 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. --- indra/llcorehttp/httpcommon.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'indra/llcorehttp') diff --git a/indra/llcorehttp/httpcommon.h b/indra/llcorehttp/httpcommon.h index b2db01d038..d715fea78f 100644 --- a/indra/llcorehttp/httpcommon.h +++ b/indra/llcorehttp/httpcommon.h @@ -188,6 +188,7 @@ /// #include "linden_common.h" // Modifies curl/curl.h interfaces +#include "llsd.h" #include "boost/intrusive_ptr.hpp" #include "boost/shared_ptr.hpp" #include "boost/weak_ptr.hpp" @@ -447,14 +448,14 @@ struct HttpStatus mDetails->mMessage = message; } - /// Retrieves an optionally recorded SSL certificate. - void * getErrorData() const + /// Retrieves data about an optionally recorded SSL certificate. + LLSD getErrorData() const { return mDetails->mErrorData; } /// Optionally sets an SSL certificate on this status. - void setErrorData(void *data) + void setErrorData(LLSD data) { mDetails->mErrorData = data; } @@ -467,7 +468,7 @@ private: mType(type), mStatus(status), mMessage(), - mErrorData(NULL) + mErrorData() {} Details(const Details &rhs) : @@ -485,7 +486,7 @@ private: type_enum_t mType; short mStatus; std::string mMessage; - void * mErrorData; + LLSD mErrorData; }; boost::shared_ptr
mDetails; -- cgit v1.2.3