Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
introduced GIT_MBEDTLS symbol
  • Loading branch information
wildart committed Oct 9, 2015
commit b79ecc4149c4c3032b2c1e57215df7d7de4034f9
3 changes: 3 additions & 0 deletions src/tls_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "common.h"

#include "openssl_stream.h"
#include "mbedtls_stream.h"
#include "stransport_stream.h"

int git_tls_stream_new(git_stream **out, const char *host, const char *port)
Expand All @@ -17,6 +18,8 @@ int git_tls_stream_new(git_stream **out, const char *host, const char *port)
return git_stransport_stream_new(out, host, port);
#elif defined(GIT_OPENSSL)
return git_openssl_stream_new(out, host, port);
#elif defined(GIT_MBEDTLS)
return git_mbedtls_stream_new(out, host, port);
#else
GIT_UNUSED(out);
GIT_UNUSED(host);
Expand Down
2 changes: 1 addition & 1 deletion src/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ static transport_definition local_transport_definition = { "file://", git_transp
static transport_definition transports[] = {
{ "git://", git_transport_smart, &git_subtransport_definition },
{ "http://", git_transport_smart, &http_subtransport_definition },
#if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT)
#if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT) || defined(GIT_MBEDTLS)
{ "https://", git_transport_smart, &http_subtransport_definition },
#endif
{ "file://", git_transport_local, NULL },
Expand Down
2 changes: 1 addition & 1 deletion src/transports/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ static int http_connect(http_subtransport *t)

error = git_stream_connect(t->io);

#if defined(GIT_OPENSSL) || defined(GIT_SECURE_TRANSPORT) || defined(GIT_CURL)
#if defined(GIT_OPENSSL) || defined(GIT_SECURE_TRANSPORT) || defined(GIT_CURL) || defined(GIT_MBEDTLS)
if ((!error || error == GIT_ECERTIFICATE) && t->owner->certificate_check_cb != NULL &&
git_stream_is_encrypted(t->io)) {
git_cert *cert;
Expand Down
2 changes: 1 addition & 1 deletion tests/online/badssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

static git_repository *g_repo;

#if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT)
#if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT) || defined(GIT_MBEDTLS)

void test_online_badssl__expired(void)
{
Expand Down