hash-slinger icon indicating copy to clipboard operation
hash-slinger copied to clipboard

Replace M2Crypto

Open bgermann opened this issue 1 year ago • 11 comments

Please replace M2Crypto. It is now in maintainance mode and the project officially recommends cryptography.

bgermann avatar Jul 19 '24 15:07 bgermann

This is going to be an issue for the Fedora package as well, as m2crypto it has been orphaned, and will be dropped for a future release (probably F42). That will cause hash-slinger to fail to build, and hence will not be available.

frankcrawford avatar Aug 21 '24 08:08 frankcrawford

PR's are welcome. I personally do not have the resources to work on this.

paulwouters avatar Aug 22 '24 14:08 paulwouters

Same for me. I'd only go for that change when SUSE drops m2crpyto, so that may be some time. I'd help with an PR in case of problems, but currently won't spent the time to do that change myself.

stoecker avatar Aug 22 '24 14:08 stoecker

Just as a note for rawhide (F42) now lists hash-slinger as fail to build.

frankcrawford avatar Oct 12 '24 11:10 frankcrawford

Stopped working on NixOS too

onny avatar Nov 19 '24 09:11 onny

Any updates on this, otherwise for Fedora I'm going to knock out tlsa as I think it is the only function using m2crypto.

frankcrawford avatar May 19 '25 11:05 frankcrawford

OTOH tlsa is also the most important...

stoecker avatar May 19 '25 11:05 stoecker

Arguably, yes, although currently it won't install on a number of OS and no one looks to be willing to fix the issue.

Unfortunately, I'm a packager not really a programmer so don't really know what to do for a fix.

frankcrawford avatar May 19 '25 11:05 frankcrawford

What about a patch which will issue a warning like "tlsa needs to change m2crypto to crypthography" when the tool is called?

diff --git a/tlsa b/tlsa
index 18bf424..274dc3e 100755
--- a/tlsa
+++ b/tlsa
@@ -31,7 +31,12 @@ import socket
 import unbound
 import subprocess
 import re
-from M2Crypto import X509, SSL, BIO, m2
+try:
+  from M2Crypto import X509, SSL, BIO, m2
+except:
+  print('The tlsa tool needs to change m2crypto to crypthography to work again')
+  exit(20)
+
 from binascii import b2a_hex
 from hashlib import sha256, sha512
 from ipaddress import IPv4Address, IPv6Address

stoecker avatar May 19 '25 12:05 stoecker

Haa, that was almost exactly what I was planning to add, although it doesn't really help it get fixed. At least it with some right packaging efforts, it will at least allow it to install.

frankcrawford avatar May 19 '25 23:05 frankcrawford

not sure that is useful. I will see about getting it fixed.

paulwouters avatar May 20 '25 13:05 paulwouters