mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-10 00:28:34 +02:00
Make inspection cert work
This commit is contained in:
parent
b335ba9a75
commit
56cb98d96f
2 changed files with 20 additions and 23 deletions
|
@ -67,27 +67,25 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
onUpdateCertificateStatus: {
|
onUpdateCertificateStatus: {
|
||||||
if (root.certificateId === certID) {
|
if (certStatus === 1) { // CERTIFICATE_STATUS_VERIFICATION_SUCCESS
|
||||||
if (certStatus === 1) { // CERTIFICATE_STATUS_VERIFICATION_SUCCESS
|
// NOP
|
||||||
|
} else if (certStatus === 2) { // CERTIFICATE_STATUS_VERIFICATION_TIMEOUT
|
||||||
} else if (certStatus === 2) { // CERTIFICATE_STATUS_VERIFICATION_TIMEOUT
|
errorText.text = "Verification of this certificate timed out.";
|
||||||
errorText.text = "Verification of this certificate timed out.";
|
errorText.color = hifi.colors.redHighlight;
|
||||||
errorText.color = hifi.colors.redHighlight;
|
} else if (certStatus === 3) { // CERTIFICATE_STATUS_STATIC_VERIFICATION_FAILED
|
||||||
} else if (certStatus === 3) { // CERTIFICATE_STATUS_STATIC_VERIFICATION_FAILED
|
titleBarText.text = "Invalid Certificate";
|
||||||
titleBarText.text = "Invalid Certificate";
|
titleBarText.color = hifi.colors.redHighlight;
|
||||||
titleBarText.color = hifi.colors.redHighlight;
|
root.itemEdition = "Uncertified Copy";
|
||||||
root.itemEdition = "Uncertified Copy";
|
errorText.text = "The certificate associated with this entity is invalid.";
|
||||||
errorText.text = "The certificate associated with this entity is invalid.";
|
errorText.color = hifi.colors.redHighlight;
|
||||||
errorText.color = hifi.colors.redHighlight;
|
} else if (certStatus === 4) { // CERTIFICATE_STATUS_OWNER_VERIFICATION_FAILED
|
||||||
} else if (certStatus === 4) { // CERTIFICATE_STATUS_OWNER_VERIFICATION_FAILED
|
titleBarText.text = "Invalid Certificate";
|
||||||
titleBarText.text = "Invalid Certificate";
|
titleBarText.color = hifi.colors.redHighlight;
|
||||||
titleBarText.color = hifi.colors.redHighlight;
|
root.itemEdition = "Uncertified Copy";
|
||||||
root.itemEdition = "Uncertified Copy";
|
errorText.text = "The certificate associated with this entity is invalid.";
|
||||||
errorText.text = "The certificate associated with this entity is invalid.";
|
errorText.color = hifi.colors.redHighlight;
|
||||||
errorText.color = hifi.colors.redHighlight;
|
} else {
|
||||||
} else {
|
console.log("Unknown certificate status received from ledger signal!");
|
||||||
console.log("Unknown certificate status received from ledger signal!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -279,8 +279,7 @@ void ContextOverlayInterface::openInspectionCertificate() {
|
||||||
QUuid nodeToChallenge = entityProperties.getOwningAvatarID();
|
QUuid nodeToChallenge = entityProperties.getOwningAvatarID();
|
||||||
auto nodeList = DependencyManager::get<NodeList>();
|
auto nodeList = DependencyManager::get<NodeList>();
|
||||||
|
|
||||||
// ZRF FIXME: Don't challenge ownership of avatar entities that I own
|
if (entityProperties.getClientOnly()) {
|
||||||
if (entityProperties.getClientOnly()/* && nodeToChallenge != nodeList->getSessionUUID()*/) {
|
|
||||||
if (entityProperties.verifyStaticCertificateProperties()) {
|
if (entityProperties.verifyStaticCertificateProperties()) {
|
||||||
SharedNodePointer entityServer = nodeList->soloNodeOfType(NodeType::EntityServer);
|
SharedNodePointer entityServer = nodeList->soloNodeOfType(NodeType::EntityServer);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue