Revert "Remove tests that depend on TLS or X.509"

This reverts commit 9afb2e992136db3fae9a669c3faaf6d5d27602a8.

Conflicts:
* include/CMakeLists.txt
  * "Make config.h available" comment: there has been a change
    adjacent to where it was removed. Just re-add what was removed.
* tests/CMakeLists.txt:
  * compat.sh: there has been a change immediately before where it was
    removed. Just re-add what was removed.
diff --git a/tests/scripts/test-ref-configs.pl b/tests/scripts/test-ref-configs.pl
index 3dea004..956f957 100755
--- a/tests/scripts/test-ref-configs.pl
+++ b/tests/scripts/test-ref-configs.pl
@@ -9,7 +9,7 @@
 # Purpose
 #
 # For each reference configuration file in the configs directory, build the
-# configuration and run the test suites.
+# configuration, run the test suites and compat.sh
 #
 # Usage: tests/scripts/test-ref-configs.pl [config-name [...]]
 
@@ -18,16 +18,22 @@
 
 my %configs = (
     'config-default.h' => {
+        'opt' => '-f Default',
+        'compat' => '-m tls1_2 -V NO',
     },
     'config-mini-tls1_1.h' => {
+        'compat' => '-m tls1_1 -f \'^DES-CBC3-SHA$\|^TLS-RSA-WITH-3DES-EDE-CBC-SHA$\'',
     },
     'config-suite-b.h' => {
+        'compat' => "-m tls1_2 -f 'ECDHE-ECDSA.*AES.*GCM' -p mbedTLS",
     },
     'config-symmetric-only.h' => {
     },
     'config-ccm-psk-tls1_2.h' => {
+        'compat' => '-m tls1_2 -f \'^TLS-PSK-WITH-AES-...-CCM-8\'',
     },
     'config-thread.h' => {
+        'opt' => '-f ECJPAKE.*nolog',
     },
 );
 
@@ -81,6 +87,30 @@
 
     system( "CFLAGS='-Os -Werror -Wall -Wextra' make" ) and abort "Failed to build: $conf\n";
     system( "make test" ) and abort "Failed test suite: $conf\n";
+
+    my $compat = $data->{'compat'};
+    if( $compat )
+    {
+        print "\nrunning compat.sh $compat\n";
+        system( "tests/compat.sh $compat" )
+            and abort "Failed compat.sh: $conf\n";
+    }
+    else
+    {
+        print "\nskipping compat.sh\n";
+    }
+
+    my $opt = $data->{'opt'};
+    if( $opt )
+    {
+        print "\nrunning ssl-opt.sh $opt\n";
+        system( "tests/ssl-opt.sh $opt" )
+            and abort "Failed ssl-opt.sh: $conf\n";
+    }
+    else
+    {
+        print "\nskipping ssl-opt.sh\n";
+    }
 }
 
 system( "mv $config_h.bak $config_h" ) and warn "$config_h not restored\n";