8000 Cloning with a cert fails on Mac because objective-git is not built with OpenSSL · Issue #499 · libgit2/objective-git · GitHub
[go: up one dir, main page]

Skip to content
Cloning with a cert fails on Mac because objective-git is not built with OpenSSL #499
Closed
@jaanus

Description

@jaanus

The latest code 39e3beb fails to build with SSL on Mac, which results in this code …

NSURL *serverCertificateURL = options[GTRepositoryCloneOptionsServerCertificateURL];
if (serverCertificateURL) {
    int gitError = git_libgit2_opts(GIT_OPT_SET_SSL_CERT_LOCATIONS, serverCertificateURL.fileSystemRepresentation, NULL);
    if (gitError < GIT_OK) {
        if (error != NULL) *error = [NSError git_errorFor:gitError description:@"Failed to configure the server certificate at %@", serverCertificateURL];
        return nil;
    }
}

failing with this error:

Error Domain=GTGitErrorDomain Code=-1 "Cannot set certificate locations:
OpenSSL is not enabled" UserInfo=0x618000074500 {NSLocalizedDescription=
Cannot set certificate locations: OpenSSL is not enabled}

This error is generated by libgit2/settings.c:

int git_libgit2_opts(int key, ...)
{
    switch (key) {
    …
    case GIT_OPT_SET_SSL_CERT_LOCATIONS:
    #ifdef GIT_OPENSSL
    {
        … running with OpenSSL support, set the cert
    }
    #else
        giterr_set(GITERR_NET, "Cannot set certificate locations: OpenSSL is not enabled");
        error = -1;
    #endif
    }
…
}

A fresh vanilla clone of the repository. Xcodd 6.4, Yosemite 10.10.4. Haven’t touched any build settings or anything at all really. Should have all the required tool dependencies.

What gives?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0