# Use another SNI - the server certificate should be generated and different
# than the default one
client c6 -connect ${h1_clearlst_sock} {
- txreq -url "/P-384" -hdr "x-sni: unknown-sni.com"
+ txreq -url "/P-384" -hdr "x-sni: sni-longer-sni-longer-sni-longer-sni-longer-than-64-bytes-unknown-sni.com"
rxresp
expect resp.status == 200
expect resp.http.x-ssl-sig_alg == "ecdsa-with-SHA256"
/* Set the subject name using the same, but the CN */
name = X509_NAME_dup(name);
- if (X509_NAME_add_entry_by_txt(name, "CN", MBSTRING_ASC,
- (const unsigned char *)servername,
- -1, -1, 0) != 1) {
- X509_NAME_free(name);
- goto mkcert_error;
+
+ if (strlen(servername) <= 64) {
+ if (X509_NAME_add_entry_by_txt(name, "CN", MBSTRING_ASC,
+ (const unsigned char *)servername,
+ -1, -1, 0) != 1) {
+ X509_NAME_free(name);
+ goto mkcert_error;
+ }
}
if (X509_set_subject_name(newcrt, name) != 1) {
X509_NAME_free(name);