Compare commits

..

No commits in common. "v0.8.6" and "v0.8.4" have entirely different histories.

3 changed files with 7 additions and 12 deletions

View File

@ -37,7 +37,7 @@
#define ACS_SERVER "http://adeactivate.adobe.com/adept" #define ACS_SERVER "http://adeactivate.adobe.com/adept"
#endif #endif
#define LIBGOUROU_VERSION "0.8.6" #define LIBGOUROU_VERSION "0.8.3"
namespace gourou namespace gourou
{ {

View File

@ -1317,7 +1317,6 @@ namespace gourou
std::vector<uPDFParser::Object*> objects = parser.objects(); std::vector<uPDFParser::Object*> objects = parser.objects();
std::vector<uPDFParser::Object*>::iterator it; std::vector<uPDFParser::Object*>::iterator it;
std::vector<uPDFParser::Object*>::reverse_iterator rIt; std::vector<uPDFParser::Object*>::reverse_iterator rIt;
std::vector<uPDFParser::Object*> ebxObjects;
unsigned char decryptedKey[16]; unsigned char decryptedKey[16];
int ebxId; int ebxId;
@ -1328,7 +1327,7 @@ namespace gourou
{ {
EBXHandlerFound = true; EBXHandlerFound = true;
uPDFParser::Object* ebx = *rIt; uPDFParser::Object* ebx = *rIt;
ebxVersion = (uPDFParser::Integer*)(*ebx)["V"]; ebxVersion = (uPDFParser::Integer*)(*ebx)["V"];
if (ebxVersion->value() != 4) if (ebxVersion->value() != 4)
{ {
@ -1339,7 +1338,7 @@ namespace gourou
{ {
EXCEPTION(DRM_ERR_ENCRYPTION_KEY, "No ADEPT_LICENSE found"); EXCEPTION(DRM_ERR_ENCRYPTION_KEY, "No ADEPT_LICENSE found");
} }
uPDFParser::String* licenseObject = (uPDFParser::String*)(*ebx)["ADEPT_LICENSE"]; uPDFParser::String* licenseObject = (uPDFParser::String*)(*ebx)["ADEPT_LICENSE"];
std::string value = licenseObject->value(); std::string value = licenseObject->value();
@ -1376,7 +1375,7 @@ namespace gourou
if (object->objectId() == ebxId) if (object->objectId() == ebxId)
{ {
ebxObjects.push_back(object); // object->deleteKey("Filter");
continue; continue;
} }
@ -1486,9 +1485,6 @@ namespace gourou
} }
} }
for(it = ebxObjects.begin(); it != ebxObjects.end(); it++)
parser.removeObject(*it);
uPDFParser::Object& trailer = parser.getTrailer(); uPDFParser::Object& trailer = parser.getTrailer();
trailer.deleteKey("Encrypt"); trailer.deleteKey("Encrypt");

View File

@ -298,15 +298,14 @@ std::string DRMProcessorClientImpl::sendHTTPRequest(const std::string& URL, cons
} }
curl_slist_free_all(list); curl_slist_free_all(list);
long http_code = 400;
curl_easy_getinfo (curl, CURLINFO_RESPONSE_CODE, &http_code);
curl_easy_cleanup(curl); curl_easy_cleanup(curl);
if (res != CURLE_OK) if (res != CURLE_OK)
EXCEPTION(gourou::CLIENT_NETWORK_ERROR, "Error " << curl_easy_strerror(res)); EXCEPTION(gourou::CLIENT_NETWORK_ERROR, "Error " << curl_easy_strerror(res));
long http_code = 400;
curl_easy_getinfo (curl, CURLINFO_RESPONSE_CODE, &http_code);
if (http_code >= 400) if (http_code >= 400)
EXCEPTION(gourou::CLIENT_HTTP_ERROR, "HTTP Error code " << http_code); EXCEPTION(gourou::CLIENT_HTTP_ERROR, "HTTP Error code " << http_code);