mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
Add selfsigned certificates support to Robust and osGetLinkInventoryKeys plus some fixes
This commit is contained in:
committed by
UbitUmarov
parent
c2c3ca418a
commit
ac9ed3d5d1
@@ -2481,7 +2481,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
{
|
||||
UserAgentServiceConnector userConnection = new(serverURI);
|
||||
|
||||
if (userConnection is not null)
|
||||
if (userConnection is not null && serverURI.StartsWith("http://"))
|
||||
{
|
||||
userID = userConnection.GetUUID(realFirstName, realLastName);
|
||||
if (!userID.IsZero())
|
||||
@@ -2490,6 +2490,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return userID.ToString();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Override hardcoded http in Util.ParseForeignAvatarName
|
||||
string SSLserverURI = serverURI.Replace("http://", "https://");
|
||||
userConnection = new(SSLserverURI);
|
||||
if (userConnection is not null)
|
||||
{
|
||||
userID = userConnection.GetUUID(realFirstName, realLastName);
|
||||
if (!userID.IsZero())
|
||||
{
|
||||
userManager.AddUser(userID, realFirstName, realLastName, SSLserverURI);
|
||||
return userID.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception /*e*/)
|
||||
{
|
||||
@@ -5561,6 +5576,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return LSL_String.NullKey;
|
||||
}
|
||||
|
||||
public LSL_List osGetLinkInventoryKeys(LSL_Integer linkNumber, LSL_Integer type)
|
||||
{
|
||||
LSL_List ret = new();
|
||||
|
||||
SceneObjectPart part = GetSingleLinkPart(linkNumber);
|
||||
if(part == null)
|
||||
return ret;
|
||||
|
||||
part.TaskInventory.LockItemsForRead(true);
|
||||
foreach (KeyValuePair<UUID, TaskInventoryItem> inv in part.TaskInventory)
|
||||
{
|
||||
if (inv.Value.Type == type || type == -1 &&
|
||||
(inv.Value.CurrentPermissions
|
||||
& (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify))
|
||||
== (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify))
|
||||
ret.Add(inv.Value.AssetID.ToString());
|
||||
}
|
||||
|
||||
part.TaskInventory.LockItemsForRead(false);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public LSL_Key osGetLinkInventoryItemKey(LSL_Integer linkNumber, LSL_String name)
|
||||
{
|
||||
SceneObjectPart part = GetSingleLinkPart(linkNumber);
|
||||
|
||||
Reference in New Issue
Block a user