Changeset 137506


Ignore:
Timestamp:
Jun 13, 2015, 10:40:29 AM (4 years ago)
Author:
cal@…
Message:

certsync: Fix build with Apple GCC 4.2 at the expense of some warnings on modern platforms, closes #48028

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/security/certsync/files/certsync.m

    r136959 r137506  
    108108 */
    109109static BOOL GetCertSubject(SecCertificateRef cert, CFStringRef *subject, NSError **subjectError) {
    110     if (&SecCertificateCopyShortDescription != NULL /* 10.7 */) {
     110    if (SecCertificateCopyShortDescription != NULL /* 10.7 */) {
    111111        *subject = PLCFAutorelease(SecCertificateCopyShortDescription(NULL, cert, (CFErrorRef *) subjectError));
    112112        return YES;
    113113    }
    114114
    115     if (&SecCertificateCopySubjectSummary   != NULL /* 10.6 */) {
     115    if (SecCertificateCopySubjectSummary   != NULL /* 10.6 */) {
    116116        *subject = PLCFAutorelease(SecCertificateCopySubjectSummary(cert));
    117117        return YES;
    118118    }
    119119
    120     if (&SecCertificateCopyCommonName       != NULL /* 10.5 */) {
     120    if (SecCertificateCopyCommonName       != NULL /* 10.5 */) {
    121121        OSStatus err;
    122122        if ((err = SecCertificateCopyCommonName(cert, subject)) == errSecSuccess && *subject != NULL) {
     
    159159    {
    160160        SecPolicyRef policy;
    161         if (&SecPolicyCreateBasicX509 != NULL) /* >= 10.6 */ {
     161        if (SecPolicyCreateBasicX509 != NULL) /* >= 10.6 */ {
    162162            policy = SecPolicyCreateBasicX509();
    163163        } else /* < 10.6 */ {
     
    266266
    267267    /* Mac OS X >= 10.5 provides SecTrustSettingsCopyCertificates() */
    268     if (&SecTrustSettingsCopyCertificates != NULL) {
     268    if (SecTrustSettingsCopyCertificates != NULL) {
    269269        /* Fetch all certificates in the given domain */
    270270        err = SecTrustSettingsCopyCertificates(domain, &certs);
     
    409409         * ValidateSystemTrust to use the user's keychain */
    410410        if ((err = SecKeychainSetPreferenceDomain(kSecPreferencesDomainUser)) != errSecSuccess) {
    411             if (&SecCopyErrorMessageString != NULL) {
     411            if (SecCopyErrorMessageString != NULL) {
    412412                /* >= 10.5 */
    413413                CFStringRef errMsg = PLCFAutorelease(SecCopyErrorMessageString(err, NULL));
     
    435435    /* Causes ValidateSystemTrust to ignore the user's keychain */
    436436    if ((err = SecKeychainSetPreferenceDomain(kSecPreferencesDomainSystem)) != errSecSuccess) {
    437         if (&SecCopyErrorMessageString != NULL) {
     437        if (SecCopyErrorMessageString != NULL) {
    438438            /* >= 10.5 */
    439439            CFStringRef errMsg = PLCFAutorelease(SecCopyErrorMessageString(err, NULL));
     
    490490    /* Prefer the non-deprecated SecItemExport on Mac OS X >= 10.7. We use an ifdef to keep the code buildable with earlier SDKs, too. */
    491491    nsfprintf(stderr, @"Exporting certificates from the keychain\n");
    492     if (&SecItemExport != NULL) {
     492    if (SecItemExport != NULL) {
    493493        err = SecItemExport((CFArrayRef) anchors, kSecFormatPEMSequence, kSecItemPemArmour, NULL, &pemData);
    494494    } else {
Note: See TracChangeset for help on using the changeset viewer.