Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • alchemy-archive/alchemy
  • Liru/alchemy
  • TesticularSlingshot/alchemy
3 results
Show changes
Showing
with 113 additions and 291 deletions
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<floater name="floater_merchant_outbox" title="SKRZYNKA NADAWCZA KUPCA">
<string name="OutboxFolderCountN">
Folderów: [NUM]
</string>
<string name="OutboxImporting">
Wysyłanie folderów...
</string>
<string name="OutboxInitializing">
Inicjalizacja...
</string>
<panel name="panel_1">
<panel name="panel_2">
<panel name="outbox_inventory_placeholder_panel">
<text name="outbox_inventory_placeholder_title">
Ładowanie...
</text>
</panel>
</panel>
<panel name="panel_3">
<panel name="outbox_generic_drag_target">
<text name="text_1">
Przeciągaj tu przedmioty by tworzyć foldery
</text>
</panel>
<button label="Wyślij na Marketplace" tool_tip="Wyślij na witrynę Marketplace" name="outbox_import_btn" />
</panel>
</panel>
</floater>
......@@ -159,7 +159,7 @@
<menu_item_call label="Dźwięk ([COST]L$)..." name="Upload Sound" />
<menu_item_call label="Animację ([COST]L$)..." name="Upload Animation" />
<menu_item_call label="Model meszowy..." name="Upload Model" />
<menu_item_call label="Zbiór wielu plików ([COST]L$ per file)..." name="Bulk Upload" />
<menu_item_call label="Zbiór wielu plików..." name="Bulk Upload" />
</menu>
<menu_item_call label="Cofnij" name="Undo" />
<menu_item_call label="Ponów" name="Redo" />
......
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<inventory_panel name="inventory_outbox" tool_tip="Przeciągnij i upuść tutaj przedmioty, aby przygotować je do sprzedaży na Twojej witrynie Marketplace" />
......@@ -362,11 +362,11 @@ Apenas lotes maiores podem ser listados na busca.
Foto:
</text>
<texture_picker label="" name="snapshot_ctrl" tool_tip="Clique para escolher uma imagem"/>
<text name="allow_see_label">
<text name="allow_see_label" top="170">
Avatares em outros lotes podem ver e conversar com avatares neste lote
</text>
<check_box label="Ver avatares" name="SeeAvatarsCheck" tool_tip="Permite que os avatares em outros lotes vejam e batam papo com avatares neste lote. Você poderá vê-los e conversar com eles."/>
<text name="landing_point">
<check_box label="Ver avatares" name="SeeAvatarsCheck" top="170" tool_tip="Permite que os avatares em outros lotes vejam e batam papo com avatares neste lote. Você poderá vê-los e conversar com eles."/>
<text name="landing_point" width="225">
Ponto de Aterrissagem: [LANDING]
</text>
<button label="Definir" label_selected="Definir" name="Set" tool_tip="Define o ponto de aterrissagem de visitantes. Define para o ponto em que seu avatar se encontra neste lote."/>
......
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="floater_merchant_outbox" title="CAIXA DE SAÍDA DO LOJISTA">
<string name="OutboxFolderCount1">
1 pasta
</string>
<string name="OutboxFolderCountN">
[NUM] pasta(s)
</string>
<string name="OutboxImporting">
Enviando pastas...
</string>
<string name="OutboxInitializing">
Iniciando...
</string>
<panel label="" name="panel_1">
<panel name="panel_2">
<panel name="outbox_inventory_placeholder_panel">
<text name="outbox_inventory_placeholder_title">
Carregando...
</text>
</panel>
</panel>
<panel name="panel_3">
<panel name="outbox_generic_drag_target">
<text name="text_1">
Arraste itens para cá para criar pastas
</text>
</panel>
<button label="Enviar para Mercado" name="outbox_import_btn" tool_tip="Enviar para a frente da minha loja do mercado"/>
</panel>
</panel>
</floater>
......@@ -6,7 +6,7 @@
<menu_item_call label="Animação (L$[COST])..." name="Upload Animation"/>
<menu_item_call label="Modelar..." name="Upload Model"/>
<menu_item_call label="Assistente de modelagem..." name="Upload Model Wizard"/>
<menu_item_call label="Volume (L$[COST] per file)..." name="Bulk Upload"/>
<menu_item_call label="Volume..." name="Bulk Upload"/>
<menu_item_call label="Autorizações de upload padrão" name="perm prefs"/>
</menu>
<menu_item_call label="Nova pasta" name="New Folder"/>
......
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<outbox_inventory_panel name="inventory_outbox" tool_tip="Arraste e solte os itens aqui para prepará-los para venda na frente da sua loja"/>
......@@ -338,7 +338,7 @@
<check_box label="Все" name="check other scripts" tool_tip="Если установлен флажок, то жители могут выполнять скрипты на вашем участке, включая приложения."/>
<check_box label="Группа" name="check group scripts" tool_tip="Если установлен флажок, то члены группы могут выполнять скрипты на вашем участке, включая приложения."/>
<check_box label="Безопасно (нет повреждений)" name="check safe" tool_tip="Если отмечено, то земля считается безопасной, отключены боевые повреждения. Если не отмечено, то боевые повреждения включены."/>
<check_box label="Не толкать" name="PushRestrictCheck" tool_tip="Запрещает скриптам функцию толкания. Этот параметр может оказаться полезным для предотвращения нежелательного поведения на вашей земле."/>
<check_box label="Не толкать" name="PushRestrictCheck" left_pad="44" tool_tip="Запрещает скриптам функцию толкания. Этот параметр может оказаться полезным для предотвращения нежелательного поведения на вашей земле."/>
<check_box label="Показать место в поиске (L$30/неделя)" name="ShowDirectoryCheck" tool_tip="Позволить людям видеть участок в результатах поиска"/>
<combo_box name="land category">
<combo_box.item label="Любая категория" name="item0"/>
......@@ -360,11 +360,11 @@
Снимок:
</text>
<texture_picker name="snapshot_ctrl" tool_tip="Щелкните для выбора изображения"/>
<text name="allow_see_label">
<text name="allow_see_label" left="283">
Аватары с других участков могут видеть аватары на этом участке и общаться с ними
</text>
<check_box label="Видны аватары" name="SeeAvatarsCheck" tool_tip="Аватары с других участков смогут видеть аватары на этом участке и общаться с ними в чате, а вы также сможете видеть их и общаться с ними."/>
<text name="landing_point">
<check_box label="Видны аватары" left="262" name="SeeAvatarsCheck" tool_tip="Аватары с других участков смогут видеть аватары на этом участке и общаться с ними в чате, а вы также сможете видеть их и общаться с ними."/>
<text name="landing_point" width="225">
В точку телепортации: [LANDING]
</text>
<button label="Задать" label_selected="Задать" name="Set" tool_tip="Установить точку телепортации, в которую будут прибывать посетители, Ставится в месте вашего аватара на этом участке."/>
......@@ -372,7 +372,7 @@
<text name="Teleport Routing: ">
Вариант телепортации:
</text>
<combo_box name="landing type" tool_tip="Вариант телепортации – выберите, каким образом будет производиться телепортация на вашу землю">
<combo_box name="landing type" width="150" tool_tip="Вариант телепортации – выберите, каким образом будет производиться телепортация на вашу землю">
<combo_box.item label="В черном списке" name="Blocked"/>
<combo_box.item label="В точку телепортации" name="LandingPoint"/>
<combo_box.item label="В любое место" name="Anywhere"/>
......@@ -437,7 +437,7 @@
<panel.string name="estate_override">
Часть этих параметров установлена на уровне землевладения
</panel.string>
<check_box label="Доступ открыт для всех (При снятия выделения будет создана запись в строке запрета)" name="public_access"/>
<check_box label="Доступ открыт для всех" tool_tip="При снятия выделения будет создана запись в строке запрета" name="public_access"/>
<check_box label="Должен быть 18 и старше [ESTATE_AGE_LIMIT]" name="limit_age_verified" tool_tip="Доступ к этому участку имеют только жители 18 лет и старше. Более подробная информация находится здесь: [SUPPORT_SITE]."/>
<check_box label="Информация о платежах должна быть в файле [ESTATE_PAYMENT_LIMIT]" name="limit_payment" tool_tip="Для доступа к этому участку у жителя должна быть зарегистрирована информация об оплате. Более подробная информация находится здесь: [SUPPORT_SITE]."/>
<check_box label="Разрешить группе [GROUP] без всяких ограничений" name="GroupCheck" tool_tip="Группа устанавливается на основной вкладке."/>
......
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="floater_merchant_outbox" title="ТОРГОВЫЕ ИСХОДЯЩИЕ">
<string name="OutboxFolderCount1">
1 папка
</string>
<string name="OutboxFolderCountN">
[NUM] папки
</string>
<string name="OutboxImporting">
Отправка папок....
</string>
<string name="OutboxInitializing">
Инициализация...
</string>
<panel label="" name="panel_1">
<panel name="panel_2">
<panel name="outbox_inventory_placeholder_panel">
<text name="outbox_inventory_placeholder_title">
Загрузка...
</text>
</panel>
</panel>
<panel name="panel_3">
<panel name="outbox_generic_drag_target">
<text name="text_1">
Перетаскивайте предметы для создания папок
</text>
</panel>
<button label="Отправить в торговый центр" name="outbox_import_btn" tool_tip="Выставить на витрину моего магазина"/>
</panel>
</panel>
</floater>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<outbox_inventory_panel name="inventory_outbox" tool_tip="Перетащите вещи сюда, чтобы подготовить их для размещения на витрине вашего магазина"/>
......@@ -5,15 +5,15 @@
<check_box initial_value="true" label="Воспроизводить анимацию ввода текста при общении" name="play_typing_animation"/>
<check_box label="Отправлять мне сообщения по почте, когда меня нет в сети" name="send_im_to_email"/>
<check_box label="Только друзья и группы могут звонить мне и отправлять IM" name="voice_call_friends_only_check"/>
<text name="font_size">
<text name="font_size" left="361">
Размер шрифта:
</text>
<combo_box name="chat_font_size">
<combo_box name="chat_font_size" left="361">
<item label="Мелкий" name="Small" value="0"/>
<item label="Средний" name="Medium" value="1"/>
<item label="Крупный" name="Large" value="2"/>
</combo_box>
<check_box label="Чат в пузырьках" name="bubble_text_chat"/>
<check_box label="Чат в пузырьках" name="bubble_text_chat" left_delta="19"/>
</panel>
<panel name="im_notification_settings">
<text name="friend_ims">
......
......@@ -14,7 +14,7 @@
<text name="Web:">
Браузер:
</text>
<radio_group name="preferred_browser_behavior">
<radio_group name="preferred_browser_behavior" left_delta="30">
<radio_item label="Используйте встроенный браузер для всех ссылок" name="internal" tool_tip="Будет использоваться браузер, заданный в системе по умолчанию. Не рекомендуется, если [APP_NAME] работает в полноэкранном режиме." value="0"/>
<radio_item label="Для ссылок Second Life следует использовать только встроенный браузер" name="external" tool_tip="Используйте встроенный браузер для справки, веб-ссылок и т.д. Для ссылок LindenLab/Second Life следует использовать только встроенный браузер." value="1"/>
<radio_item label="Для всех ссылок следует использовать встроенный браузер" name="external_all" tool_tip="Для просмотра справки, ссылок на веб-страницы и т. д. будет использоваться встроенный браузер. Этот браузер открывается как новое окно в [APP_NAME]." value="2"/>
......
......@@ -360,10 +360,10 @@ Sadece büyük parseller aramada görünür.
Anlık Görüntü:
</text>
<texture_picker name="snapshot_ctrl" tool_tip="Bir resim seçmek için tıklayın"/>
<text name="allow_see_label">
<text name="allow_see_label" top="170">
Diğer parsellerdeki avatarlar bu parseldeki avatarları görebilir ve onlarla sohbet edebilir
</text>
<check_box label="Avatarları Gör" name="SeeAvatarsCheck" tool_tip="Diğer parsellerdeki avatarların bu parseldeki avatarları görmesine ve onlarla sohbet etmesine, sizin de onları görüp, onlarla sohbet etmenize imkan tanır."/>
<check_box label="Avatarları Gör" name="SeeAvatarsCheck" top="170" tool_tip="Diğer parsellerdeki avatarların bu parseldeki avatarları görmesine ve onlarla sohbet etmesine, sizin de onları görüp, onlarla sohbet etmenize imkan tanır."/>
<text name="landing_point">
İniş Noktası: [LANDING]
</text>
......
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="floater_merchant_outbox" title="SATICI GİDEN KUTUSU">
<string name="OutboxFolderCount1">
1 klasör
</string>
<string name="OutboxFolderCountN">
[NUM] klasör
</string>
<string name="OutboxImporting">
Klasörler gönderiliyor...
</string>
<string name="OutboxInitializing">
Başlatılıyor...
</string>
<panel label="" name="panel_1">
<panel name="panel_2">
<panel name="outbox_inventory_placeholder_panel">
<text name="outbox_inventory_placeholder_title">
Yükleniyor...
</text>
</panel>
</panel>
<panel name="panel_3">
<panel name="outbox_generic_drag_target">
<text name="text_1">
Klasör oluşturmak için öğeleri buraya sürükleyin
</text>
</panel>
<button label="Pazaryerine Gönder" name="outbox_import_btn" tool_tip="Pazaryeri Vitrinime Gönder"/>
</panel>
</panel>
</floater>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<outbox_inventory_panel name="inventory_outbox" tool_tip="Öğeleri vitrininizde satışa hazırlamak için sürükleyip buraya bırakın"/>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="floater_merchant_outbox" title="商家發件匣">
<string name="OutboxFolderCount1">
1 個資料夾
</string>
<string name="OutboxFolderCountN">
[NUM] 個資料夾
</string>
<string name="OutboxImporting">
正在傳送資料夾…
</string>
<string name="OutboxInitializing">
正在初始化…
</string>
<panel label="" name="panel_1">
<panel name="panel_2">
<panel name="outbox_inventory_placeholder_panel">
<text name="outbox_inventory_placeholder_title">
載入中…
</text>
</panel>
</panel>
<panel name="panel_3">
<panel name="outbox_generic_drag_target">
<text name="text_1">
把物項拖曳到這裡,可建立資料夾
</text>
</panel>
<button label="送往第二人生購物市集" name="outbox_import_btn" tool_tip="推到我第二人生購物市集的店面"/>
</panel>
</panel>
</floater>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<outbox_inventory_panel name="inventory_outbox" tool_tip="將物項拖曳並置放到這裡,準備在你的商店出售"/>
......@@ -105,9 +105,13 @@ LLSD LLCredential::getLoginParams()
result["last"] ="mylast";
return result;
}
void LLCredential::identifierType(std::string &idType) { }
void LLCredential::authenticatorType(std::string &idType) { }
LLSD LLCredential::asLLSD(bool) { return LLSD(); }
void LLCredential::identifierType(std::string &idType)
{
}
void LLCredential::authenticatorType(std::string &idType)
{
}
LLNotificationPtr LLNotificationsUtil::add(const std::string& name,
const LLSD& substitutions,
......
......@@ -26,6 +26,7 @@
* $/LicenseInfo$
*/
#include "../llviewerprecompiledheaders.h"
#include "../llviewernetwork.h"
#include "../test/lltut.h"
#include "../llsecapi.h"
#include "../llsecapicerthandler.h"
......@@ -60,17 +61,23 @@ LLPointer<LLCertificate> LLSecAPIBasicCertHandler::getCertificate(X509* openssl_
LLPointer<LLCertificateChain> LLSecAPIBasicCertHandler::getCertificateChain(X509_STORE_CTX* chain) { return nullptr; }
LLPointer<LLCertificateStore> LLSecAPIBasicCertHandler::getCertificateStore(const std::string& store_id) { return nullptr; }
void LLSecAPIBasicHandler::setProtectedData(const std::string& data_type, const std::string& data_id, const LLSD& data) { }
void LLSecAPIBasicHandler::setProtectedData(const std::string& data_type, const std::string& data_id, const LLSD& data) {}
void LLSecAPIBasicHandler::addToProtectedMap(const std::string& data_type, const std::string& data_id, const std::string& map_elem, const LLSD& data) {}
void LLSecAPIBasicHandler::removeFromProtectedMap(const std::string& data_type, const std::string& data_id, const std::string& map_elem) {}
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 nullptr; }
LLPointer<LLCredential> LLSecAPIBasicHandler::loadCredential(const std::string& grid, const std::string& user_id) { return nullptr; }
LLPointer<LLCredential> LLSecAPIBasicHandler::loadCredential(const std::string& grid, const LLSD& identifier) { return nullptr; }
void LLSecAPIBasicHandler::saveCredential(LLPointer<LLCredential> cred, bool save_authenticator) { }
void LLSecAPIBasicHandler::deleteCredential(LLPointer<LLCredential> cred) { }
void LLSecAPIBasicHandler::deleteCredential(const std::string& grid, const LLSD& identifier) { }
bool LLSecAPIBasicHandler::getCredentialIdentifierList(const std::string& grid, std::vector<LLSD>& identifiers) { return true; }
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) {}
bool LLSecAPIBasicHandler::hasCredentialMap(const std::string& storage, const std::string& grid) { return false; }
bool LLSecAPIBasicHandler::emptyCredentialMap(const std::string& storage, const std::string& grid) { return false; }
void LLSecAPIBasicHandler::loadCredentialMap(const std::string& storage, const std::string& grid, credential_map_t& credential_map) {}
LLPointer<LLCredential> LLSecAPIBasicHandler::loadFromCredentialMap(const std::string& storage, const std::string& grid, const std::string& userkey) { return NULL; }
void LLSecAPIBasicHandler::addToCredentialMap(const std::string& storage, LLPointer<LLCredential> cred, bool save_authenticator) {}
void LLSecAPIBasicHandler::removeFromCredentialMap(const std::string& storage, LLPointer<LLCredential> cred) {}
void LLSecAPIBasicHandler::removeFromCredentialMap(const std::string& storage, const std::string& grid, const std::string& userkey) {}
void LLSecAPIBasicHandler::removeCredentialMap(const std::string& storage, const std::string& grid) {}
// -------------------------------------------------------------------------------------------
// TUT
......
......@@ -32,7 +32,6 @@
#include "../llsechandler_basic.h"
#include "../../llxml/llcontrol.h"
#include "../llviewernetwork.h"
#include "../llmachineid.h"
#include "llbase64.h"
#include "lluuid.h"
#include "llxorcipher.h"
......@@ -42,8 +41,15 @@
#include <openssl/pem.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include "llxorcipher.h"
#include <openssl/ossl_typ.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
#include <openssl/pem.h>
#include <openssl/asn1.h>
#include <openssl/rand.h>
#include <openssl/err.h>
#include "../llmachineid.h"
#define ensure_throws(str, exc_type, cert, func, ...) \
try \
......@@ -97,11 +103,13 @@ LLSD LLCredential::getLoginParams()
return result;
}
void LLCredential::identifierType(std::string &idType) {}
void LLCredential::authenticatorType(std::string &idType) { }
LLSD LLCredential::asLLSD(bool save_authenticator) { return LLSD(); }
/*static*/ std::string LLCredential::userIDFromIdentifier(const LLSD& sdIdentifier) { return std::string(); }
/*static*/ std::string LLCredential::usernameFromIdentifier(const LLSD& identifier) { return std::string(); }
void LLCredential::identifierType(std::string &idType)
{
}
void LLCredential::authenticatorType(std::string &idType)
{
}
LLControlGroup gSavedSettings("test");
unsigned char gMACAddress[MAC_ADDRESS_BYTES] = {77,21,46,31,89,2};
......@@ -850,94 +858,65 @@ namespace tut
ensure_equals("basic credential creation: identifier", my_id, my_cred->getIdentifier());
ensure_equals("basic credential creation: authenticator", my_authenticator, my_cred->getAuthenticator());
ensure_equals("basic credential creation: grid", "my_grid", my_cred->getGrid());
// test setting/overwriting of credential components
my_id["first_name"] = "firstname";
my_id.erase("username");
my_authenticator.erase("creds");
my_authenticator["hash"] = "6563245";
my_cred->setCredentialData(my_id, my_authenticator);
ensure_equals("set credential data: identifier", my_id, my_cred->getIdentifier());
ensure_equals("set credential data: authenticator", my_authenticator, my_cred->getAuthenticator());
ensure_equals("set credential data: grid", "my_grid", my_cred->getGrid());
ensure_equals("set credential data: grid", "my_grid", my_cred->getGrid());
// test loading of a credential, that hasn't been saved, without
// any legacy saved credential data
LLPointer<LLCredential> my_new_cred = handler->loadCredential("my_grid2", std::string("firstname"));
//ensure("unknown credential load test1", my_new_cred->getIdentifier().isMap());
ensure("unknown credential load test2", !my_new_cred->getIdentifier().has("type"));
//ensure("unknown credential load test3", my_new_cred->getAuthenticator().isMap());
ensure("unknown credential load test4", !my_new_cred->getAuthenticator().has("type"));
LLPointer<LLCredential> my_new_cred = handler->loadCredential("my_grid2");
ensure("unknown credential load test", my_new_cred->getIdentifier().isMap());
ensure("unknown credential load test", !my_new_cred->getIdentifier().has("type"));
ensure("unknown credential load test", my_new_cred->getAuthenticator().isMap());
ensure("unknown credential load test", !my_new_cred->getAuthenticator().has("type"));
// test saving of a credential
handler->saveCredential(my_cred, true);
// test loading of a known credential
my_new_cred = handler->loadCredential("my_grid", std::string("firstname"));
//ensure_equals("load a known credential: identifier", my_id, my_new_cred->getIdentifier());
//ensure_equals("load a known credential: authenticator",my_authenticator, my_new_cred->getAuthenticator());
my_new_cred = handler->loadCredential("my_grid");
ensure_equals("load a known credential: identifier", my_id, my_new_cred->getIdentifier());
ensure_equals("load a known credential: authenticator",my_authenticator, my_new_cred->getAuthenticator());
ensure_equals("load a known credential: grid", "my_grid", my_cred->getGrid());
// test deletion of a credential
handler->deleteCredential(my_new_cred);
ensure("delete credential: identifier", my_new_cred->getIdentifier().isUndefined());
ensure("delete credential: authenticator", my_new_cred->getIdentifier().isUndefined());
ensure_equals("delete credential: grid", "my_grid", my_cred->getGrid());
my_new_cred = handler->loadCredential("my_grid", std::string("firstname"));
ensure_equals("load a known credential: grid", "my_grid", my_cred->getGrid());
// test deletion of a credential by grid and identifier
LLSD my_identifier = my_new_cred->getIdentifier();
handler->deleteCredential("my_grid", my_identifier);
ensure("delete credential by id: identifier", my_new_cred->getIdentifier().isUndefined());
ensure("delete credential by id: authenticator", my_new_cred->getIdentifier().isUndefined());
ensure_equals("delete credential: grid", "my_grid", my_cred->getGrid());
ensure("delete credentialt: authenticator", my_new_cred->getIdentifier().isUndefined());
ensure_equals("delete credential: grid", "my_grid", my_cred->getGrid());
// load unknown cred
my_new_cred = handler->loadCredential("my_grid", std::string("firstname"));
//ensure("deleted credential load test1", my_new_cred->getIdentifier().isMap());
ensure("deleted credential load test2", !my_new_cred->getIdentifier().has("type"));
//ensure("deleted credential load test3", my_new_cred->getAuthenticator().isMap());
ensure("deleted credential load test4", !my_new_cred->getAuthenticator().has("type"));
}
// legacy crap
/*template<> template<>
void sechandler_basic_test_object::test<4>()
{
LLPointer<LLSecAPIBasicHandler> handler = new LLSecAPIBasicHandler("sechandler_settings.tmp", "test_password.dat");
handler->init();
LLSD my_id = LLSD::emptyMap();
LLSD my_authenticator = LLSD::emptyMap();
my_id["type"] = "test_type";
my_id["username"] = "testuser@lindenlab.com";
my_authenticator["type"] = "test_auth";
my_authenticator["creds"] = "12345";
LLPointer<LLCredential> my_cred = handler->createCredential("my_grid", my_id, my_authenticator);
LLPointer<LLCredential> my_new_cred = handler->loadCredential("my_grid2", std::string("firstname"));
my_new_cred = handler->loadCredential("my_grid");
ensure("deleted credential load test", my_new_cred->getIdentifier().isMap());
ensure("deleted credential load test", !my_new_cred->getIdentifier().has("type"));
ensure("deleted credential load test", my_new_cred->getAuthenticator().isMap());
ensure("deleted credential load test", !my_new_cred->getAuthenticator().has("type"));
// test loading of an unknown credential with legacy saved username, but without
// saved password
gFirstName = "myfirstname";
gLastName = "mylastname";
my_new_cred = handler->loadCredential("my_legacy_grid", std::string("firstname"));
//ensure_equals("legacy credential with no password: type",
// (const std::string)my_new_cred->getIdentifier()["type"], "agent");
ensure_equals("legacy credential with no password: first_name",
(const std::string)my_new_cred->getIdentifier()["first_name"], "myfirstname");
my_new_cred = handler->loadCredential("my_legacy_grid");
ensure_equals("legacy credential with no password: type",
(const std::string)my_new_cred->getIdentifier()["type"], "agent");
ensure_equals("legacy credential with no password: first_name",
(const std::string)my_new_cred->getIdentifier()["first_name"], "myfirstname");
ensure_equals("legacy credential with no password: last_name",
(const std::string)my_new_cred->getIdentifier()["last_name"], "mylastname");
(const std::string)my_new_cred->getIdentifier()["last_name"], "mylastname");
ensure("legacy credential with no password: no authenticator", my_new_cred->getAuthenticator().isUndefined());
// test loading of an unknown credential with legacy saved password and username
std::string hashed_password = "fSQcLG03eyIWJmkzfyYaKm81dSweLmsxeSAYKGE7fSQ=";
std::string hashed_password = "fSQcLG03eyIWJmkzfyYaKm81dSweLmsxeSAYKGE7fSQ=";
size_t length = LLBase64::requiredDecryptionSpace(hashed_password);
std::vector<U8> decoded_password(length);
LLBase64::decode(hashed_password, &decoded_password[0], length);
......@@ -950,40 +929,39 @@ namespace tut
llofstream password_file("test_password.dat", std::ofstream::binary);
password_file.write(reinterpret_cast<char*>(&decoded_password[0]), length);
password_file.close();
my_new_cred = handler->loadCredential("my_legacy_grid2", std::string("firstname"));
ensure_equals("legacy credential with password: type",
(const std::string)my_new_cred->getIdentifier()["type"], "agent");
ensure_equals("legacy credential with password: first_name",
(const std::string)my_new_cred->getIdentifier()["first_name"], "myfirstname");
my_new_cred = handler->loadCredential("my_legacy_grid2");
ensure_equals("legacy credential with password: type",
(const std::string)my_new_cred->getIdentifier()["type"], "agent");
ensure_equals("legacy credential with password: first_name",
(const std::string)my_new_cred->getIdentifier()["first_name"], "myfirstname");
ensure_equals("legacy credential with password: last_name",
(const std::string)my_new_cred->getIdentifier()["last_name"], "mylastname");
(const std::string)my_new_cred->getIdentifier()["last_name"], "mylastname");
LLSD legacy_authenticator = my_new_cred->getAuthenticator();
ensure_equals("legacy credential with password: type",
(std::string)legacy_authenticator["type"],
"hash");
ensure_equals("legacy credential with password: algorithm",
(std::string)legacy_authenticator["algorithm"],
"md5");
ensure_equals("legacy credential with password: algorithm",
(std::string)legacy_authenticator["secret"],
"01234567890123456789012345678901");
ensure_equals("legacy credential with password: type",
(std::string)legacy_authenticator["type"],
"hash");
ensure_equals("legacy credential with password: algorithm",
(std::string)legacy_authenticator["algorithm"],
"md5");
ensure_equals("legacy credential with password: algorithm",
(std::string)legacy_authenticator["secret"],
"01234567890123456789012345678901");
// test creation of credentials
my_cred = handler->createCredential("mysavedgrid", my_id, my_authenticator);
// test save without saving authenticator.
handler->saveCredential(my_cred, FALSE);
my_new_cred = handler->loadCredential("mysavedgrid", std::string("firstname"));
ensure_equals("saved credential without auth",
(const std::string)my_new_cred->getIdentifier()["type"], "test_type");
my_new_cred = handler->loadCredential("mysavedgrid");
ensure_equals("saved credential without auth",
(const std::string)my_new_cred->getIdentifier()["type"], "test_type");
ensure("no authenticator values were saved", my_new_cred->getAuthenticator().isUndefined());
}*/
}
// test cert vector
template<> template<>
void sechandler_basic_test_object::test<5>()
void sechandler_basic_test_object::test<4>()
{
// validate create from empty vector
LLPointer<LLBasicCertificateVector> test_vector = new LLBasicCertificateVector();
......@@ -1066,7 +1044,7 @@ namespace tut
// test cert store
template<> template<>
void sechandler_basic_test_object::test<6>()
void sechandler_basic_test_object::test<5>()
{
// validate load with nothing
LLFile::remove("mycertstore.pem");
......@@ -1119,7 +1097,7 @@ namespace tut
// cert name wildcard matching
template<> template<>
void sechandler_basic_test_object::test<7>()
void sechandler_basic_test_object::test<6>()
{
ensure("simple name match",
_cert_hostname_wildcard_match("foo", "foo"));
......@@ -1223,7 +1201,7 @@ namespace tut
// test cert chain
template<> template<>
void sechandler_basic_test_object::test<8>()
void sechandler_basic_test_object::test<7>()
{
// validate create from empty chain
LLPointer<LLBasicCertificateChain> test_chain = new LLBasicCertificateChain(NULL);
......@@ -1308,7 +1286,7 @@ namespace tut
// test cert validation
template<> template<>
void sechandler_basic_test_object::test<9>()
void sechandler_basic_test_object::test<8>()
{
// start with a trusted store with our known root cert
LLFile::remove("mycertstore.pem");
......