Skip to content

TypeError when OpenSSL library is not found on Windows #316

@NeuralSynth

Description

@NeuralSynth

On Windows, importing bitcoin.core.key can crash with a TypeError
when the OpenSSL library is not found.

This appears to happen because ctypes.util.find_library() may return
None on Windows, which is then passed directly to
ctypes.cdll.LoadLibrary().

Steps to reproduce

On a Windows system without OpenSSL available on PATH:

python -c "import bitcoin.core.key"

I have a small patch that adds an explicit check and raises a clearer error
on Windows instead of crashing.

Would be happy to open a PR if this approach sounds reasonable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions