To determine whether a server was compiled using OpenSSL, test the
existence of any of those variables. For example, this statement
returns a row if OpenSSL was used and an empty result if yaSSL was
used:

SHOW STATUS LIKE 'Rsa_public_key';

Such tests assume that your server version is not older than the
first appearance of the variable tested. For example, you cannot
test for Rsa_public_key before
MySQL 5.6.6, when that variable was added.