ekollof / gentlsa

Tool for DANE/TLSA (with Cloudflare API support)
Other
16 stars 4 forks source link

M2Crypto not working on Windows? #1

Closed RafaelDeJongh closed 4 years ago

RafaelDeJongh commented 4 years ago

So I've tried this both on the latest and an older 2.7 release of Python but both version end up with M2Crypto not being able to work and therefor the tool not working.

I've tried with using command prompt, powershell, gitbash, Ubuntu terminal, pretty much any terminal where I could run python with but all gave errors, compatibility error, copying error or something else.

As this image below:

error

Is there something I can do against this to actually make it work on Windows, or is this something that should be run on the server or a linux machine?

In general when I did got something running I also got always the following error:

[sandhi1q@www99 .dane]$ python gentlsa.py generate rafaeldejongh.com 443
  File "gentlsa.py", line 45
    print(f"Exception: Connection error: {ex}")
                                             ^
SyntaxError: invalid syntax

Thanks in advance for further information.

ekollof commented 4 years ago

My script does NOT work with python 2, and you shouldn't be using python 2 anyway.

The M2crypto build issue is not related to my program. Try the devs of M2crypto.

I'll add a comment in the README about that.

RafaelDeJongh commented 4 years ago

My script does NOT work with python 2, and you shouldn't be using python 2 anyway.

The M2crypto build issue is not related to my program. Try the devs of M2crypto.

I'll add a comment in the README about that.

As mentioned I've tried it both on 3 and 2.7 as the M2crypt referred to 2.7 related stuff rather than 3.

With either version of python I'm getting similar errors. And well as your script relies on that build which errors out on it I somewhere do think it might be good to look into this together than just pointing fingers to other devs to get something 'fixed'?

The general fact remains that your script doesn't function on whatever version of python using the required modules in your list.

ekollof commented 4 years ago

I don't know about you but:

magrathea:gentlsa:% python --version                                                          <master ✗>
Python 3.8.0
magrathea:gentlsa:% ./gentlsa.py verify hackerheaven.org 443                                  <master ✗>
OK - TLSA is valid
magrathea:gentlsa:%                                                                           <master ✗>

It seems to work fine for me. Tried it on several other hosts, and works there too. I can't fix m2crypto for you, as I don't use Windows. Their repository is at https://gitlab.com/m2crypto/m2crypto/issues, maybe you should raise an issue there?