Skip to content

Commit a3bc7c9

Browse files
committed
tests: relocate TLS 1.2 mutual-auth tests to avoid merge collision
The two new tests (test_tls12_ecdhe_ecdsa_rsa_client_cert and test_tls12_ecdhe_rsa_ecdsa_client_cert) were appended right after test_wolfSSL_alert_desc_string, the last function in test_tls.c. Another in-flight branch appends its own new tests at the same anchor, producing a spurious add/add merge conflict even though the additions are independent. Move these two functions just above test_wolfSSL_alert_desc_string so the two branches insert at different locations and merge cleanly. Pure code movement; no behavior change.
1 parent fdda31b commit a3bc7c9

1 file changed

Lines changed: 40 additions & 40 deletions

File tree

tests/api/test_tls.c

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,46 +1180,6 @@ int test_tls12_peerauth_failsafe(void)
11801180
return EXPECT_RESULT();
11811181
}
11821182

1183-
int test_wolfSSL_alert_desc_string(void)
1184-
{
1185-
EXPECT_DECLS;
1186-
#if !defined(NO_TLS) && defined(OPENSSL_EXTRA)
1187-
ExpectStrEQ(wolfSSL_alert_desc_string(close_notify), "CN");
1188-
ExpectStrEQ(wolfSSL_alert_desc_string(unexpected_message), "UM");
1189-
ExpectStrEQ(wolfSSL_alert_desc_string(bad_record_mac), "BM");
1190-
ExpectStrEQ(wolfSSL_alert_desc_string(record_overflow), "RO");
1191-
ExpectStrEQ(wolfSSL_alert_desc_string(decompression_failure), "DF");
1192-
ExpectStrEQ(wolfSSL_alert_desc_string(handshake_failure), "HF");
1193-
ExpectStrEQ(wolfSSL_alert_desc_string(no_certificate), "NC");
1194-
ExpectStrEQ(wolfSSL_alert_desc_string(bad_certificate), "BC");
1195-
ExpectStrEQ(wolfSSL_alert_desc_string(unsupported_certificate), "UC");
1196-
ExpectStrEQ(wolfSSL_alert_desc_string(certificate_revoked), "CR");
1197-
ExpectStrEQ(wolfSSL_alert_desc_string(certificate_expired), "CE");
1198-
ExpectStrEQ(wolfSSL_alert_desc_string(certificate_unknown), "CU");
1199-
ExpectStrEQ(wolfSSL_alert_desc_string(illegal_parameter), "IP");
1200-
ExpectStrEQ(wolfSSL_alert_desc_string(unknown_ca), "CA");
1201-
ExpectStrEQ(wolfSSL_alert_desc_string(access_denied), "AD");
1202-
ExpectStrEQ(wolfSSL_alert_desc_string(decode_error), "DE");
1203-
ExpectStrEQ(wolfSSL_alert_desc_string(decrypt_error), "DC");
1204-
ExpectStrEQ(wolfSSL_alert_desc_string(wolfssl_alert_protocol_version), "PV");
1205-
ExpectStrEQ(wolfSSL_alert_desc_string(insufficient_security), "IS");
1206-
ExpectStrEQ(wolfSSL_alert_desc_string(internal_error), "IE");
1207-
ExpectStrEQ(wolfSSL_alert_desc_string(inappropriate_fallback), "IF");
1208-
ExpectStrEQ(wolfSSL_alert_desc_string(user_canceled), "US");
1209-
ExpectStrEQ(wolfSSL_alert_desc_string(no_renegotiation), "NR");
1210-
ExpectStrEQ(wolfSSL_alert_desc_string(missing_extension), "ME");
1211-
ExpectStrEQ(wolfSSL_alert_desc_string(unsupported_extension), "UE");
1212-
ExpectStrEQ(wolfSSL_alert_desc_string(unrecognized_name), "UN");
1213-
ExpectStrEQ(wolfSSL_alert_desc_string(bad_certificate_status_response), "BR");
1214-
ExpectStrEQ(wolfSSL_alert_desc_string(unknown_psk_identity), "UP");
1215-
ExpectStrEQ(wolfSSL_alert_desc_string(certificate_required), "CQ");
1216-
ExpectStrEQ(wolfSSL_alert_desc_string(no_application_protocol), "AP");
1217-
/* Unknown alert description returns "UK" */
1218-
ExpectStrEQ(wolfSSL_alert_desc_string(255), "UK");
1219-
#endif
1220-
return EXPECT_RESULT();
1221-
}
1222-
12231183
/* TLS 1.2 mutual auth: an ECDHE-ECDSA server (ECDSA certificate) accepting an
12241184
* RSA client certificate. */
12251185
int test_tls12_ecdhe_ecdsa_rsa_client_cert(void)
@@ -1329,3 +1289,43 @@ int test_tls12_ecdhe_rsa_ecdsa_client_cert(void)
13291289
#endif
13301290
return EXPECT_RESULT();
13311291
}
1292+
1293+
int test_wolfSSL_alert_desc_string(void)
1294+
{
1295+
EXPECT_DECLS;
1296+
#if !defined(NO_TLS) && defined(OPENSSL_EXTRA)
1297+
ExpectStrEQ(wolfSSL_alert_desc_string(close_notify), "CN");
1298+
ExpectStrEQ(wolfSSL_alert_desc_string(unexpected_message), "UM");
1299+
ExpectStrEQ(wolfSSL_alert_desc_string(bad_record_mac), "BM");
1300+
ExpectStrEQ(wolfSSL_alert_desc_string(record_overflow), "RO");
1301+
ExpectStrEQ(wolfSSL_alert_desc_string(decompression_failure), "DF");
1302+
ExpectStrEQ(wolfSSL_alert_desc_string(handshake_failure), "HF");
1303+
ExpectStrEQ(wolfSSL_alert_desc_string(no_certificate), "NC");
1304+
ExpectStrEQ(wolfSSL_alert_desc_string(bad_certificate), "BC");
1305+
ExpectStrEQ(wolfSSL_alert_desc_string(unsupported_certificate), "UC");
1306+
ExpectStrEQ(wolfSSL_alert_desc_string(certificate_revoked), "CR");
1307+
ExpectStrEQ(wolfSSL_alert_desc_string(certificate_expired), "CE");
1308+
ExpectStrEQ(wolfSSL_alert_desc_string(certificate_unknown), "CU");
1309+
ExpectStrEQ(wolfSSL_alert_desc_string(illegal_parameter), "IP");
1310+
ExpectStrEQ(wolfSSL_alert_desc_string(unknown_ca), "CA");
1311+
ExpectStrEQ(wolfSSL_alert_desc_string(access_denied), "AD");
1312+
ExpectStrEQ(wolfSSL_alert_desc_string(decode_error), "DE");
1313+
ExpectStrEQ(wolfSSL_alert_desc_string(decrypt_error), "DC");
1314+
ExpectStrEQ(wolfSSL_alert_desc_string(wolfssl_alert_protocol_version), "PV");
1315+
ExpectStrEQ(wolfSSL_alert_desc_string(insufficient_security), "IS");
1316+
ExpectStrEQ(wolfSSL_alert_desc_string(internal_error), "IE");
1317+
ExpectStrEQ(wolfSSL_alert_desc_string(inappropriate_fallback), "IF");
1318+
ExpectStrEQ(wolfSSL_alert_desc_string(user_canceled), "US");
1319+
ExpectStrEQ(wolfSSL_alert_desc_string(no_renegotiation), "NR");
1320+
ExpectStrEQ(wolfSSL_alert_desc_string(missing_extension), "ME");
1321+
ExpectStrEQ(wolfSSL_alert_desc_string(unsupported_extension), "UE");
1322+
ExpectStrEQ(wolfSSL_alert_desc_string(unrecognized_name), "UN");
1323+
ExpectStrEQ(wolfSSL_alert_desc_string(bad_certificate_status_response), "BR");
1324+
ExpectStrEQ(wolfSSL_alert_desc_string(unknown_psk_identity), "UP");
1325+
ExpectStrEQ(wolfSSL_alert_desc_string(certificate_required), "CQ");
1326+
ExpectStrEQ(wolfSSL_alert_desc_string(no_application_protocol), "AP");
1327+
/* Unknown alert description returns "UK" */
1328+
ExpectStrEQ(wolfSSL_alert_desc_string(255), "UK");
1329+
#endif
1330+
return EXPECT_RESULT();
1331+
}

0 commit comments

Comments
 (0)