Skip to content

vtls: add a MesaLink vtls backend - #2984

Closed
ymjing wants to merge 4 commits into
curl:masterfrom
mesalock-linux:master
Closed

ymjing wants to merge 4 commits into
curl:masterfrom
mesalock-linux:master

Conversation

@ymjing

@ymjing ymjing commented Sep 12, 2018

Copy link
Copy Markdown
Contributor

Squashed from PR #2874 and rebased on commit 92f9db1

MesaLink is a TLS library written in 100% Rust, a programming
language that guarantees memory safety. This PR adds MesaLink as a vtls
backend for curl.

@ymjing

ymjing commented Sep 12, 2018 •

Copy link
Copy Markdown
Contributor Author

Hi @bagder, here are the squashed commits for the MesaLink vtls backend.

The "localhost-hack" for SNI is now for CURLDEBUG-builds only:

curl/lib/vtls/mesalink.c

Lines 204 to 223 in 0e828be

else {
#ifdef CURLDEBUG
/* Check if the hostname is 127.0.0.1 or [::1];
* otherwise reject because MesaLink always wants a valid DNS Name
* specified in RFC 5280 Section 7.2 */
if(strncmp(hostname, "127.0.0.1", 9) == 0
#ifdef ENABLE_IPV6
|| strncmp(hostname, "[::1]", 5) == 0
#endif
) {
SSL_set_tlsext_host_name(BACKEND->handle, "localhost");
}
else
#endif
{
failf(data,
"ERROR: MesaLink does not accept an IP address as a hostname\n");
return CURLE_SSL_CONNECT_ERROR;
}
}

@bagder bagder left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bagder bagder closed this in 57348eb Sep 13, 2018
@bagder

bagder commented Sep 13, 2018

Copy link
Copy Markdown
Member

Thanks @kevinis. Nice work! Merged now.

@lock lock Bot locked as resolved and limited conversation to collaborators Dec 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants