txreq
rxresp
expect resp.status == 200
- expect resp.http.x-ssl-fc-curve-name == "X25519"
- expect resp.http.x-ssl-bc-curve-name == "X25519"
+ expect resp.http.x-ssl-fc-curve-name ~ "^[Xx]25519$"
+ expect resp.http.x-ssl-bc-curve-name ~ "^[Xx]25519$"
} -run
} -start
+# P-256 names differ between the native group-name and NID-based APIs.
client c1 -connect ${h1_clearlst_sock} {
txreq -url "/X25519"
rxresp
- expect resp.http.x-curve == X25519
+ expect resp.http.x-curve ~ "^[Xx]25519$"
expect resp.status == 200
} -run
client c1 -connect ${h1_clearlst_sock} {
txreq -url "/P-256"
rxresp
- expect resp.http.x-curve ~ (SECP256R1|prime256v1)
+ expect resp.http.x-curve ~ "^(secp256r1|prime256v1)$"
expect resp.status == 200
} -run
client c1 -connect ${h1_clearlst_sock} {
txreq -url "/P-384"
rxresp
- expect resp.http.x-curve ~ (SECP384R1|secp384r1)
+ expect resp.http.x-curve == secp384r1
expect resp.status == 200
} -run
client c3 -connect ${h1_clearlst_sock} {
txreq -url "/wrong-be1"
rxresp
- expect resp.http.x-curve == X25519
+ expect resp.http.x-curve ~ "^[Xx]25519$"
expect resp.status == 200
} -run
client c3 -connect ${h1_clearlst_sock} {
txreq -url "/wrong-be1"
rxresp
- expect resp.http.x-curve ~ (SECP384R1|secp384r1)
+ expect resp.http.x-curve == secp384r1
expect resp.status == 200
} -run
*/
# if (HA_OPENSSL_VERSION_NUMBER >= 0x3020000fL)
curve_name = (char *)SSL_get0_group_name(ssl);
- if (curve_name == NULL) {
+ if (curve_name == NULL)
return 0;
- } else {
- /*
- * The curve name returned by SSL_get0_group_name is in lowercase whereas the curve
- * name returned when we use `SSL_get_negotiated_group` and `OBJ_nid2sn` is the
- * short name and is in upper case. To make the return value consistent across the
- * different functional calls and to make it consistent while upgrading OpenSSL versions,
- * will convert the curve name returned by SSL_get0_group_name to upper case.
- */
- int i;
-
- for (i = 0; curve_name[i]; i++)
- curve_name[i] = toupper((unsigned char)curve_name[i]);
- }
# elif defined(OPENSSL_IS_AWSLC) && AWSLC_API_VERSION < 35
group = SSL_get_group_id(ssl);