diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp
index 84ab9b91757ce976e86df4ed6a396e7db814fbe8..a81cde31267d7f274d47dfaf869a5623764d175c 100644
--- a/indra/newview/llsechandler_basic.cpp
+++ b/indra/newview/llsechandler_basic.cpp
@@ -1153,7 +1153,7 @@ void LLBasicCertificateStore::validate(int validation_policy,
 		previous_cert = (*current_cert);
 		current_cert++;
 		depth++;
-		if(current_cert != current_cert != cert_chain->end())
+		if(current_cert != cert_chain->end())
 		{
 			(*current_cert)->getLLSD(current_cert_info);
 		}
diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp
index d1330e2270d1a0a5a80244f29bc12165615d6bd7..dfbd596d39742fb37f74e44d93e4f0d2e436f4b0 100644
--- a/indra/newview/tests/llsechandler_basic_test.cpp
+++ b/indra/newview/tests/llsechandler_basic_test.cpp
@@ -328,7 +328,8 @@ namespace tut
 		
 		ensure_equals("Der Format is correct", memcmp(buffer, mDerFormat.c_str(), mDerFormat.length()), 0);
 		
-		LLSD llsd_cert = test_cert->getLLSD();
+		LLSD llsd_cert;
+		test_cert->getLLSD(llsd_cert);
 		std::ostringstream llsd_value;
 		llsd_value << LLSDOStreamer<LLSDNotationFormatter>(llsd_cert) << std::endl;
 		std::string llsd_cert_str = llsd_value.str();
@@ -988,10 +989,11 @@ namespace tut
 					  test_chain, 
 					  validation_params);
 		// validate without the trust flag
-		test_chain->validate(0, test_store, validation_params);
+		test_store->validate(0, test_chain, validation_params);
 
 		// Test time validity
-		LLSD child_info = (*test_chain)[0]->getLLSD();
+		LLSD child_info;
+		((*test_chain)[0])->getLLSD(child_info);
 		validation_params = LLSD::emptyMap();
 		validation_params[CERT_VALIDATION_DATE] = LLDate(child_info[CERT_VALID_FROM].asDate().secondsSinceEpoch() + 1.0);  
 		test_store->validate(VALIDATION_POLICY_TIME, test_chain, validation_params);