MYCryptoConfig.h
author Jens Alfke <jens@mooseyard.com>
Tue Jun 09 23:58:03 2009 -0700 (2009-06-09)
changeset 24 6856e071d25a
permissions -rw-r--r--
* More work on iPhone compatibility.
* Restored the signature-verification code to MYCertInfo, which I'd removed earlier. I now need it to verify self-signed certs, since the Security framework won't do it for me.
* Merged MYCertificate-iPhone.m into MYCertificate.m since there's more shared code now.
     1 //
     2 //  MYCryptoConfig.h
     3 //  MYCrypto
     4 //
     5 //  Created by Jens Alfke on 4/5/09.
     6 //  Copyright 2009 Jens Alfke. All rights reserved.
     7 //
     8 
     9 #import <Security/SecBase.h>
    10 
    11 /*  The iPhone simulator actually has the Mac OS X security API, not the iPhone one.
    12     So check which API is installed by looking for a preprocessor symbol that's defined
    13     only in the OS X version of SecBase.h. */
    14 
    15 #ifndef MYCRYPTO_USE_IPHONE_API
    16 
    17 #if TARGET_OS_IPHONE && !defined(__SEC_TYPES__)
    18 #define MYCRYPTO_USE_IPHONE_API 1
    19 #else
    20 #define MYCRYPTO_USE_IPHONE_API 0
    21 #endif
    22 
    23 #endif