[137506] trunk/dports/security/certsync/files/certsync.m
cal at macports.org
cal at macports.org
Sat Jun 13 03:40:29 PDT 2015
Revision: 137506
https://trac.macports.org/changeset/137506
Author: cal at macports.org
Date: 2015-06-13 03:40:29 -0700 (Sat, 13 Jun 2015)
Log Message:
-----------
certsync: Fix build with Apple GCC 4.2 at the expense of some warnings on modern platforms, closes #48028
Modified Paths:
--------------
trunk/dports/security/certsync/files/certsync.m
Modified: trunk/dports/security/certsync/files/certsync.m
===================================================================
--- trunk/dports/security/certsync/files/certsync.m 2015-06-13 10:07:15 UTC (rev 137505)
+++ trunk/dports/security/certsync/files/certsync.m 2015-06-13 10:40:29 UTC (rev 137506)
@@ -107,17 +107,17 @@
* @return BOOL indicating whether this system supports retrieving CNs from certificates
*/
static BOOL GetCertSubject(SecCertificateRef cert, CFStringRef *subject, NSError **subjectError) {
- if (&SecCertificateCopyShortDescription != NULL /* 10.7 */) {
+ if (SecCertificateCopyShortDescription != NULL /* 10.7 */) {
*subject = PLCFAutorelease(SecCertificateCopyShortDescription(NULL, cert, (CFErrorRef *) subjectError));
return YES;
}
- if (&SecCertificateCopySubjectSummary != NULL /* 10.6 */) {
+ if (SecCertificateCopySubjectSummary != NULL /* 10.6 */) {
*subject = PLCFAutorelease(SecCertificateCopySubjectSummary(cert));
return YES;
}
- if (&SecCertificateCopyCommonName != NULL /* 10.5 */) {
+ if (SecCertificateCopyCommonName != NULL /* 10.5 */) {
OSStatus err;
if ((err = SecCertificateCopyCommonName(cert, subject)) == errSecSuccess && *subject != NULL) {
PLCFAutorelease(*subject);
@@ -158,7 +158,7 @@
SecTrustRef trust;
{
SecPolicyRef policy;
- if (&SecPolicyCreateBasicX509 != NULL) /* >= 10.6 */ {
+ if (SecPolicyCreateBasicX509 != NULL) /* >= 10.6 */ {
policy = SecPolicyCreateBasicX509();
} else /* < 10.6 */ {
SecPolicySearchRef searchRef = NULL;
@@ -265,7 +265,7 @@
OSStatus err;
/* Mac OS X >= 10.5 provides SecTrustSettingsCopyCertificates() */
- if (&SecTrustSettingsCopyCertificates != NULL) {
+ if (SecTrustSettingsCopyCertificates != NULL) {
/* Fetch all certificates in the given domain */
err = SecTrustSettingsCopyCertificates(domain, &certs);
if (err == errSecSuccess) {
@@ -408,7 +408,7 @@
/* Set the keychain preference domain to user, this causes
* ValidateSystemTrust to use the user's keychain */
if ((err = SecKeychainSetPreferenceDomain(kSecPreferencesDomainUser)) != errSecSuccess) {
- if (&SecCopyErrorMessageString != NULL) {
+ if (SecCopyErrorMessageString != NULL) {
/* >= 10.5 */
CFStringRef errMsg = PLCFAutorelease(SecCopyErrorMessageString(err, NULL));
nsfprintf(stderr, @"Failed to set keychain preference domain: %@\n", errMsg);
@@ -434,7 +434,7 @@
/* Admin & System */
/* Causes ValidateSystemTrust to ignore the user's keychain */
if ((err = SecKeychainSetPreferenceDomain(kSecPreferencesDomainSystem)) != errSecSuccess) {
- if (&SecCopyErrorMessageString != NULL) {
+ if (SecCopyErrorMessageString != NULL) {
/* >= 10.5 */
CFStringRef errMsg = PLCFAutorelease(SecCopyErrorMessageString(err, NULL));
nsfprintf(stderr, @"Failed to set keychain preference domain: %@\n", errMsg);
@@ -489,7 +489,7 @@
/* Prefer the non-deprecated SecItemExport on Mac OS X >= 10.7. We use an ifdef to keep the code buildable with earlier SDKs, too. */
nsfprintf(stderr, @"Exporting certificates from the keychain\n");
- if (&SecItemExport != NULL) {
+ if (SecItemExport != NULL) {
err = SecItemExport((CFArrayRef) anchors, kSecFormatPEMSequence, kSecItemPemArmour, NULL, &pemData);
} else {
err = SecKeychainItemExport((CFArrayRef) anchors, kSecFormatPEMSequence, kSecItemPemArmour, NULL, &pemData);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150613/d739228c/attachment.html>
More information about the macports-changes
mailing list