diff options
author | Leyla Farazha <leyla@lindenlab.com> | 2010-06-02 11:09:17 -0700 |
---|---|---|
committer | Leyla Farazha <leyla@lindenlab.com> | 2010-06-02 11:09:17 -0700 |
commit | 28d23e8c85ba6073cffbd3597342c43f4f9c7971 (patch) | |
tree | 8e817fa78c67ffe686d57f4889016623dfeffab2 /indra/newview/llsechandler_basic.h | |
parent | b742f0c2a4cf1355044fbcebdad4346a4871a89b (diff) | |
parent | 4835c615d5a00f146bcd5c7a50153418ce2a3613 (diff) |
Merge
Diffstat (limited to 'indra/newview/llsechandler_basic.h')
-rw-r--r-- | indra/newview/llsechandler_basic.h | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/indra/newview/llsechandler_basic.h b/indra/newview/llsechandler_basic.h index 4bbb73f062..356ea7efcb 100644 --- a/indra/newview/llsechandler_basic.h +++ b/indra/newview/llsechandler_basic.h @@ -59,12 +59,13 @@ public: virtual std::string getPem() const; virtual std::vector<U8> getBinary() const; - virtual LLSD getLLSD() const; + virtual void getLLSD(LLSD &llsd); virtual X509* getOpenSSLX509() const; // set llsd elements for testing void setLLSD(const std::string name, const LLSD& value) { mLLSDInfo[name] = value; } + protected: // certificates are stored as X509 objects, as validation and @@ -116,6 +117,8 @@ public: virtual bool equals(const LLPointer<iterator_impl>& _iter) const { const BasicIteratorImpl *rhs_iter = dynamic_cast<const BasicIteratorImpl *>(_iter.get()); + llassert(rhs_iter); + if (!rhs_iter) return 0; return (mIter == rhs_iter->mIter); } virtual LLPointer<LLCertificate> get() @@ -173,8 +176,21 @@ public: // return the store id virtual std::string storeId() const; + // validate a certificate chain against a certificate store, using the + // given validation policy. + virtual void validate(int validation_policy, + LLPointer<LLCertificateChain> ca_chain, + const LLSD& validation_params); + protected: - std::vector<LLPointer<LLCertificate> >mCerts; + std::vector<LLPointer<LLCertificate> > mCerts; + + // cache of cert sha1 hashes to from/to date pairs, to improve + // performance of cert trust. Note, these are not the CA certs, + // but the certs that have been validated against this store. + typedef std::map<std::string, std::pair<LLDate, LLDate> > t_cert_cache; + t_cert_cache mTrustedCertCache; + std::string mFilename; }; @@ -189,11 +205,6 @@ public: virtual ~LLBasicCertificateChain() {} - // validate a certificate chain against a certificate store, using the - // given validation policy. - virtual void validate(int validation_policy, - LLPointer<LLCertificateStore> ca_store, - const LLSD& validation_params); }; |