OpenSSL crypto provider: fix crash during DSA key generation

Fixes xtest 4007.1 to 4007.10.