@@ -64,6 +64,7 @@ anon_wolfssl_pid=$no_pid
6464wolf_cases_tested=0
6565wolf_cases_total=0
6666counter=0
67+ wolfssl_no_resume=" "
6768testing_summary=" OpenSSL Interop Testing Summary:\nVersion\tTested\t#Found\t#wolf\t#Found\t#OpenSSL\n"
6869versionName=" Invalid"
6970if [ " $OPENSSL " = " " ]; then
@@ -328,6 +329,10 @@ do_wolfssl_client() {
328329 then
329330 wolfssl_resume=
330331 fi
332+ if [ " $wolfssl_no_resume " = " yes" ]
333+ then
334+ wolfssl_resume=
335+ fi
331336 if [ " $version " != " 5" -a " $version " != " " ]
332337 then
333338 echo " #"
@@ -516,6 +521,19 @@ then
516521 if [ " $wolf_rsa " != " " ]; then
517522 echo " wolfSSL supports RSA"
518523 fi
524+ # Check if RSA-PSS certificates supported in wolfSSL
525+ wolf_rsapss=` $WOLFSSL_CLIENT -A " ${CERT_DIR} /rsapss/ca-rsapss.pem" 2>&1 `
526+ case $wolf_rsapss in
527+ * " ca file" * )
528+ echo " wolfSSL does not support RSA-PSS"
529+ wolf_rsapss=" "
530+ ;;
531+ * )
532+ ;;
533+ esac
534+ if [ " $wolf_rsapss " != " " ]; then
535+ echo " wolfSSL supports RSA-PSS"
536+ fi
519537 # Check if ECC certificates supported in wolfSSL
520538 wolf_ecc=` $WOLFSSL_CLIENT -A " ${CERT_DIR} /ca-ecc-cert.pem" 2>&1 `
521539 case $wolf_ecc in
@@ -1228,6 +1246,49 @@ do
12281246done
12291247IFS=" $OIFS " # restore separator
12301248
1249+ # Skip RSA-PSS interop test when RSA-PSS is not supported
1250+ if [ " $wolf_rsapss " != " " -a " $ecdhe_avail " = " yes" -a " $wolf_rsa " = " yes" ]
1251+ then
1252+ # Test for RSA-PSS certs interop
1253+ # Was running into alert sent by openssl server with version 1.1.1 released
1254+ # in Sep 2018. To avoid this issue check that openssl version 3.0.0 or later
1255+ # is used.
1256+
1257+ $OPENSSL version | awk ' {print $2}' | \
1258+ awk -F. ' {if ($1 >= 3) exit 1; else exit 0;}'
1259+ RESULT=$?
1260+ if [ " $RESULT " = " 0" ]; then
1261+ echo -e " Old version of openssl detected, skipping interop RSA-PSS test"
1262+ else
1263+ echo -e " Doing interop RSA-PSS test"
1264+
1265+ key_file=${CERT_DIR} /rsapss/server-rsapss-priv.pem
1266+ cert_file=${CERT_DIR} /rsapss/server-rsapss.pem
1267+ ca_file=${CERT_DIR} /client-cert.pem
1268+ openssl_suite=" RSAPSS"
1269+ start_openssl_server
1270+
1271+ cert=" ${CERT_DIR} /client-cert.pem"
1272+ key=" ${CERT_DIR} /client-key.pem"
1273+ caCert=" ${CERT_DIR} /rsapss/ca-rsapss.pem"
1274+ crl=" -C"
1275+ wolfSuite=" ALL"
1276+ wolfssl_no_resume=" yes"
1277+ port=$server_port
1278+
1279+ if [ " $wolf_tls13 " != " " ]
1280+ then
1281+ version=" 4"
1282+ do_wolfssl_client
1283+ fi
1284+
1285+ if [ " $wolf_tls " != " " ]
1286+ then
1287+ version=" 3"
1288+ do_wolfssl_client
1289+ fi
1290+ fi
1291+ fi
12311292do_cleanup
12321293
12331294echo -e " wolfSSL total cases $wolf_cases_total "
0 commit comments