Ssl: key validation: use -module, not -check

Version 1.62.0

Bugfix
Finished

DirectAdmin was validating ssl keys using: /usr/bin/openssl rsa -check -noout < key It was found that on CentOS 7, some cases did not return 0, even though the key was valid: RSA key ok 140085668738960:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:tasn_dec.c:1239: 140085668738960:error:0D06C03A:asn1 encoding routines:ASN1_D2I_EX_PRIMITIVE:nested asn1 error:tasn_dec.c:807: 140085668738960:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:739:Field=n, Type=RSA 140085668738960:error:04093004:rsa routines:OLD_RSA_PRIV_DECODE:RSA lib:rsa_ameth.c:121: # echo $? 1 We've changed the validation to simply get the modulus: /usr/bin/openssl rsa -modulus -noout < key which did return a zero exit code. ---- Related error message in DA after pasting in the key/cert: Cannot Execute Your Request Details Key is Invalid ---- T32024

Interested to try DirectAdmin? Get a 30-day Free Trial!