@@ -335,39 +335,39 @@ JS::Result<mozilla::Ok> Backend::register_dynamic_backend(JSContext *cx, JS::Han
335
335
auto target_cstr = targetChars.get ();
336
336
if (hostOverride.has_value ()) {
337
337
backend_config_mask |= BACKEND_CONFIG_HOST_OVERRIDE;
338
- definition.host_override = ( char *) hostOverride.value ().c_str ();
338
+ definition.host_override = hostOverride.value ().c_str ();
339
339
definition.host_override_len = hostOverride.value ().length ();
340
340
} else {
341
341
definition.host_override = nullptr ;
342
342
definition.host_override_len = 0 ;
343
343
}
344
344
if (certificateHostname.has_value ()) {
345
345
backend_config_mask |= BACKEND_CONFIG_CERT_HOSTNAME;
346
- definition.cert_hostname = ( char *) certificateHostname.value ().c_str ();
346
+ definition.cert_hostname = certificateHostname.value ().c_str ();
347
347
definition.cert_hostname_len = certificateHostname.value ().length ();
348
348
} else {
349
349
definition.cert_hostname = nullptr ;
350
350
definition.cert_hostname_len = 0 ;
351
351
}
352
352
if (caCertificate.has_value ()) {
353
353
backend_config_mask |= BACKEND_CONFIG_CA_CERT;
354
- definition.ca_cert = ( char *) caCertificate.value ().c_str ();
354
+ definition.ca_cert = caCertificate.value ().c_str ();
355
355
definition.ca_cert_len = caCertificate.value ().length ();
356
356
} else {
357
357
definition.ca_cert = nullptr ;
358
358
definition.ca_cert_len = 0 ;
359
359
}
360
360
if (ciphers.has_value ()) {
361
361
backend_config_mask |= BACKEND_CONFIG_CIPHERS;
362
- definition.ciphers = ( char *) ciphers.value ().c_str ();
362
+ definition.ciphers = ciphers.value ().c_str ();
363
363
definition.ciphers_len = ciphers.value ().length ();
364
364
} else {
365
365
definition.ciphers = nullptr ;
366
366
definition.ciphers_len = 0 ;
367
367
}
368
368
if (sniHostname.has_value ()) {
369
369
backend_config_mask |= BACKEND_CONFIG_SNI_HOSTNAME;
370
- definition.sni_hostname = ( char *) sniHostname.value ().c_str ();
370
+ definition.sni_hostname = sniHostname.value ().c_str ();
371
371
definition.sni_hostname_len = sniHostname.value ().length ();
372
372
} else {
373
373
definition.sni_hostname = nullptr ;
0 commit comments