}
CFDataRef SecCopyEncryptedToServerKey(SecKeyRef publicKey, CFDataRef dataToEncrypt, CFErrorRef *error)
}
CFDataRef SecCopyEncryptedToServerKey(SecKeyRef publicKey, CFDataRef dataToEncrypt, CFErrorRef *error)
- require_action_quiet(public_key_size + ciphertext_size + tag_size == encrypted_size, errout, SecError(errSecInternal, error, CFSTR("Allocation mismatch"), encrypt_result));
+ require_action_quiet(public_key_size + ciphertext_size + tag_size == encrypted_size, errout, SecError(errSecInternal, error, CFSTR("Allocation mismatch")));
encrypted = CreateDataForEncodeEncryptedBlobOf(public_key,
public_key_size, &public_key_data,
encrypted = CreateDataForEncodeEncryptedBlobOf(public_key,
public_key_size, &public_key_data,
#include <Security/SecTrustInternal.h>
#endif
CFDataRef SecCopyEncryptedToServer(SecTrustRef trustedEvaluation, CFDataRef dataToEncrypt, CFErrorRef *error)
{
CFDataRef result = NULL;
#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?")));
require_action_quiet(trustKey, fail,
SecError(errSecInteractionNotAllowed, error, CFSTR("Failed to get key out of trust ref, was it evaluated?")));