Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions indra/newview/llsecapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,16 @@ void LLCredential::authenticatorType(std::string &idType)
}
}

LLCertException::LLCertException(const LLSD& cert_data, const std::string& msg)
LLCertException::LLCertException(const LLSD& cert_data, const std::string& msg, bool suppress_warning)
: LLException(msg),
mCertData(cert_data)
{
LL_WARNS("SECAPI") << "Certificate Error: " << msg << LL_ENDL;
if (!suppress_warning)
{
LL_WARNS("SECAPI") << "Certificate Error: " << msg << LL_ENDL;
}
else
{
LL_DEBUGS("SECAPI") << "Certificate Error: " << msg << LL_ENDL;
}
}
14 changes: 5 additions & 9 deletions indra/newview/llsecapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,6 @@
VALIDATION_POLICY_CA_KU)






struct LLProtectedDataException: public LLException
{
LLProtectedDataException(const std::string& msg):
Expand Down Expand Up @@ -217,10 +213,10 @@ class LLCertificateVector : public LLThreadSafeRefCount
// return the number of certs in the store
virtual int size() const = 0;

// append the cert to the store. if a copy of the cert already exists in the store, it is removed first
// append the cert to the store. If the certificate already exists in the store, nothing is done.
virtual void add(LLPointer<LLCertificate> cert)=0;

// insert the cert to the store. if a copy of the cert already exists in the store, it is removed first
// insert the cert to the store. If the certificate already exists in the store, nothing is done.
virtual void insert(iterator location, LLPointer<LLCertificate> cert)=0;

// remove a certificate from the store
Expand Down Expand Up @@ -338,7 +334,7 @@ std::ostream& operator <<(std::ostream& s, const LLCredential& cred);
class LLCertException: public LLException
{
public:
LLCertException(const LLSD& cert_data, const std::string& msg);
LLCertException(const LLSD& cert_data, const std::string& msg, bool suppress_warning = false);
virtual ~LLCertException() throw() {}
LLSD getCertData() const { return mCertData; }
protected:
Expand Down Expand Up @@ -392,8 +388,8 @@ class LLCertValidationHostnameException : public LLCertException
class LLCertValidationExpirationException : public LLCertException
{
public:
LLCertValidationExpirationException(const LLSD& cert_data,
LLDate current_time) : LLCertException(cert_data, "CertExpired")
LLCertValidationExpirationException(const LLSD& cert_data, LLDate current_time, bool suppress_warning = false) :
LLCertException(cert_data, "CertExpired", suppress_warning)
{
mTime = current_time;
}
Expand Down
Loading
Loading