forked from soutade/libgourou
Register operatorURL only when certificate from operator is fetched
This commit is contained in:
parent
fd38e84da6
commit
69865e005b
|
@ -398,31 +398,7 @@ namespace gourou
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
doOperatorAuth(operatorURL);
|
doOperatorAuth(operatorURL);
|
||||||
|
|
||||||
// Add new operatorURL to list
|
|
||||||
pugi::xml_document activationDoc;
|
|
||||||
user->readActivation(activationDoc);
|
|
||||||
|
|
||||||
pugi::xml_node root;
|
|
||||||
pugi::xpath_node xpathRes = activationDoc.select_node("//adept:operatorURLList");
|
|
||||||
|
|
||||||
// Create adept:operatorURLList if it doesn't exists
|
|
||||||
if (!xpathRes)
|
|
||||||
{
|
|
||||||
xpathRes = activationDoc.select_node("/activationInfo");
|
|
||||||
root = xpathRes.node();
|
|
||||||
root = root.append_child("adept:operatorURLList");
|
|
||||||
root.append_attribute("xmlns:adept") = ADOBE_ADEPT_NS;
|
|
||||||
|
|
||||||
appendTextElem(root, "adept:user", user->getUUID());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
root = xpathRes.node();
|
|
||||||
|
|
||||||
appendTextElem(root, "adept:operatorURL", operatorURL);
|
|
||||||
|
|
||||||
user->updateActivationFile(activationDoc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DRMProcessor::buildFulfillRequest(pugi::xml_document& acsmDoc, pugi::xml_document& fulfillReq)
|
void DRMProcessor::buildFulfillRequest(pugi::xml_document& acsmDoc, pugi::xml_document& fulfillReq)
|
||||||
|
@ -492,6 +468,24 @@ namespace gourou
|
||||||
appendTextElem(root, "adept:licenseURL", licenseURL);
|
appendTextElem(root, "adept:licenseURL", licenseURL);
|
||||||
appendTextElem(root, "adept:certificate", certificate);
|
appendTextElem(root, "adept:certificate", certificate);
|
||||||
|
|
||||||
|
// Add new operatorURL to list
|
||||||
|
xpathRes = activationDoc.select_node("//adept:operatorURLList");
|
||||||
|
|
||||||
|
// Create adept:operatorURLList if it doesn't exists
|
||||||
|
if (!xpathRes)
|
||||||
|
{
|
||||||
|
xpathRes = activationDoc.select_node("/activationInfo");
|
||||||
|
root = xpathRes.node();
|
||||||
|
root = root.append_child("adept:operatorURLList");
|
||||||
|
root.append_attribute("xmlns:adept") = ADOBE_ADEPT_NS;
|
||||||
|
|
||||||
|
appendTextElem(root, "adept:user", user->getUUID());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
root = xpathRes.node();
|
||||||
|
|
||||||
|
appendTextElem(root, "adept:operatorURL", operatorURL);
|
||||||
|
|
||||||
user->updateActivationFile(activationDoc);
|
user->updateActivationFile(activationDoc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user