forked from soutade/libgourou
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
eab41809a0 | |||
204500117d | |||
ce2cf4192a | |||
68bf48df27 | |||
81faf1f9be | |||
f60abf04d8 |
24
README.md
24
README.md
@@ -1,16 +1,16 @@
|
||||
Introduction
|
||||
------------
|
||||
|
||||
libgourou is a free implementation of Adobe's ADEPT protocol used to add DRM on ePub/PDF files. It overcome the lacks of Adobe support for Linux platforms.
|
||||
libgourou is a free implementation of Adobe's ADEPT protocol used to add DRM on ePub/PDF files. It overcomes the lack of Adobe support for Linux platforms.
|
||||
|
||||
|
||||
Architecture
|
||||
------------
|
||||
|
||||
Like RMSDK, libgourou has a client/server scheme. All platform specific functions (crypto, network...) has to be implemented in a client class (that derives from DRMProcessorClient) while server implements ADEPT protocol.
|
||||
Like RMSDK, libgourou has a client/server scheme. All platform specific functions (crypto, network...) have to be implemented in a client class (that derives from DRMProcessorClient) while server implements ADEPT protocol.
|
||||
A reference implementation using cURL, OpenSSL and libzip is provided (in _utils_ directory).
|
||||
|
||||
Main fucntions to use from gourou::DRMProcessor are :
|
||||
Main functions to use from gourou::DRMProcessor are:
|
||||
|
||||
* Get an ePub from an ACSM file : _fulfill()_ and _download()_
|
||||
* Create a new device : _createDRMProcessor()_
|
||||
@@ -23,11 +23,11 @@ You can import configuration from (at least) :
|
||||
* Kobo device : .adept/device.xml, .adept/devicesalt and .adept/activation.xml
|
||||
* Bookeen device : .adobe-digital-editions/device.xml, root/devkey.bin and .adobe-digital-editions/activation.xml
|
||||
|
||||
Or create a new one. Be careful : there is a limited number of devices that can be created bye one account.
|
||||
Or create a new one. Be careful: there is a limited number of devices that can be created by one account.
|
||||
|
||||
ePub are encrypted using a shared key: one account / multiple devices, so you can create and register a device into your computer and read downloaded (and encrypted) ePub file with your eReader configured using the same AdobeID account.
|
||||
|
||||
For those who wants to remove DRM without adept_remove, you can export your private key and import it within [Calibre](https://calibre-ebook.com/) an its DeDRM plugin.
|
||||
For those who want to remove DRM without adept_remove, you can export your private key and import it within [Calibre](https://calibre-ebook.com/) an its DeDRM plugin.
|
||||
|
||||
|
||||
Dependencies
|
||||
@@ -150,3 +150,17 @@ Special thanks
|
||||
* _Jens_ for all test samples and utils testing
|
||||
* _Milian_ for debug & code
|
||||
* _Berwyn H_ for all test samples, feedbacks, patches and kind donation
|
||||
|
||||
|
||||
Donation
|
||||
--------
|
||||
|
||||
https://www.paypal.com/donate/?hosted_button_id=JD3U6XMZCPHKN
|
||||
|
||||
|
||||
Donators
|
||||
--------
|
||||
|
||||
* _Berwyn H_
|
||||
* _bwitt_
|
||||
* _Ismail_
|
||||
|
@@ -7,3 +7,12 @@ if [ ! -d lib/updfparser ] ; then
|
||||
make BUILD_STATIC=1 BUILD_SHARED=0
|
||||
popd
|
||||
fi
|
||||
|
||||
# OpenSSL legacy
|
||||
if [ ! -d lib/openssl ] ; then
|
||||
git clone --branch openssl-3.3 https://github.com/openssl/openssl.git lib/openssl
|
||||
pushd lib/openssl
|
||||
./Configure disable-apps disable-shared enable-legacy
|
||||
make -j4
|
||||
popd
|
||||
fi
|
||||
|
@@ -3,7 +3,7 @@
|
||||
if [ ! -d lib/updfparser ] ; then
|
||||
echo "Some libraries are missing"
|
||||
echo "You must run this script at the top of libgourou working direcotry."
|
||||
echo "./lib/setup.sh must be called first (make all)"
|
||||
echo "./scripts/setup.sh must be called first (make all)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@@ -10,6 +10,7 @@ CXXFLAGS=-Wall -fPIC -I$(ROOT)/include
|
||||
|
||||
STATIC_DEP=
|
||||
LDFLAGS += -L$(ROOT) -lcrypto -lzip -lz -lcurl -lpugixml
|
||||
LDFLAGS += -L$(ROOT) $(ROOT)/lib/openssl/libcrypto.a -lzip -lz -lcurl -lpugixml
|
||||
|
||||
ifneq ($(STATIC_UTILS),)
|
||||
STATIC_DEP = $(ROOT)/libgourou.a
|
||||
|
@@ -229,7 +229,12 @@ private:
|
||||
maxSizeBookName = loan->bookName.size();
|
||||
}
|
||||
|
||||
if (maxSizeBookName > MAX_SIZE_BOOK_NAME)
|
||||
/* Manage empty names */
|
||||
if (maxSizeBookName == 0)
|
||||
maxSizeBookName = sizeof("No name ")-1;
|
||||
else if (maxSizeBookName < 4)
|
||||
maxSizeBookName = 4;
|
||||
else if (maxSizeBookName > MAX_SIZE_BOOK_NAME)
|
||||
maxSizeBookName = MAX_SIZE_BOOK_NAME;
|
||||
else if ((maxSizeBookName % 2))
|
||||
maxSizeBookName++;
|
||||
@@ -276,7 +281,9 @@ private:
|
||||
std::cout << kv.first;
|
||||
std::cout << " ";
|
||||
|
||||
if (loan->bookName.size() > MAX_SIZE_BOOK_NAME)
|
||||
if (loan->bookName.size() == 0)
|
||||
bookName = std::string("No name ");
|
||||
else if (loan->bookName.size() > MAX_SIZE_BOOK_NAME)
|
||||
bookName = std::string(loan->bookName.c_str(), MAX_SIZE_BOOK_NAME);
|
||||
else
|
||||
bookName = loan->bookName;
|
||||
|
Reference in New Issue
Block a user