Sha256: fe9d560467b0df73c0737c85e54b96cb4160e3953e56380a31e38d3163c4dd33

Contents?: true

Size: 870 Bytes

Versions: 30

Compression:

Stored size: 870 Bytes

Contents

/*
 * Copyright (C) the libgit2 contributors. All rights reserved.
 *
 * This file is part of libgit2, distributed under the GNU GPL v2 with
 * a Linking Exception. For full terms see the included COPYING file.
 */

#include "git2/errors.h"
#include "common.h"

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

static git_stream_cb tls_ctor;

int git_stream_register_tls(git_stream_cb ctor)
{
	tls_ctor = ctor;

	return 0;
}

int git_tls_stream_new(git_stream **out, const char *host, const char *port)
{

	if (tls_ctor)
		return tls_ctor(out, host, port);

#ifdef GIT_SECURE_TRANSPORT
	return git_stransport_stream_new(out, host, port);
#elif defined(GIT_OPENSSL)
	return git_openssl_stream_new(out, host, port);
#else
	GIT_UNUSED(out);
	GIT_UNUSED(host);
	GIT_UNUSED(port);

	giterr_set(GITERR_SSL, "there is no TLS stream available");
	return -1;
#endif
}

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
rugged-0.26.7 vendor/libgit2/src/tls_stream.c
rugged-0.26.6 vendor/libgit2/src/tls_stream.c
rugged-0.26.3 vendor/libgit2/src/tls_stream.c
rugged-0.26.0 vendor/libgit2/src/tls_stream.c
rugged-0.26.0b5 vendor/libgit2/src/tls_stream.c
rugged-0.26.0b4 vendor/libgit2/src/tls_stream.c
rugged-0.26.0b3 vendor/libgit2/src/tls_stream.c
rugged-0.26.0b2 vendor/libgit2/src/tls_stream.c
rugged-0.26.0b1 vendor/libgit2/src/tls_stream.c
rugged-0.25.1.1 vendor/libgit2/src/tls_stream.c
rugged-0.24.6.1 vendor/libgit2/src/tls_stream.c
rugged-0.25.1 vendor/libgit2/src/tls_stream.c
rugged-0.24.5 vendor/libgit2/src/tls_stream.c
rugged-0.25.0 vendor/libgit2/src/tls_stream.c
rugged-0.25.0b10 vendor/libgit2/src/tls_stream.c
rugged-0.25.0b9 vendor/libgit2/src/tls_stream.c
rugged-0.25.0b8 vendor/libgit2/src/tls_stream.c
rugged-0.25.0b7 vendor/libgit2/src/tls_stream.c
rugged-0.25.0b6 vendor/libgit2/src/tls_stream.c
rugged-0.25.0b5 vendor/libgit2/src/tls_stream.c