]> git.saurik.com Git - apple/security.git/blobdiff - OSX/sec/Security/SecServerEncryptionSupport.c
Security-59754.80.3.tar.gz
[apple/security.git] / OSX / sec / Security / SecServerEncryptionSupport.c
index b2bee3e0e5d4298c691e06c11e6a9d1e16400a03..e43f0f6b7756dd0828fe7fbb51245b220dab60d1 100644 (file)
@@ -320,18 +320,14 @@ CFDataRef SecCopyDecryptedForServer(SecKeyRef serverFullKey, CFDataRef blob, CFE
     return result;
 }
 
-#if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_EMBEDDED)
+#if TARGET_OS_OSX
 #include <Security/SecTrustInternal.h>
 #endif
 
 CFDataRef SecCopyEncryptedToServer(SecTrustRef trustedEvaluation, CFDataRef dataToEncrypt, CFErrorRef *error)
 {
     CFDataRef result = NULL;
-#if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_EMBEDDED)
-    SecKeyRef trustKey = SecTrustCopyPublicKey_ios(trustedEvaluation);
-#else
-    SecKeyRef trustKey = SecTrustCopyPublicKey(trustedEvaluation);
-#endif
+    SecKeyRef trustKey = SecTrustCopyKey(trustedEvaluation);
 
     require_action_quiet(trustKey, fail,
                          SecError(errSecInteractionNotAllowed, error, CFSTR("Failed to get key out of trust ref, was it evaluated?")));