diff options
author | brad kittenbrink <brad@lindenlab.com> | 2010-07-15 11:29:55 -0700 |
---|---|---|
committer | brad kittenbrink <brad@lindenlab.com> | 2010-07-15 11:29:55 -0700 |
commit | 88edd15674ca62bcb26bd28c38bfba25ef72e90c (patch) | |
tree | ee383a3ac1f1f376afa65797454c398796fca799 /indra/newview/tests/llsecapi_test.cpp | |
parent | dee93e85601bce555784f07eb83e97aef45ec9b5 (diff) |
Fix for SNOW-742 compile & link errors under certain gcc versions due to violation of One Definition Rule.
reviewed by Moss.
Diffstat (limited to 'indra/newview/tests/llsecapi_test.cpp')
-rw-r--r-- | indra/newview/tests/llsecapi_test.cpp | 92 |
1 files changed, 16 insertions, 76 deletions
diff --git a/indra/newview/tests/llsecapi_test.cpp b/indra/newview/tests/llsecapi_test.cpp index caa1461987..8f2f299fc4 100644 --- a/indra/newview/tests/llsecapi_test.cpp +++ b/indra/newview/tests/llsecapi_test.cpp @@ -35,6 +35,7 @@ #include "../llviewernetwork.h" #include "../test/lltut.h" #include "../llsecapi.h" +#include "../llsechandler_basic.h" #include "../../llxml/llcontrol.h" @@ -56,82 +57,21 @@ std::string LLControlGroup::getString(const std::string& name) LLControlGroup gSavedSettings("test"); -class LLSecAPIBasicHandler : public LLSecAPIHandler -{ -protected: - LLPointer<LLCertificateChain> mCertChain; - LLPointer<LLCertificate> mCert; - LLPointer<LLCertificateStore> mCertStore; - LLSD mLLSD; - -public: - LLSecAPIBasicHandler() {} - - virtual ~LLSecAPIBasicHandler() {} - - // instantiate a certificate from a pem string - virtual LLPointer<LLCertificate> getCertificate(const std::string& pem_cert) - { - return mCert; - } - - - // instiate a certificate from an openssl X509 structure - virtual LLPointer<LLCertificate> getCertificate(X509* openssl_cert) - { - return mCert; - } - - - // instantiate a chain from an X509_STORE_CTX - virtual LLPointer<LLCertificateChain> getCertificateChain(const X509_STORE_CTX* chain) - { - return mCertChain; - } - - // instantiate a cert store given it's id. if a persisted version - // exists, it'll be loaded. If not, one will be created (but not - // persisted) - virtual LLPointer<LLCertificateStore> getCertificateStore(const std::string& store_id) - { - return mCertStore; - } - - // persist data in a protected store - virtual void setProtectedData(const std::string& data_type, - const std::string& data_id, - const LLSD& data) {} - - // retrieve protected data - virtual LLSD getProtectedData(const std::string& data_type, - const std::string& data_id) - { - return mLLSD; - } - - virtual void deleteProtectedData(const std::string& data_type, - const std::string& data_id) - { - } - - virtual LLPointer<LLCredential> createCredential(const std::string& grid, - const LLSD& identifier, - const LLSD& authenticator) - { - LLPointer<LLCredential> cred = NULL; - return cred; - } - - virtual LLPointer<LLCredential> loadCredential(const std::string& grid) - { - LLPointer<LLCredential> cred = NULL; - return cred; - } - - virtual void saveCredential(LLPointer<LLCredential> cred, bool save_authenticator) {} - - virtual void deleteCredential(LLPointer<LLCredential> cred) {} -}; + +LLSecAPIBasicHandler::LLSecAPIBasicHandler() {} +void LLSecAPIBasicHandler::init() {} +LLSecAPIBasicHandler::~LLSecAPIBasicHandler() {} +LLPointer<LLCertificate> LLSecAPIBasicHandler::getCertificate(const std::string& pem_cert) { return NULL; } +LLPointer<LLCertificate> LLSecAPIBasicHandler::getCertificate(X509* openssl_cert) { return NULL; } +LLPointer<LLCertificateChain> LLSecAPIBasicHandler::getCertificateChain(const X509_STORE_CTX* chain) { return NULL; } +LLPointer<LLCertificateStore> LLSecAPIBasicHandler::getCertificateStore(const std::string& store_id) { return NULL; } +void LLSecAPIBasicHandler::setProtectedData(const std::string& data_type, const std::string& data_id, const LLSD& data) {} +LLSD LLSecAPIBasicHandler::getProtectedData(const std::string& data_type, const std::string& data_id) { return LLSD(); } +void LLSecAPIBasicHandler::deleteProtectedData(const std::string& data_type, const std::string& data_id) {} +LLPointer<LLCredential> LLSecAPIBasicHandler::createCredential(const std::string& grid, const LLSD& identifier, const LLSD& authenticator) { return NULL; } +LLPointer<LLCredential> LLSecAPIBasicHandler::loadCredential(const std::string& grid) { return NULL; } +void LLSecAPIBasicHandler::saveCredential(LLPointer<LLCredential> cred, bool save_authenticator) {} +void LLSecAPIBasicHandler::deleteCredential(LLPointer<LLCredential> cred) {} // ------------------------------------------------------------------------------------------- // TUT |