8000 Remove “skip certificate check” option · libgit2/objective-git@d2bdd34 · GitHub
[go: up one dir, main page]

Skip to content

Commit d2bdd34

Browse files
committed
Remove “skip certificate check” option
The libgit2 facility for skipping certificate checks was removed and replaced with a much more general—but harder to use—API, so it’s easier to remove this for now. See the libgit2 CHANGELOG for more information.
1 parent f1e9dc9 commit d2bdd34

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

Classes/GTRepository.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,7 @@ typedef NS_OPTIONS(NSInteger, GTCheckoutNotifyFlags) {
8181

8282
/// Transport flags sent as options to +cloneFromURL... method
8383
typedef NS_OPTIONS(NSInteger, GTTransportFlags) {
84-
GTTransportFlagsNone = GIT_TRANSPORTFLAGS_NONE,
85-
// If you pass this flag and the connection is secured with SSL/TLS,
86-
// the authenticity of the server certificate will not be verified.
87-
GTTransportFlagsNoCheckCert = GIT_TRANSPORTFLAGS_NO_CHECK_CERT,
84+
GTTransportFlagsNone = GIT_TRANSPORTFLAGS_NONE
8885
};
8986

9087
/// An `NSNumber` wrapped `GTTransportFlags`, documented above.

Classes/GTRepository.m

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -196,15 +196,11 @@ static int remoteCreate(git_remote **remote, git_repository *repo, const char *n
196196
if ((error = git_remote_create(remote, repo, name, url)) < 0)
197197
return error;
198198

199-
if (pld->ignoreCertErrors)
200-
git_remote_check_cert(*remote, !pld->ignoreCertErrors);
201-
202199
return git_remote_set_callbacks(*remote, callbacks);
203200
}
204201

205202
struct GTRemoteCreatePayload {
206203
git_remote_callbacks remoteCallbacks;
207-
BOOL ignoreCertErrors;
208204
};
209205

210206
+ (id)cloneFromURL:(NSURL *)originURL toWorkingDirectory:(NSURL *)workdirURL options:(NSDictionary *)options error:(NSError **)error transferProgressBlock:(void (^)(const git_transfer_progress *))transferProgressBlock checkoutProgressBlock:(void (^)(NSString *path, NSUInteger completedSteps, NSUInteger totalSteps))checkoutProgressBlock {
@@ -240,12 +236,9 @@ + (id)cloneFromURL:(NSURL *)originURL toWorkingDirectory:(NSURL *)workdirURL opt
240236

241237
cloneOptions.remote_callbacks.transfer_progress = transferProgressCallback;
242238
cloneOptions.remote_callbacks.payload = &payload;
243-
244-
NSNumber *transportFlags = options[GTRepositoryCloneOptionsTransportFlags];
245239

246240
struct GTRemoteCreatePayload remoteCreatePayload;
247241
remoteCreatePayload.remoteCallbacks = cloneOptions.remote_callbacks;
248-
remoteCreatePayload.ignoreCertErrors = (transportFlags == nil ? 0 : 1);
249242

250243
cloneOptions.remote_cb = remoteCreate;
251244
cloneOptions.remote_cb_payload = &remoteCreatePayload;

0 commit comments

Comments
 (0)
0