Giter Club home page Giter Club logo

Comments (2)

apprenticeharper avatar apprenticeharper commented on June 21, 2024

The crash appears to have happened in the libcrypto library that's supplied with DeDRM. The source is included in the DeDRM_plugin zip, so I suggest you recompile it under Ubuntu 15.10.

I wonder what's changed in Ubuntu 15.10 that's caused the error?

from dedrm_tools.

sebreit avatar sebreit commented on June 21, 2024

After trying several things (recompile DeDRM, install Calibre from source etc.) I found that in fact it was the key, which I have used at least for two years without problems. After extracting it once more from Adobe Digital editions using the latest DeDRM tools, everything works fine again.

To prevent calibre from crashing with corrupted keys maybe you could add an additional key check in ineptepub.py like so:

    class RSA(object):
        def __init__(self, der):
            buf = create_string_buffer(der)
            pp = c_char_pp(cast(buf, c_char_p))
            rsa = self._rsa = d2i_RSAPrivateKey(None, pp, len(der)) 
            if rsa is None:
                raise ADEPTError('Error parsing ADEPT user key DER')

            # check if pointer is not NULL
            try:
                c = self._rsa.contents
            except ValueError:   
                raise ADEPTError('Error parsing ADEPT user key DER')

        def decrypt(self, from_):

Edit:
... or simpler:

    class RSA(object):
        def __init__(self, der):
            buf = create_string_buffer(der)
            pp = c_char_pp(cast(buf, c_char_p))
            rsa = self._rsa = d2i_RSAPrivateKey(None, pp, len(der)) 
            if not rsa:
                raise ADEPTError('Error parsing ADEPT user key DER')

        def decrypt(self, from_):

from dedrm_tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.