Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: mahurovihamilo on May 23, 2024, 10:52:39 PM



Title: ripem160 not working in buntu 22...
Post by: mahurovihamilo on May 23, 2024, 10:52:39 PM

Has anybody come across this issue and found a solution? I have tried every suggestion on the internet but nothing gets it to work in Ubuntu 22.

this should work, by manually anabling it, but it doesnt for me:

https://stackoverflow.com/questions/69922525/python-3-9-8-hashlib-and-ripemd160/72509045#72509045

Funny thing is, it works in Ubuntu18 ....thanks!


Title: Re: ripem160 not working in buntu 22...
Post by: achow101 on May 23, 2024, 10:56:16 PM
What OpenSSL version?


Title: Re: ripem160 not working in buntu 22...
Post by: mahurovihamilo on May 23, 2024, 11:04:44 PM
hey achow101...

OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)


I edited manually the openssl.cnf as in the tutorial:

Make sure that the config file contains following lines:

openssl_conf = openssl_init

[openssl_init]
providers = provider_sect

[provider_sect]
default = default_sect
legacy = legacy_sect

[default_sect]
activate = 1

[legacy_sect]
activate = 1


But still not working..


Title: Re: ripem160 not working in buntu 22...
Post by: achow101 on May 24, 2024, 12:30:43 AM
Where did you put the openssl.cnf file?


Title: Re: ripem160 not working in buntu 22...
Post by: mahurovihamilo on May 24, 2024, 12:50:12 AM
 According to that guide I read I edited this one:

/usr/lib/ssl/openssl.cnf


but I notice there are others:

/etc/ssl/openssl.cnf
/snap/core20/1587/etc/ssl/openssl.cnf
/snap/core20/1587/usr/lib/ssl/openssl.cnf
/snap/core20/2318/etc/ssl/openssl.cnf
/snap/core20/2318/usr/lib/ssl/openssl.cnf
/usr/lib/shim/mok/openssl.cnf
/usr/lib/ssl/openssl.cnf
/usr/share/doc/nodejs/openssl.cnf.gz
/usr/share/doc/openvpn/examples/sample-keys/openssl.cnf

I am not ot sure which one should be?




Title: Re: ripem160 not working in buntu 22...
Post by: achow101 on May 24, 2024, 01:13:44 AM
What is the result of
Code:
openssl version -d


Title: Re: ripem160 not working in buntu 22...
Post by: mahurovihamilo on May 24, 2024, 02:50:36 AM
I got this:

OPENSSLDIR: "/usr/lib/ssl"


Title: Re: ripem160 not working in buntu 22...
Post by: NotATether on May 25, 2024, 03:14:35 PM
I got this:

OPENSSLDIR: "/usr/lib/ssl"

Does openssl list -providers mention "OpenSSL Legacy Provider" somewhere?

If not, then it appears that your configuration is not taking effect.

Also you may have to restart system services or reboot the computer to apply the new openssl settings to each program.


Title: Re: ripem160 not working in buntu 22...
Post by: mahurovihamilo on May 28, 2024, 09:16:44 PM
yes it does have legacy..but still not working. This is very annoying, since I got Ubuntu18 and it does works well there...


mahuro@WorkStation:~/Desktop$ openssl list -providers
Providers:
  default
    name: OpenSSL Default Provider
    version: 3.0.2
    status: active
  legacy
    name: OpenSSL Legacy Provider
    version: 3.0.2
    status: active



Title: Re: ripem160 not working in buntu 22...
Post by: NotATether on May 30, 2024, 08:54:33 AM
Which programs are you trying to use that require the legacy provider? It is possible that they might be linked to a different version of OpenSSL.

You can check on Linux which libraries a program is linked to by running ldd $(which <program>).

For example, if you are trying to check the libraries that Python uses:

Code:
ldd $(which python)

Should print something like this:

Code:
        linux-vdso.so.1 (0x00007fff3f191000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9b72c14000)
        libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f9b72be3000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f9b72bc7000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9b7299e000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f9b73309000)

See if they are using custom versions of OpenSSL. You should see a library called libssl or something like that. A custom installation of OpenSSL will have its own configuration files.