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
Cleanups for mbedTLS changes
Separated for review; squash before merging.

- Undo unrelated whitespace changes
- Fix indentation
- Remove commented-out code
- Simplify preprocessor conditionals
  • Loading branch information
joshtriplett committed Sep 25, 2016
commit 77cdc581c2a675bc3162479f5596e57d9c1ca13a
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ IF(MSVC)
ENDIF()

IF (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
OPTION( USE_OPENSSL "Link with and use openssl library" ON )
OPTION( USE_OPENSSL "Link with and use openssl library" ON )
ENDIF()

CHECK_STRUCT_HAS_MEMBER ("struct stat" st_mtim "sys/types.h;sys/stat.h"
Expand All @@ -109,7 +109,7 @@ ELSE ()
ENDIF()

IF (HAVE_STRUCT_STAT_NSEC OR WIN32)
OPTION( USE_NSEC "Care about sub-second file mtimes and ctimes" ON )
OPTION( USE_NSEC "Care about sub-second file mtimes and ctimes" ON )
ENDIF()

IF (NOT USE_OPENSSL)
Expand Down
9 changes: 0 additions & 9 deletions src/mbedtls_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ int git_mbedtls_stream_global_init(void)
int ret, isdir;
char *crtpath;
struct stat statbuf;
// const int *cipherids;
// const char *ciphers = git_libgit2__ssl_ciphers();

mbedtls_ctr_drbg_context *ctr_drbg;

Expand Down Expand Up @@ -160,12 +158,6 @@ int git_mbedtls_stream_global_init(void)
}
}

// set the list of allowed ciphersuites
// if (!ciphers) {
// cipherids = mbedtls_ssl_list_ciphersuites();
// }
// mbedtls_ssl_conf_ciphersuites(git__ssl_conf, cipherids);

git__on_shutdown(shutdown_ssl);

return 0;
Expand Down Expand Up @@ -480,4 +472,3 @@ int git_mbedtls_stream_new(git_stream **out, const char *host, const char *port)
}

#endif

2 changes: 1 addition & 1 deletion src/tls_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ int git_tls_stream_new(git_stream **out, const char *host, const char *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);
return git_mbedtls_stream_new(out, host, port);
#else
GIT_UNUSED(out);
GIT_UNUSED(host);
Expand Down
2 changes: 1 addition & 1 deletion tests/core/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void test_core_stream__register_tls(void)
* with Security framework).
*/
#if defined(GIT_WIN32) || \
(!defined(GIT_SECURE_TRANSPORT) && !(defined(GIT_OPENSSL) || defined(GIT_MBEDTLS)))
(!defined(GIT_SECURE_TRANSPORT) && !defined(GIT_OPENSSL) && !defined(GIT_MBEDTLS))
cl_git_fail_with(-1, error);
#else
cl_git_pass(error);
Expand Down