networking · beginner · ~15 min
Gate on a minimum protocol version.
TLS versions are (major, minor) where TLS 1.2 is (3,3) and TLS 1.3 is (3,4). Implement int tls_version_ok(int major, int minor) returning 1 if the version is TLS 1.2 or newer (major 3 and minor >= 3), else 0.
int tls_version_ok(int major, int minor) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.