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

Skip to content

Commit c700d04

Browse files
committed
Cleanups for mbedTLS changes
Separated for review; squash before merging. - Undo unrelated whitespace changes - Fix indentation - Remove commented-out code - Simplify preprocessor conditionals
1 parent 5cd095b commit c700d04

File tree

4 files changed

+4
-13
lines changed

4 files changed

+4
-13
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ IF(MSVC)
8888
ENDIF()
8989

9090
IF (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
91-
OPTION( USE_OPENSSL "Link with and use openssl library" ON )
91+
OPTION( USE_OPENSSL "Link with and use openssl library" ON )
9292
ENDIF()
9393

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

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

115115
IF (NOT USE_OPENSSL)

src/mbedtls_stream.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ int git_mbedtls_stream_global_init(void)
6969
int ret, isdir;
7070
char *crtpath;
7171
struct stat statbuf;
72-
// const int *cipherids;
73-
// const char *ciphers = git_libgit2__ssl_ciphers();
7472

7573
mbedtls_ctr_drbg_context *ctr_drbg;
7674

@@ -160,12 +158,6 @@ int git_mbedtls_stream_global_init(void)
160158
}
161159
}
162160

163-
// set the list of allowed ciphersuites
164-
// if (!ciphers) {
165-
// cipherids = mbedtls_ssl_list_ciphersuites();
166-
// }
167-
// mbedtls_ssl_conf_ciphersuites(git__ssl_conf, cipherids);
168-
169161
git__on_shutdown(shutdown_ssl);
170162

171163
return 0;
@@ -480,4 +472,3 @@ int git_mbedtls_stream_new(git_stream **out, const char *host, const char *port)
480472
}
481473

482474
#endif
483-

src/tls_stream.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ int git_tls_stream_new(git_stream **out, const char *host, const char *port)
3232
#elif defined(GIT_OPENSSL)
3333
return git_openssl_stream_new(out, host, port);
3434
#elif defined(GIT_MBEDTLS)
35-
return git_mbedtls_stream_new(out, host, port);
35+
return git_mbedtls_stream_new(out, host, port);
3636
#else
3737
GIT_UNUSED(out);
3838
GIT_UNUSED(host);

tests/core/stream.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ void test_core_stream__register_tls(void)
3838
* with Security framework).
3939
*/
4040
#if defined(GIT_WIN32) || \
41-
(!defined(GIT_SECURE_TRANSPORT) && !(defined(GIT_OPENSSL) || defined(GIT_MBEDTLS)))
41+
(!defined(GIT_SECURE_TRANSPORT) && !defined(GIT_OPENSSL) && !defined(GIT_MBEDTLS))
4242
cl_git_fail_with(-1, error);
4343
#else
4444
cl_git_pass(error);

0 commit comments

Comments
 (0)