Re: ssh-keygen freezes if you force use of engine

2019-11-07 Thread Jordan Brown
On 11/6/2019 11:42 PM, Frederick Gotham wrote: > Jordan Brown wrote: > >> Note that __pthread_once_slow is in the stack twice, called from >> OPENSSL_init_crypto and CRYPTO_THREAD_run_once. >> >> "once" functions ensure that they call their function argument exactly >> once, even if they are called

Re: ssh-keygen freezes if you force use of engine

2019-11-06 Thread Frederick Gotham
Jordan Brown wrote: > Note that __pthread_once_slow is in the stack twice, called from > OPENSSL_init_crypto and CRYPTO_THREAD_run_once. > > "once" functions ensure that they call their function argument exactly > once, even if they are called multiple times in parallel while their > function is

Re: ssh-keygen freezes if you force use of engine

2019-11-06 Thread Jordan Brown
On 11/6/2019 3:03 AM, Frederick Gotham wrote: >> I used GDB on the core file and saw the following backtrace: > > I think I'm actually getting a stack overflow from "openssl_config_int" > calling "OPENSSL_init_crypto" because of the recursion. No, a stack overflow would be much deeper. > #0 0x0

Re: ssh-keygen freezes if you force use of engine

2019-11-06 Thread Frederick Gotham
> My temporary solution is to link "ssh-keygen" statically with a normal > version of "libcrypto.a", and then have every other program link > dynamically with my altered version of "libcrypto.so". > > I'll at least see if that works. Yeah the problem is **definitely** that the function "OPEN

Re: ssh-keygen freezes if you force use of engine

2019-11-06 Thread Frederick Gotham
Dmitry Belyavsky wrote in news:CADqLbz+6WbCpday_1Gq-Zmst1y-17Hbc1S9OvYtE4=b=njp...@mail.gmail.com: > Could you please reproduce this behavior without your patches? > > On Wed, Nov 6, 2019 at 2:04 PM Frederick Gotham > wrote: > >> >> >> > I used GDB on the core file and saw the following backt

Re: ssh-keygen freezes if you force use of engine

2019-11-06 Thread Dmitry Belyavsky
Could you please reproduce this behavior without your patches? On Wed, Nov 6, 2019 at 2:04 PM Frederick Gotham wrote: > > > > I used GDB on the core file and saw the following backtrace: > > > I think I'm actually getting a stack overflow from "openssl_config_int" > calling "OPENSSL_init_crypto"

Re: ssh-keygen freezes if you force use of engine

2019-11-06 Thread Frederick Gotham
> I used GDB on the core file and saw the following backtrace: I think I'm actually getting a stack overflow from "openssl_config_int" calling "OPENSSL_init_crypto" because of the recursion.

ssh-keygen freezes if you force use of engine

2019-11-06 Thread Frederick Gotham
I have edited the source code for OpenSSL in the init functions so that the config file always gets loaded. My config file specifies a custom engine, so this means that every process that links with "libssl.so" or "libcrypto.so" will use my custom engine. The problem I'm having is that my dev